ieng9.ucsd.edu% cat > lower.c void lower(char *s) { printf("%s\n",s); } int main(void) { lower("Hello world"); } ieng9.ucsd.edu% gcc -g lower.c -o lower ieng9.ucsd.edu% gdb lower GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.6"... (gdb) break main Breakpoint 1 at 0x10588: file lower.c, line 9. (gdb) run Starting program: /home/solaris/ieng9/cs127w/cs127w/lower Breakpoint 1, main () at lower.c:9 9 lower("Hello world"); (gdb) x/i main 0x10584
: save %sp, -112, %sp (gdb) 0x10588 : sethi %hi(0x10400), %o1 (gdb) 0x1058c : or %o1, 0x228, %o0 ! 0x10628 <_lib_version+16> (gdb) 0x10590 : call 0x10560 (gdb) 0x10594 : nop (gdb) x/i lower 0x10560 : save %sp, -112, %sp (gdb) x/x 0x10590 0x10590 : 0x7ffffff4 (gdb)