Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb@sources.redhat.com
Subject: Re: solist - internals: when ldd is in libc
Date: Fri, 15 Aug 2008 20:28:00 -0000	[thread overview]
Message-ID: <20080815155842.GE9556@adacore.com> (raw)
In-Reply-To: <g844ms$3jf$1@ger.gmane.org>

> And this is, finally, my question: is there a mechanism in gdb to handle 
> such situation, or would supporting this scenario be a new feature?

Would the same routine in the target_ops object be what you are looking
for? Specifically, it is set to the following function for svr4:

    /* Return non-zero if GDB_SO_NAME and INFERIOR_SO_NAME represent
       the same shared library.  */
    
    static int
    svr4_same_1 (const char *gdb_so_name, const char *inferior_so_name)
    {
      if (strcmp (gdb_so_name, inferior_so_name) == 0)
        return 1;
    
      /* On Solaris, when starting inferior we think that dynamic linker is
         /usr/lib/ld.so.1, but later on, the table of loaded shared libraries 
         contains /lib/ld.so.1.  Sometimes one file is a link to another, but 
         sometimes they have identical content, but are not linked to each
         other.  We don't restrict this check for Solaris, but the chances
         of running into this situation elsewhere are very low.  */
      if (strcmp (gdb_so_name, "/usr/lib/ld.so.1") == 0
          && strcmp (inferior_so_name, "/lib/ld.so.1") == 0)
        return 1;
    
      /* Similarly, we observed the same issue with sparc64, but with
         different locations.  */
      if (strcmp (gdb_so_name, "/usr/lib/sparcv9/ld.so.1") == 0
          && strcmp (inferior_so_name, "/lib/sparcv9/ld.so.1") == 0)
        return 1;
    
      return 0;
    }

-- 
Joel


      reply	other threads:[~2008-08-15 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 18:27 Aleksandar Ristovski
2008-08-15 20:28 ` Joel Brobecker [this message]

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=20080815155842.GE9556@adacore.com \
    --to=brobecker@adacore.com \
    --cc=aristovski@qnx.com \
    --cc=gdb@sources.redhat.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