From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2266 invoked by alias); 15 Aug 2008 15:59:39 -0000 Received: (qmail 2068 invoked by uid 22791); 15 Aug 2008 15:59:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Aug 2008 15:58:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 68AC32A9659; Fri, 15 Aug 2008 11:58:50 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id A-MQVcDcXBtd; Fri, 15 Aug 2008 11:58:50 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7F5232A9652; Fri, 15 Aug 2008 11:58:49 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 151B8E7ACD; Fri, 15 Aug 2008 17:58:42 +0200 (CEST) Date: Fri, 15 Aug 2008 20:28:00 -0000 From: Joel Brobecker To: Aleksandar Ristovski Cc: gdb@sources.redhat.com Subject: Re: solist - internals: when ldd is in libc Message-ID: <20080815155842.GE9556@adacore.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00190.txt.bz2 > 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