FW: Help with GDB analyzing assembler code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have searched the web with no luck in finding an answer to my question
and am hoping someone here can answer it or point me in the direction of
someone who can.

We are using RHEL 4.0 AS on an Opteron machine.  I am searching for a
way to count the number of divides, logs, exponentials, etc.  used
during a C++ program.  One suggested way, was to use GDB to debug the
program/assembly code generated and count the number of interested
instructions.

I see that GDB offers a way to print out the program code in assembly
language.  I also see that GDB can output things to a file (default
gdb.txt).  I have also looked at the DDD tool.

My question is this:
Is there a way to execute the program with GDB and print every assembler
line generated and used?  This way - I can output all the lines to a
file, and simply count the number of instructions that were used during
the execution.

Suggestions/ideas?

Thanks,
Sylvia N.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux