Bug 126305 - debugging of 32 bit programs not possible / gdb32 not available
debugging of 32 bit programs not possible / gdb32 not available
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
2
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Elena Zannoni
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-18 15:04 EDT by Gert Vervoort
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-21 13:44:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gert Vervoort 2004-06-18 15:04:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6)
Gecko/20040510

Description of problem:

It is not possible to debug 32 bit programs. gdb only handles 64 bit
programs and to be able to debug 32 bit programs a 32 bit version of
gdb (gdb32) should be available. 

See slide 34 of presentation below:

http://www.amd.com/us-en/assets/content_type/DownloadableAssets/dwamd_Software_Porting_-_Rich_Brunner.pdf



Version-Release number of selected component (if applicable):
gdb-6.0post-0.20040223.19

How reproducible:
Always

Steps to Reproduce:
1.type "gdb32" 
2.
3.
    

Actual Results:  [gert@apollo tmp]$ gdb32
bash: gdb32: command not found
[gert@apollo tmp]$


Expected Results:  [gert@apollo tmp]$ gdb32
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu".
(gdb)


Additional info:
Comment 1 Elena Zannoni 2004-06-21 11:07:55 EDT
Are you sure? The current gdb on x86-64 debugs 32 bit programs.
We are not shipping a gdb32 binary.
Comment 2 Gert Vervoort 2004-06-21 13:16:06 EDT
Indeed it does do debug 32 bit program, so the gdb32 bit program, as
mentioned in AMD's documentation, is not needed.

It does give some error messages when starting running a 32 bit
executable, but it seems to work: 
 
[gert@apollo tmp]$ gcc -g -m32 hello.c
[gert@apollo tmp]$ gdb a.out
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host
libthread_db library "/lib64/tls/libthread_db.so.1".
 
(gdb) break 5
Breakpoint 1 at 0x8048384: file hello.c, line 5.
(gdb) r
Starting program: /tmp/a.out
Error while mapping shared library sections:
: Success.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
 
Breakpoint 1, main () at hello.c:5
5               printf("Hello, world!\n");
(gdb) info registers
eax            0x0      0
ecx            0xffffd9cc       -9780
edx            0xffffd9c4       -9788
ebx            0x40cffc 4247548
esp            0xffffd930       0xffffd930
ebp            0xffffd938       0xffffd938
esi            0x1      1
edi            0x40f0fc 4255996
eip            0x8048384        0x8048384
eflags         0x286    646
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x5b     91
(gdb) c
Continuing.
Hello, world!
 
Program exited normally.
(gdb)

Comment 3 Elena Zannoni 2004-06-21 13:44:50 EDT
Ah yes, the warnings/errors are not related. That's another bug :-)

The slides are quite old, seem to be from 2 years ago, and at that
point they were indeed correct.

Okey, I am closing this.

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