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]

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


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