Re: Any way for Finding out LOC(lines of code) from a Binary file

=?ISO-8859-1?Q?J=FCrgen_Kahrs?= <Juergen.KahrsDELETETHIS@vr-web.de>
2 Oct 2004 16:27:08 -0400

          From comp.compilers

Related articles
Any way for Finding out LOC(lines of code) from a Binary file d_skumar@excite.com (2004-10-02)
Re: Any way for Finding out LOC(lines of code) from a Binary file basile-news@starynkevitch.net (Basile Starynkevitch \[news\]) (2004-10-02)
Re: Any way for Finding out LOC(lines of code) from a Binary file Juergen.KahrsDELETETHIS@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2004-10-02)
| List of all articles for this month |
From: =?ISO-8859-1?Q?J=FCrgen_Kahrs?= <Juergen.KahrsDELETETHIS@vr-web.de>
Newsgroups: comp.compilers
Date: 2 Oct 2004 16:27:08 -0400
Organization: Compilers Central
References: 04-10-018
Keywords: analysis, code
Posted-Date: 02 Oct 2004 16:27:08 EDT

skumar wrote:


> towards this would be very much useful to me.I just wantto know the
> KLOCs application has used to create the binary file.
..
> [You can estimate from the size of the code sections in the file, but
> unless it happens to have debug symbols with line numbers, your
> estimate will be rather rough. -John]


Disassembling the code sections would give you an estimate of lines of
assembly language. But what does this really mean if the binary is
linked statically and 90% of the binary consists of libs ?


What if the source code's language was C++ and the author made heavy
use of templates ?


If your binary is a Java VM binary, you may be lucky. Most Java
compilers insert line numbers into the binaries. That's the reason why
tools like Together are quite good in reconstructing source code from
JVM files.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.