How to get value stored in a register, using gdb? "p/x $ebx" fails with "No registers." -
suppose following asm code
8048deb: e8 41 05 00 00 call 8049331 <explode_bomb> 8048df0: 03 73 f4 add -0xc(%ebx),%esi 8048df3: 83 c3 04 add $0x4,%ebx 8048df6: 8d 45 f8 lea -0x8(%ebp),%eax 8048df9: 39 c3 cmp %eax,%ebx 8048dfb: 75 e7 jne 8048de4 <phase_2+0x22>
i set breakpoint @ last line, time, expecting both %eax , %ebx have stored in them.
in gdb, do
p/x $ebx
and get:
no registers.
what error mean? how can current content stored in register?
p/x $ebx works fine me. (or rather, p/x $rbx, because i'm testing in 64-bit os, imagine p/x $ebx work in 32-bit.) application must running. if try p/x $rbx when application has not started or has exited, "no registers". sure breakpoint hit?
Comments
Post a Comment