From owner-freebsd-hackers Mon Apr 27 05:39:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA00597 for freebsd-hackers-outgoing; Mon, 27 Apr 1998 05:39:39 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from kris.wpi.edu (kris.WPI.EDU [130.215.64.35]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA00583 for ; Mon, 27 Apr 1998 05:39:35 -0700 (PDT) (envelope-from rick@kris.wpi.edu) Received: (from rick@localhost) by kris.wpi.edu (8.8.5/8.8.5) id IAA10478; Mon, 27 Apr 1998 08:44:05 -0400 (EDT) From: "Rick C. Petty" Message-Id: <199804271244.IAA10478@kris.wpi.edu> Subject: Re: how to get number of instructions in a prg In-Reply-To: <199804270906.LAA08665@kk662.kk.etx.ericsson.se> from ETX-B-SL Martti Kuparinen at "Apr 27, 98 11:06:58 am" To: erakupa@kk.etx.ericsson.se (ETX-B-SL Martti Kuparinen) Date: Mon, 27 Apr 1998 08:44:05 -0400 (EDT) Cc: hackers@FreeBSD.ORG X-Files: Trust no one! X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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