gdb自动化调试
basic
variable
set $a=1
register
i r
print registers
set $eax=1
function
1 | define func_name |
condition
1 | condition N COND #Specify breakpoint number N to break only if COND(expr) is true |
loop
1 | while <condition> |
commands
1 | commands 1 |
run batch
source run.batch
gdb --batch --command=run.batch --args test.exe <args>
example
1 | set $LINE = 10 |