From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19719 invoked by alias); 23 May 2006 22:07:45 -0000 Received: (qmail 19563 invoked by uid 22791); 23 May 2006 22:07:44 -0000 X-Spam-Check-By: sourceware.org Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (32.97.182.142) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 23 May 2006 22:07:39 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k4NM7ajK018691 for ; Tue, 23 May 2006 18:07:36 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k4NM7ZW6070686 for ; Tue, 23 May 2006 18:07:35 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k4NM7ZcD023718 for ; Tue, 23 May 2006 18:07:35 -0400 Received: from dufur.beaverton.ibm.com (dufur.beaverton.ibm.com [9.47.22.20]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k4NM7YZp023685 for ; Tue, 23 May 2006 18:07:35 -0400 Subject: Chicken-or-egg problem with shared libraries From: PAUL GILLIAM Reply-To: pgilliam@us.ibm.com To: gdb@sources.redhat.com Content-Type: text/plain Date: Tue, 23 May 2006 22:59:00 -0000 Message-Id: <1148418266.315.45.camel@dufur.beaverton.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00338.txt.bz2 In solib-svr4.c (enable_break), GDB tries to set a breakpoint in the dynamic loader (at "_dl_debug_state") so that shared objects can be tracked as they are loaded and unloaded. The problem (on gnu/linux PowerPC64 at least) is that the dynamic loader is it's self a shared object and its minimal symbols are not loaded when "enable_break" is called. I have two ideas for fixing this: 1) pre-load the dynamic loaders minimal symbols so that when "enable_break()" is called, "_dl_debug_state" will be found and all is well and 2) allow "enable_break()" to set a pending breakpoint. The second idea has the problem of which name to use: "enable_break()" currently tries five or six. I like the first idea, but something is nagging the back of my mind about it, but I don't know what. I think we're talking about less the 20 minimal symbols and the name of the of the dynamic linker is in the elf section '.interp'. So that sounds straight forward. Any advice? -=# Paul #=-