mirror of https://github.com/cheat/cheat.git
Merge pull request #131 from lucaswerkmeister/patch-1
Add a gdb cheat sheet
This commit is contained in:
commit
56cde2f6e5
|
@ -0,0 +1,26 @@
|
||||||
|
# start the debugger
|
||||||
|
gdb your-executable
|
||||||
|
|
||||||
|
# set a breakpoint
|
||||||
|
b some-method, break some-method
|
||||||
|
|
||||||
|
# run the program
|
||||||
|
r, run
|
||||||
|
|
||||||
|
# when a breakpoint was reached:
|
||||||
|
|
||||||
|
# run the current line, stepping over any invocations
|
||||||
|
n, next
|
||||||
|
# run the current line, stepping into any invocations
|
||||||
|
s, step
|
||||||
|
# print a stacktrace
|
||||||
|
bt, backtrace
|
||||||
|
# evaluate an expression and print the result
|
||||||
|
p length=strlen(string)
|
||||||
|
# list surrounding source code
|
||||||
|
l, list
|
||||||
|
# continue execution
|
||||||
|
c, continue
|
||||||
|
|
||||||
|
# exit gdb (after program terminated)
|
||||||
|
q, quit
|
Loading…
Reference in New Issue