From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Smith To: egcs@cygnus.com Cc: GDB Subject: Re: GDB and shared libraries Date: Tue, 27 Feb 2001 07:37:00 -0000 Message-id: <3A9BCA16.14897EED@home.com> References: <3A84136A.23BAF90F@home.com> <1010209182220.ZM4621@localhost.localdomain> <3A845A56.5EF8F61@home.com> <3A9AB471.5F46554@home.com> <1010226205415.ZM30678@localhost.localdomain> <3A9ADDF4.FD998D6E@home.com> <1010226233506.ZM13209@ocotillo.lan> <3A9B0022.16ABBBE0@home.com> <1010227013252.ZM13444@ocotillo.lan> <3A9B35E4.33B1868B@home.com> <1010227070946.ZM13817@ocotillo.lan> X-SW-Source: 2001-02/msg00410.html > > Or (more likely) it's possible that the OS provides some other > interface for getting at this information. Again, the two things you > need are 1) some way to be notified that the dynamic linker has loaded > (or unloaded) one of the shared libraries and 2) some way to get the > names of the libraries, their load addresses, and perhaps other > assorted information. You'll need to consult the docs for your > proprietary OS and figure out what these mechanisms are. It's quite > possible that they've provided you with a debugging API for getting at > this information. > Well, since we wrote the OS and the gdbserver, I think that is doable. > > Anyway, once you've figured out these details, you'll still need to > put a shared library backend on your target. Fortunately, if you make > the target stub (gdb server) do most of the work, it ought to be > pretty simple. I think the generally accepted mechanism for gdb to > request this kind of target/stub-specific information is the "q" > packet. GDB's remote protocol is documented at > > http://sources.redhat.com/gdb/onlinedocs/gdb_14.html#SEC120 > > At this point, I'll let others jump in because my experience with the > remote protocol is actually rather limited... > > Kevin Thanks for pointing me to the doc Stephen