This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Beginner question regarding gdb symbol files
- From: "luca regini" <luca dot regini at gmail dot com>
- To: gdb at sourceware dot org
- Date: Thu, 21 Feb 2008 14:43:58 +0100
- Subject: Beginner question regarding gdb symbol files
I have a project that is organized like the Makefile that follows. I
have an executable that links two shared objects. I separate debug
symbols from shared libraries and executable files. I would like to
debug the stripped executable using the stripped symbols. Sadly i am
not able to view any debug information. I tryed to use both the
symbol-file and add-symbol-file to read the stripped symbols.
Any help is very appreciated.
libbellac.so: bellaclib.c
gcc -g -c bellaclib.c -o bellac.o
gcc -g -s -shared -Wl,-soname,libbellac.so -o libbellac.so bellac.o
strip bellac.o --only-keep-debug -o clib.dbg
libbellacpp.so: bellacpplib.cpp
g++ -g -c bellacpplib.cpp -o bellacpp.o
g++ -g -s -shared -Wl,-soname,libbellacpp.so -o libbellacpp.so bellacpp.o
strip bellacpp.o --only-keep-debug -o cpplib.dbg
all: main.cpp libbellac.so libbellacpp.so
g++ -g -c main.cpp -o main.o
g++ -s main.o libbellac.so libbellacpp.so -o test
strip main.o --only-keep-debug -o test.dbg
clean:
rm -f *.so *.o *.dbg
Greets,
Luca