GDB Notes

From Simson Garfinkel
Jump to navigation Jump to search

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