This is the mail archive of the gdb@sources.redhat.com 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] | |
On Mon, 23 Sep 2002, Daniel Jacobowitz wrote:
> On Mon, Sep 23, 2002 at 11:21:51AM -0400, Alexander Larsson wrote:
> > > Once this is done, this change would need to be documented in the gdb
> > > manual, and a testcase added to the testsuite.
> >
> > I really tried to make a testcase. I promise. I was just completely
> > crushed by expect/dejagnu and the testsuite setup. I have a small piece of
> > code that can be used with objcopy --add-section to generate a
> > .gnu_debuglink section to test this. I tried it manually, and it works
> > well. If anyone is willing to do the testsuite work I promise to help as
> > much as I can.
>
> If you'll send me that, when this code has settled and been committed
> I'll try to handle the testsuite.
>
Thanks. I attached the code.
A simple test is:
cp binary binary.debug
debug-link < binary.debug > binary.debugling
objcopy --add-section .gnu_debuglink=binary.debuglink binary binary.stripped
strip binary.stripped
After that you should be able to do gdb binary.stripped and still get
debug info.
I also have some libelf based code to do the stripping which is much more
production oriented. This is what we'll use later.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl@redhat.com alla@lysator.liu.se
He's an underprivileged dishevelled grifter with a winning smile and a way
with the ladies. She's a disco-crazy motormouth queen of the dead from out of
town. They fight crime!
Attachment:
debug-link.c
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |