If you have a particular line of C code in mind to examine in the machine output, how would you locate it in objdump output. Here is an example
if (cond) foo; bar();
and I want to see if bar was inlined as I’d like. Or would you use some alternative tool instead of objdump?
You can start objdump using the
-Soption (like'objdump -Sd a.out'). It will display the sourcecode intermixxed with the assembler code, if the source-files the code was compiled from are available.Alternatively, you can use the following way:
becomes