This is the mail archive of the gdb-patches@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]

Re: [PATCH 0/3] remove-symbol-file


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


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