public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Stephen Smith <ischis2@home.com>
To: GDB <gdb@sourceware.cygnus.com>
Subject: Re: GDB and shared libraries
Date: Tue, 27 Feb 2001 13:14:00 -0000	[thread overview]
Message-ID: <3A9C18F3.A98359B9@home.com> (raw)
In-Reply-To: <3A9BD1C8.B1C6DDB1@cygnus.com>

Andrew Cagney wrote:

> > Ok,  what do I need to add (commands, data, etc.) to my gdb server to trace into these libraries?  Is the spec written
> > down?
>
> Just FYI.
>
> Most shared library implementations can, in theory, be debugged remotely
> without any modifications to the GDB remote protocol.  This is because
> the SHLIBs are handled using only memory read/writes and breakpoints.
>
> The ``exercise left to the reader'' is getting what was native-only
> SHLIB code re-written in a way that is host independant.

From what I have been told and from looking at the spec it appears that I may have what I need already implemented as far as
the remote protocol is concerned (unless I missed something).  BTW, thanks kevin for your help.

Now here is an example that will go along with my question that hopefully will explain why I am so confused.  Remember I am
running
on target=powerpc-motorola-elf   and host = i686-cygwin-pe (this means that gdb is the insight version 5.0).

On the target I have the application testapp.exe and the library libtestlib.so.  When the OS loads testapp.exe and
libtestlib.so it does the fixups and (since we wrote the OS and the gdbserver) we can see the elf headers for both files.
We also currently can debug testapp.exe itself.

Now, the function main() has a call to lib1Func()  which is defined inside of libtestlib.so.  I would like to trace into
that function.

Questions:
     1)  In the protocol   http://sources.redhat.com/gdb/onlinedocs/gdb_14.html#SEC120  I don't see a way to pass back the
fixup results that the loader performed.
          Don't I need to do that?

     2) When I step into the function, lib1Func(), how does the gdbserver tell gdb that it needs to load the symbol table
from the file libtestlib.so?

sps



  reply	other threads:[~2001-02-27 13:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A84136A.23BAF90F@home.com>
     [not found] ` <1010209182220.ZM4621@localhost.localdomain>
     [not found]   ` <3A845A56.5EF8F61@home.com>
     [not found]     ` <3A9AB471.5F46554@home.com>
     [not found]       ` <1010226205415.ZM30678@localhost.localdomain>
2001-02-26 14:50         ` GDB and shared libraries (was Re: Are you still with Suse) Stephen Smith
2001-02-26 15:35           ` GDB and shared libraries Kevin Buettner
2001-02-26 16:07             ` Stephen Smith
2001-02-26 16:39             ` Stephen Smith
2001-02-26 18:05               ` Kevin Buettner
2001-02-26 20:51             ` Stephen Smith
     [not found]             ` <3A9B0022.16ABBBE0@home.com>
     [not found]               ` <1010227013252.ZM13444@ocotillo.lan>
2001-02-26 21:05                 ` Stephen Smith
2001-02-26 23:10                   ` Kevin Buettner
2001-02-27  7:37                     ` Stephen Smith
2001-02-27  8:14                   ` Andrew Cagney
2001-02-27 13:14                     ` Stephen Smith [this message]
2001-02-27 13:44                       ` Kevin Buettner
2001-02-27 14:04                         ` Stephen Smith
2001-03-21 15:59                     ` Stephen Smith
2003-07-24 21:51 gdb " wim delvaux
2004-01-06 22:07 GDB and Shared Libraries Drummonds, Scott B
2004-01-06 22:10 ` Daniel Jacobowitz
2006-02-08 21:13 gdb and shared libraries Patrick Alken
2006-02-09  5:54 ` Jim Blandy
2006-02-09 13:51   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A9C18F3.A98359B9@home.com \
    --to=ischis2@home.com \
    --cc=gdb@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).