Bug 195993 - gdb x86-64 can't get details from 32-bit gcc296 binaries
gdb x86-64 can't get details from 32-bit gcc296 binaries
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elena Zannoni
Jay Turner
Depends On:
Blocks: 176344
  Show dependency treegraph
Reported: 2006-06-20 04:13 EDT by Bastien Nocera
Modified: 2015-01-07 19:12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-31 17:36:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2006-06-20 04:13:09 EDT
1. Compile a test program on a 32-bit RHEL3, with gcc 2.96
$ cat test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char ** argv)
        float f = 4.5;
        printf("%f\n", f);
        return 0;
$ gcc296 -g -o test test.c
2. Copy the binary to a RHEL4 x86-64 machine
3. Run in gdb:
$ gdb ./test
(gdb) b 8
Breakpoint 1 at 0x8048429: file test.c, line 8.
(gdb) run
Starting program: /home/bnocera/test
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
Breakpoint 1, main (argc=1, argv=0xffffd8a4) at test.c:8
8       }
(gdb) p f
Cannot access memory at address 0xffffd814
On RHEL3 x86, and RHEL4 x86, "f" shows up properly:
(gdb) p f
$1 = 4.5
Comment 1 Chris Snook 2006-06-21 11:43:31 EDT
Running 32-bit gdb on x86_64 seems to work around the memory access problems,
but then has difficulty with pthreaded apps.  Static linking works around the
pthreading difficulty and seems to allow 32-bit gdb to properly debug pthreaded
gcc296 binaries on x86_64, at least in the test case.
Comment 7 RHEL Product and Program Management 2006-07-31 17:36:12 EDT
Development Management has reviewed and declined this request.  You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.