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

Re: Cross solib support; viable at all?


Orjan Friberg wrote:
> 
> Ah, brilliant!  This was the part I was thinking might need extensions
> to the remote protocol, but mounting the target's file system from my
> host gets around that problem (especially that of getting hold of the
> target's dynamic linker).

If this doesn't make any sense, it's because I was way out there.  I
mistakenly thought that the dynamic loader somehow ran separately from
the program itself and therefore required some magic way to have a
breakpoint set in it (hence my ramblings about extending the remote
protocol), but like Michael said, it's part of the target code.  I'm
pretty sure I've got things straight now ;) .

The actual so files on the target are stripped, so I do need to add the
symbols from their unstripped counterparts with the add-symbol-file
command.  Problem is, add-symbol-file needs me to specify the start
address of the text segment, which again requires me to check the
target's /proc/<pid>/maps and add the offset of the text segment for
each so file.  Is there a better way?  Ideally, what I would like to say
is simply "Right, *this* symbol-file goes with *this* file/solib". 
Attacking the problem from a different angle, I could simply rename the
unstripped solib (libc-2.2.3.so) on my host to the name of the stripped
(libc.so.6) and have the symbols read in that way, but that's a bit of a
hack.

Other than that, things seem to be working.  I'm debugging core dumps
from solibs and I'm enjoying every second of it!

-- 
Orjan Friberg
Axis Communications AB


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