Re: Symbol tables for separately linked pieces

Paul Koning
2008-07-10T15:56:14Z

>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

Daniel> On Thu, Jul 10, 2008 at 03:55:58PM +0100, Andrew STUBBS
Daniel> wrote:
>> This solution is less satisfactory when the context change occurs
>> frequently, so I've been wondering if there would be a better way
>> to do it myself. Some sort of context sensitive thing maybe
>> (select symbols from the same source as the current function
>> symbol), or perhaps explicitly by name ("break a.elf:main").

Daniel> I don't have a suggestion, but I do have a hopeful sign: the
Daniel> same sort of juggling is necessary for a
Daniel> multiple-process-image GDB, which CodeSourcery's going to be
Daniel> working on once we're finished with non-stop debugging and
Daniel> multi-process-single-image. Whatever we come up with will
Daniel> hopefully be useful for this two image scenario too.

Daniel> I suspect we'll tell GDB to keep both symbol tables loaded,
Daniel> but have one current. But I haven't really thought about it
Daniel> (I'm working on other things).

Interesting,

The hack implementation I have right now is in the context of a dump
analyzer. I do the "load both and have one current" thing. On top of
that, I also allow the analyzer to find the current process (or any
other process) and load its symbol tables (including shared libraries,
eek). It's not a common thing but occasionally it's nice to trace a
kernel crash all the way down into userland.

Maybe we should compare notes.

paul