Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "luca regini" <luca.regini@gmail.com>
To: gdb@sourceware.org
Subject: Beginner question regarding gdb symbol files
Date: Thu, 21 Feb 2008 13:47:00 -0000	[thread overview]
Message-ID: <64077c280802210543r163ce60aje62c2d6fc4632554@mail.gmail.com> (raw)

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


             reply	other threads:[~2008-02-21 13:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 13:47 luca regini [this message]
2008-02-21 16:53 ` Daniel Jacobowitz
2008-02-28 16:13   ` luca regini
2008-02-28 16:53     ` Daniel Jacobowitz
2008-02-28 17:00       ` luca regini
2008-02-28 17:13         ` Daniel Jacobowitz
2008-02-29  1:10           ` Michael Snyder
2008-02-29 13:40             ` luca regini
2008-02-29 18:19               ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64077c280802210543r163ce60aje62c2d6fc4632554@mail.gmail.com \
    --to=luca.regini@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox