This is the mail archive of the gdb@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]

Cannot use symbols from separate file on AIX.


Hi

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 $


Bill Somerville Consultant Macrovision


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