This is the mail archive of the
mailing list for the GDB project.
Re: Cross solib support; viable at all?
On Wed, Nov 07, 2001 at 07:55:46PM +0100, Orjan Friberg wrote:
> 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
I generally set solib-absolute-prefix to point at a copy of the
filesystem which contains unstripped libraries. You don't need the
whole filesystem; just the contents of anything you use in /lib and
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer