Re: shared library support hookin the remote.c

Stephen & Linda Smith
2004-06-29T01:55:38Z

Kevin Buettner wrote:

> How does the remote target communicate the necessary details to GDB
>
>then?
>
>It sounds to me as though you want to add the hook so that you can add
>a private protocol extension.
>
>IMO, it's better to hash out the details of a public remote protocol
>extension for shared library support.
>
That would be my preference, but I haven't figured out a generic way.
Here is the basic problem is that the
remote protocol has no notion of shared libraries or of segments (TEXT,
BSS, DATA, etc). Can someone
on this list think of a generic way of getting this data?

A second problem is that the number and names of the segments doesn't
appear to be consistent. It was for this
reason that I was thinking of making the protocol a target specific one
that supports the solib interface.

>... I'd like to first understand how communication of shared library information
>between GDB and the stub is accomplished and what the protocol looks
>like.
>

I assume you don't mean how the published protocol works.

What I didn't in the passed, was to use a q packet. If I read the spec
correctly was to use that packet type to find out if
there were any libraries and to find out the segment addersses.

I don't mind making it a public interface, but from the conversation
three years ago, I got the idea that the maintainers
weren't especially keen on making it part of the general (i.e remote.c)
code base.