image image image image image image image
image

Lauryn Stewart (lost_lauryn) Latest Uncensored Leaks #942

45819 + 381 OPEN

I then take this function name and print out the source code of the function, then ask the user to select which line of code at which to set the break/trace point

At the moment, using the disassemble command i can print out the memory addresses for the user, but i want to print the actual source code instead Can this be done in gdb Print lines ending with last Likewise, if last resolves to more than one source line in the program, then the list command prints the list of resolved source lines and does not proceed with the source code listing. Print the starting and ending addresses of the compiled code for source line linespec You can specify source lines in any of the ways understood by the list command (see section printing source lines).

To print the source code of the current line being executed, gdb provides a straightforward command This is useful for quick reference without switching context. (gdb) info line *0x2c4e print line number of object code at address (gdb) x/10i main disassemble first 10 instructions in \fimain\fr (gdb) disassemble addr dissassemble code for function around addr history display (gdb) show commands print command history (>= gdb 4.0) (gdb) info editing print command history (gdb 3.5) Since all of gdb is all in one window, when you are debugging you cannot see the source code for your program To view the source code, type list or l Gdb will print out the source code for the lines around the current line to be executed.

This page explains the print command

The print command prints the value of a given expression. (gdb) n 10 for (i=1;i<=num;i++) (gdb) u 12 return sum (gdb) other commands (used with break points) of interest List [line#] prints lines from the source code around line# If we give it a function name as the argument function, it prints lines from the beginning of that function If we give it no argument, it prints lines around the break.

OPEN