(gdb) help list
List specified function or line.
With no argument, lists ten more lines after or around previous listing.
"list -" lists the ten lines before a previous ten-line listing.
One argument specifies a line, and ten lines are listed around that line.
Two arguments with comma between specify starting and ending lines to list.
Lines can be specified in these ways:
LINENUM, to list around that line in current file,
FILE:LINENUM, to list around that line in that file,
FUNCTION, to list around beginning of that function,
FILE:FUNCTION, to distinguish among like-named static functions.
*ADDRESS, to list around the line containing that address.
With two args if one is empty it stands for ten lines away from the other arg.
El *ADDRESS
es lo que es interesante.
en x86/x64 actual del puntero está en rip
registro de modo:
(gdb) list *$pc
0x7ffff7b018a0 is at ../sysdeps/unix/syscall-template.S:82.
77 in ../sysdeps/unix/syscall-template.S
El ejemplo es de cat
comando como no tengo nada con la información de depuración a la mano.
¿Qué tal solo 'list'? –
imprime varias líneas, pero no toda la función. – s5s
Puede seguir presionando enter luego de 'list function' para repetir el comando anterior y continuar imprimiendo la función 10 líneas a la vez. – Ben