This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/3] remove-symbol-file
- From: Pedro Alves <palves at redhat dot com>
- To: "Blanc, Nicolas" <nicolas dot blanc at intel dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 24 Apr 2013 18:46:16 +0100
- Subject: Re: [PATCH 0/3] remove-symbol-file
- References: <1366098721-18302-1-git-send-email-nicolas dot blanc at intel dot com> <8761zdow5j dot fsf at fleche dot redhat dot com> <388084C8C1E6A64FA36AD1D656E4856619DEEE98 at IRSMSX102 dot ger dot corp dot intel dot com>
On 04/24/2013 06:30 PM, Blanc, Nicolas wrote:
> Thanks Tom, Pedro for your feedback.
>
> I'll try to respond to both of you in this email.
>
> This implementation only removes files that were added via the add-symbol-file command.
> The add-symbol-file command takes as parameter the address of the text session. In this
> context I think the text address is the most appropriate way to remove a file because:
> 1) the user knows exactly where the .text section was loaded,
So how do you handle the case of there being no .text section at all?
> 2) an application can load shared libraries several times at different addresses (it's a requirement for me), and
> 3) I can't think of a good reason why someone would add a second symbol file at the same address.
> Most likely this is a user error that should have been reported by add-symbol-file.
>
> Note that currently in Option 4 below ADDR is in fact "objf->addr_low", but the command could be more generous
> by searching first which file corresponds to ADDR and then removing it. This would be more flexible and an
> alternative to Option 3, for instance.
You lost me here.
>
> 1) remove-symbol-file FILE
> 2) remove-symbol-file FILE ADDR
> 3) remove-symbol-file -s .data DATA_ADDR
> 4) remove-symbol-file ADDR
--
Pedro Alves