This is the mail archive of the gdb@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: Interactively add symbols


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.


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