Difference between revisions of "GDB Notes"

From Simson Garfinkel
Jump to navigationJump to search
m (Created page with "Cool GDB commands: <pre> checkpoint info checkpoints restart <checkpoint-id> delete checkpoint <checkpoint-id> </pre>")
 
m
 
Line 1: Line 1:
Cool GDB commands:
==GDB checkpointing==
 
<pre>
<pre>
checkpoint
checkpoint
Line 6: Line 5:
restart <checkpoint-id>
restart <checkpoint-id>
delete checkpoint <checkpoint-id>
delete checkpoint <checkpoint-id>
</pre>
==GDB Recording==
Initiate recording:
<pre>
break main
run
record
</pre>
Run backwards (be sure to set a breakpoint!)
<pre>
reverse-continue
</pre>
Forward replay:
<pre>
break foo
break bar
continue
</pre>
Stepping:
<pre>
step
reverse-step
</pre>
Next statement in function:
<pre>
next
reverse-next
</pre>
Finish the current function:
<pre>
finish
reverse-finish
</pre>
Just run everything in reverse:
<pre>
set exec-direction reverse
set exec-direction forward
</pre>
Controlling limits:
<pre>
show record insn-number-max
set record insn-number-max 1000000
show record stop-at-limit
set record stop-at-limit off
info record insn-number
</pre>
</pre>

Latest revision as of 15:24, 31 July 2011

GDB checkpointing

checkpoint
info checkpoints
restart <checkpoint-id>
delete checkpoint <checkpoint-id>

GDB Recording

Initiate recording:

break main
run 
record

Run backwards (be sure to set a breakpoint!)

reverse-continue

Forward replay:

break foo
break bar
continue

Stepping:

step
reverse-step

Next statement in function:

next
reverse-next

Finish the current function:

finish
reverse-finish

Just run everything in reverse:

set exec-direction reverse
set exec-direction forward

Controlling limits:

show record insn-number-max
set record insn-number-max 1000000
show record stop-at-limit
set record stop-at-limit off
info record insn-number