GDB input radix option

You can see code like this in GDB: 0x3001ce2b : movzx edx,BYTE PTR [ebp-80] <- 80 is decimal 0x3001ce2f : mov eax,DWORD PTR [ebx+0x206c2] <- 0x206c2 is hexadecimal If you try to do a x/x $ebp-80, you will get the wrong address because the default input radix is hexadecimal and not decimal. But in the next line, it’s hexadecimal. I haven’t searched much about this, but it seems the decimal is used due to alignment....

October 18, 2007 · 2 min · 313 words