f78
Source and machine code
When run under GNU Emacs mode, the
For instance, we can use
We can use
Print the starting and ending addresses of the compiled code for source line
linespec. Specify source lines in any of the ways understood by the list command (see Printing source lines).
Line 895 of “builtin.c” starts at pc 0x634c and ends at 0x6350.
Line 926 of “builtin.c” starts at pc 0x63e4 and ends at 0x6404.
This specialized command dumps a range of memory as machine instructions. The
default memory range is the function surrounding the program counter of the
selected frame. A single argument to this command is a program counter value; GDB
dumps the function surrounding this value. Two arguments specify a range of
addresses (first inclusive, second exclusive) to dump.
Dump of assembler code from 0x63e4 to 0x6404:
0x63e4 <builtin_init+5340>: ble 0x63f8 <builtin_init+5360>
0x63e8 <builtin_init+5344>: sethi %hi(0x4c00), %o0
0x63ec <builtin_init+5348>: ld [%i1+4], %o0
0x63f0 <builtin_init+5352>: 0x63fc <builtin_init+5364>
0x63f4 <builtin_init+5356>: ld [%o0+4], %o0
0x63f8 <builtin_init+5360>: or %o0, 0x1a4, %o0
0x63fc <builtin_init+5364>: call 0x9288 <path_search>
0x6400 <builtin_init+5368>: nop
End of assembler dump.