Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 1998 08:44:05 -0400 (EDT)
From:      "Rick C. Petty" <rick@kris.wpi.edu>
To:        erakupa@kk.etx.ericsson.se (ETX-B-SL Martti Kuparinen)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: how to get number of instructions in a prg
Message-ID:  <199804271244.IAA10478@kris.wpi.edu>
In-Reply-To: <199804270906.LAA08665@kk662.kk.etx.ericsson.se> from ETX-B-SL Martti Kuparinen at "Apr 27, 98 11:06:58 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> What is the easiest way to count the number of assembler instructions
> in a program?
> 
> In gdb there is the "disassemble function-name" command, but it
> disassembles only the given function. One could of course call this
> several times and each time count the lines, but since a program can
> have several hundred small sub-functions, this method is not the best...

What's wrong with compiling (under gcc) with the -S option, then "wc -l *.s"?
That's what I use.

--Rick C. Petty,  aka Snoopy                  mailto: rick@kris.wpi.edu
-----------------------------------------------------------------------
C/C++/DBMS/SQL/Perl/Java/HTML                http://kris.wpi.edu/~rick/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804271244.IAA10478>