Fri Jun 24 15:04:14 CEST 2011
gdb and low-level debugging
Seems that GDB is really a source debugger. I.e. the "disassemble"
command can't be used on bare code. For that you need the "x" examine
command, i.e. "x/10i $pc" will examine 10 units of data at $pc and
interpret them as instructions.
The next problem I ran into is setting breakpoints at raw instructions
instead of symbolic labels. Just using "break" or "thbreak" doesn't
work. Actually it does, it just needs some special syntax
(mnemonic: code is a dereferenced code pointer).
( Related remark: it's possible to save current breakpoint
configuration as a script. See "help breakpoints". )