From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5616 invoked by alias); 15 Aug 2008 14:44:35 -0000 Received: (qmail 5601 invoked by uid 22791); 15 Aug 2008 14:44:32 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Aug 2008 14:43:53 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KU0Wr-0004CE-K1 for gdb@sources.redhat.com; Fri, 15 Aug 2008 14:43:49 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Aug 2008 14:43:49 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Aug 2008 14:43:49 +0000 To: gdb@sources.redhat.com From: Aleksandar Ristovski Subject: solist - internals: when ldd is in libc Date: Fri, 15 Aug 2008 18:27:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) X-IsSubscribed: yes 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/msg00188.txt.bz2 Hello, I have a question regarding the internals. We (qnx) have ldd in libc; qnx target is svr4, so we use solib-svr4; ldd is not listed in the process' link map. ldd lives in libc, but in .interp section it is called "ldqnx.so.2". Physically, ldqnx.so.2 is a softlink to real libc.so.2 (libc.so.3). When GDB tries to determines current_sos before any shared object is loaded, it will call svr4_default_sos, which, in turn, will create "artificial" ldqnx entry in the gdb's so_list based on .interp name. The problem: when the "real" libc is mapped, gdb will update_solib_list and determine that ldqnx is now missing from the inferior's linkmap and thus disable all the breakpoints set in it. I want to avoid disabling the breakpoints and let gdb "know" that newly mapped libc is, in fact, ldqnx mapped by default_sos; being one the same, all the resolved addresses for breakpoints are valid. 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? Thank you, Aleksandar Ristovski QNX Software Systems