GDB commands (to be continued)

gdb command

Order Effect
start and stop
quit quit GDB
run Run the program (give command line arguments here)
kill stop the program
breakpoint
break multstore Set a breakpoint at the entry to the function multstore
break * 0x400540 Set a breakpoint at address 0x400540
delete 1 remove breakpoint 1
delete remove all breakpoints
implement
steppe execute 1 instruction
step 4 execute 4 instructions
nexti Similar to stepi, but in function calls
continue continue
finish run until the current function returns
Check the code
disas Disassemble the current function
disas multstore Disassembly function multstore
disas 0x400544 Disassemble the function located near address 0x400544
disas 0x40050,0x40054d Disassemble the code in the specified address range
print /x $rip Output the value of the program counter in hexadecimal
Check the data
print $rax output the contents of %rax in decimal
print /x $rax Output the content of %rax in hexadecimal
print /t $rax Output the contents of %rax in binary
print 0x100 output the decimal representation of 0x100
print /x 555 output the hex representation of 555
print /x ($rsp+8) Output the content of %rsp in hex plus 8
print *(long *) 0x7ffffffffe818 output a long at address 0x7ffffffffe818
print *(long *) ($rsp+8) output the long integer at address %rsp+8
x/2g 0x7ffffffffe818 Check for double (8 byte) word starting at address 0x7ffffffffe818
x/20b multstore Check the first 20 bytes of the function multstore
useful information
info frame Information about the current frame stack
info registers the value of all registers
help Get information about GDB

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325920676&siteId=291194637