|Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications|
by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team
Paperback (6"x9"), 164 pages
RRP £12.95 ($19.95)
6.2.4 Annotating assembly code programs
Valgrind can annotate assembly code programs too, or annotate the assembly code generated for your C program. Sometimes this is useful for understanding what is really happening when an interesting line of C code is translated into multiple instructions.
To do this, you just need to assemble your ‘.s’ files with assembler-level debug information. gcc doesn't do this, but you can use the GNU assembler with the ‘--gstabs’ option to generate object files with this information, e.g.:
as --gstabs foo.s
You can then profile and annotate source files in the same way as for C/C++ programs.
|ISBN 0954612051||Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications||See the print edition|