>>15
So gdb has
two commands to disassemble, one that refuses to start at the address that it's told to use but gives pages of output, and another that will start at the right address but only prints 1 instruction by default!?
:facepalm:
No one thought to include, like almost every other sane CLI debugger I've used, a "start at this address and print a reasonable default, like 8-16 instructions" command?
Here's another idiocy: You show the contents of the registers and they show up like
rax 0x00000000deadbeef
rbx 0x3970ffffffffffff
...
so how do you use the value of a register in an expression, like
x/i? From the register display you would think you can just type its name directly, but it doesn't work; from the disassembly, you would think you need to use the stupid '%' prefix convention again; no, doesn't bloody work either!!! Apparently you need to use '$'. WTF were the GNU wankers thinking? Nothing in either the disassembly nor register display hints at this. If they had prefixed all the registers in the R.D. with '$', that would at least give the user a clue.
minor rant: why does the register display have to take up a ton of lines - especially when everyone has a widescreen/highres monitor these days - when they could've formatted it much nicer like this:
RAX=0000000000000000 RBX=0000000000000000 RCX=0000000000000000 RDX=0000000000000000
RSP=FFFFFFFFFFFFFFEE RBP=0000000000000900 RSI=0000000000000000 RDI=0000000000000000
R08=0000000000000000 R09=0000000000000000 R10=0000000000000000 R11=0000000000000000
R12=0000000000000000 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000
DS=1903 ES=1903 SS=1903 CS=1903 RIP=0000000000000100 PM NV UP EI PL NZ NA PO NC
1903:0000000000000100 F0 LOCK
1903:0000000000000101 3E DS:
1903:0000000000000102 81 84 8E 78 56 34 12 89 AB CD EF ADD DWORD PTR [ESI+ECX*4+12345678],EFCDAB89
DS:0000000012345678=CDEF9876
At least I'm getting billed on the client's time for this...