This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Interactively add symbols
- From: Lars Brinkhoff <lars at nocrew dot org>
- To: gdb at sourceware dot org
- Date: Fri, 06 Oct 2017 05:44:05 +0000
- Subject: Re: Interactively add symbols
- Authentication-results: sourceware.org; auth=none
- References: <7w8tizsozc.fsf@junk.nocrew.org> <0b064735724520b06234db409f826183@polymtl.ca> <7wtvzvxl38.fsf@junk.nocrew.org>
Lars Brinkhoff wrote:
> Simon Marchi wrote:
>> Lars Brinkhoff wrote:
>>> As far as I have seen, there's no way for a user to interactively
>>> add a symbol to a running GDB session, other than specifying an
>>> object file from which to load symbols. I suggest there should be a
>>> simple way to do this from the command line.
>>
>> As you mentioned, this is a feature that has been often requested.
>> The best way to get some progress on this would be to make it work
>> for you, and the submit what you have.
>
> I have posted something which works, with some limitations and warts:
> https://sourceware.org/ml/gdb/2017-08/msg00022.html
>
> As far as I understand, all symbols must be associated with an objfile.
> So I couln't find a way to add a symbol without a file having been
> loaded first. I arbitrarily pick the first objfile in the current
> program. Maybe that's ok.
>
> Next, to record a new symbol, I used the minimal symbol reader. I found
> that it won't do its job unless the "minsyms_read" flag is reset.
> Normally it will be set after a file has been loaded, so I kinda hacked
> around that.
>
> Am I on the right track, or barking up the wrong tree?
Ping.