gdb: add more cmd and history stuff

This commit is contained in:
Mathieu Maret 2020-10-28 00:08:33 +01:00
parent f0ca57a2ba
commit ea5d1e530d

View File

@ -9,3 +9,19 @@ define exit
kill kill
quit quit
end end
define xxd
dump binary memory /tmp/dump.bin $arg0 ((char *)$arg0)+$arg1
shell xxd /tmp/dump.bin
end
document xxd
Runs xxd on a memory ADDR and LENGTH
xxd ADDR LENTH
end
macro define offsetof(t, f) &((t *) 0)->f
set history save on
set history size 10000
set history filename ~/.gdb_history