This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/2040: Separate symbol files not usable on AIX


>Number:         2040
>Category:       gdb
>Synopsis:       Separate symbol files not usable on AIX
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 30 09:58:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Bill Somerville
>Release:        GNU gdb 6.4.50.20051125
>Organization:
>Environment:
IBM AIX ML06

 $ uname -a
AIX ibmaix 2 5 00501CEE4C00

 $ gcc -v
Reading specs from /opt/freeware/gcc/3.4.4/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.4/specs
Configured with: ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 : (reconfigured) ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 --disable-shared : (reconfigured) ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 --disable-shared --with-pic : (reconfigured) ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 --disable-shared --with-pic : (reconfigured) ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 --with-pic : (reconfigured) ../gcc-3.4.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware/gcc/3.4.4 --disable-shared --with-pic
Thread model: aix
gcc version 3.4.4

This GDB was configured as "powerpc-ibm-aix5.2.0.0".
>Description:
Debug symbols cannot be loaded from a separate file from the executable. Or rather they are loaded, but appear to be discarded as soon as the target is continued.

Possibly releated, shared object debug symbols cannot be loaded at the correct address from a separate file.
>How-To-Repeat:
See attached file.

If it's any help - 64-bit prgrams exibit the same problems.
>Fix:
Sorry - I don't have any knowledge of gdb internals or XCOFF image formats.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="gdb.txt"
Content-Disposition: inline; filename="gdb.txt"

I'm trying to debug a program using debug symbolic info from a separate file and seem to have a problem. Below is the transcript of an example, the first gdb session uses the all-in-one image and works fine, the second uses the stripped image as the executable and loads symbols from the first file; here I have a problem.

Any ideas?

I'm using gcc v3.4.4 on AIX 5.2 ML06 if it helps.

bills@ibmaix: 50 $ cat hello1.c
#include <stdio.h>

int main (int argc, char * argv[])
{
        puts ("Hello, World!\n");
        return 0;
}
bills@ibmaix: 51 $ make CC=gcc hello1
gcc -g   -c -o hello1.o hello1.c
gcc -o hello1.debug hello1.o
gcc -o hello1 -Wl,-s hello1.o
bills@ibmaix: 52 $ gdb hello1.debug
GNU gdb 6.3
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 "powerpc-ibm-aix5.2.0.0"...
(gdb) b main
Breakpoint 1 at 0x100003ec: file hello1.c, line 5.
(gdb) r
Starting program: /home/bills/src/hello/hello1.debug

Breakpoint 1, main (argc=1, argv=0x2ff22694) at hello1.c:5
5               puts ("Hello, World!\n");
(gdb) c
Continuing.
Hello, World!


Program exited normally.
(gdb) q
bills@ibmaix: 53 $ gdb --symbols=hello1.debug --exec=hello1
GNU gdb 6.3
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 "powerpc-ibm-aix5.2.0.0"...
(gdb) b main
Breakpoint 1 at 0x100003ec: file hello1.c, line 5.
(gdb) r
Starting program: /home/bills/src/hello/hello1
warning: Symbol file /home/bills/src/hello/hello1.debug
is not mapped; discarding it.
If in fact that file has symbols which the mapped files listed by
"info files" lack, you can load symbols with the "symbol-file" or
"add-symbol-file" commands (note that you must take care of relocating
symbols to the proper address).
Error in re-setting breakpoint 1:
Function "main" not defined.
Hello, World!


Program exited normally.
(gdb) q
bills@ibmaix: 54 $


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]