key | description |
---|---|
b funName | |
d 1 | deletes breakpoint |
disable 1 enable 1 | disable/enable breakpoint |
d. | deletes all breakpoints |
---------------------- | ------------------------- |
r run | start program (with args) |
---------------------- | ------------------------- |
list list 1, 6 | show source code (between two comma-separated line numbers ) |
where | show stack trace, with line number where each function in stack was |
bt backtrace | backtrace; print out current stack |
---------------------- | ------------------------------------------------ |
p a print a | |
p (char) a | casts to char befoe print |
print f(123) | executes function f with args 123 and prints its return value |
x 0xfaf47 | prints content of memory address |
display x | print out the value of~x~ whenever program stops |
---------------------- | ----------------------- |
step | execute line by line, entering any function calls |
next | execute line by line, skipping over functon calls |
continue | resumes normal execution until breakpoint |
finish | resumes normal execution until end of proc or breakpoint |
kill | |
quit |
Last active
March 2, 2019 21:24
-
-
Save danielkrizian/eb32fe3b5540a50cdb4fc25321c38fd0 to your computer and use it in GitHub Desktop.
gdb cheatsheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment