From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8) Gecko/20060126 Fedora/1.5-5 Firefox/1.5
Description of problem:
When debugging a 32-bit executable on x86_64, gdb does not allow examining the stack if pointed to by a non-$esp register. For example,
_start: .globl _start
int3 # examining memory from $ebx fails, from $esp succeeds
$ gcc -m32 -o foo -nostartfiles -nostdlib foo.S
$ gdb foo
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build and debug the 32-bit test program in the Description.
2. Examine memory from $esp then from $ebx with the same value.
Actual Results: (gdb) run
Starting program: /home/jreiser/foo
Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Loaded system supplied DSO at 0xffffe000
Program received signal SIGTRAP, Trace/breakpoint trap.
0x08048076 in _start ()
(gdb) x/i $pc
0x8048076 <_start+2>: mov %esp,%ebx
0x08048078 in _start ()
(gdb) x/x $esp
(gdb) x/x $ebx
0xffffce70: Cannot access memory at address 0xffffce70
(gdb) x/x 0xffffce70
Expected Results: "x/x $ebx" should have succeeded, too, when %ebx has the same value as %esp and examining from $esp works.
Workaround apears to be: print the register, then use the contents as a literal address to examine.
These bugs are being closed since a large number of updates have been released
after the FC5 test1 and test2 releases. Kindly update your system by running yum
update as root user or try out the third and final test version of FC5 being
released in a short while and verify if the bugs are still present on the system
.Reopen or file new bug reports as appropriate after confirming the presence of
this issue. Thanks
To be fixed in gdb-6.5-11.fc6, thanks for your bugreport.
gdb-6.5-13.fc6 has been pushed for fc6, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.
Formal mistake, state MODIFIED is invalid for FC bugs.