You are not logged in.
Can any body help me in interpretating following output of info reg from gdb.
What are these pointers and first and second columns addresses.
How can I process from here ?
(gdb) info reg
eax 0x0 0
ecx 0x0 0
edx 0xfffffff4 -12
ebx 0x8e98f68 149524328
esp 0xf0828630 0xf0828630
ebp 0xf0828768 0xf0828768
esi 0x1 1
edi 0xf08293b4 -259877964
eip 0x812d529 0x812d529
eflags 0x10202 66050
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x63 99
The first column is the register name, the second column is its value in hexadecimals
and the last column is its value in decimals.
I'm not sure what you're trying to do, but usually you get more useful information
with the "disassemble" gdb command, as that shows which instructions are executed.
If the binary is compiled with debugging info then you get a lot more information and
backtraces are helpful too then, especially "bt full", as that gives a lot of extra info.
EIP is the instruction pointer, EAX is both the first argument of a function as well as
the return value (though it depends on which calling convention is used), but of course
the registers can be used for other things too. You can't tell what's going on by looking
at the register values, for that you need to look at the instructions. "info reg" is useful
when you want to look up the value of a register that is used by some instruction.
Then looking at registers won't help very much, as the instructions causing
the corruptions are quite old and the ones causing the crash are innocent
ones choking on the result.
Compile with debugging info and run your program through Valgrind,
it's slow, but it usually finds out where it goes wrong.