From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11368 invoked by alias); 8 Jan 2007 15:15:22 -0000 Received: (qmail 11359 invoked by uid 22791); 8 Jan 2007 15:15:22 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 08 Jan 2007 15:15:12 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H3wDO-0003kQ-Eu; Mon, 08 Jan 2007 10:15:10 -0500 Date: Mon, 08 Jan 2007 15:15:00 -0000 From: Daniel Jacobowitz To: Mathieu Lacage Cc: gdb@sourceware.org Subject: Re: gdb and dynamic loader namespaces Message-ID: <20070108151510.GA14359@nevyn.them.org> Mail-Followup-To: Mathieu Lacage , gdb@sourceware.org References: <1168268998.21818.44.camel@garfield.inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1168268998.21818.44.camel@garfield.inria.fr> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-01/txt/msg00116.txt.bz2 On Mon, Jan 08, 2007 at 04:09:58PM +0100, Mathieu Lacage wrote: > So, I tried to figure out how I could fix this in gdb: a bit of > debugging shows that gdb is notified of dlmopen calls through the > r_debug structure since "set stop-on-solib-events 1" triggers correctly > an event upon dlmopen. The question then is why gdb does not add the new > binary to its map. Maybe someone more knowledgeable than me about the > layout of the gdb code source could point me to the piece of code which > updates and manipulates the gdb map of binaries used during symbol > lookup ? (I am using an x86 linux system) It's in solib-svr4.c. Look especially at current_sos and compare that to where glibc adds things in namespaces. I doubt they're on the same list, and in fact they may not even be listed in the public part of struct r_debug. I'm not sure what gdb would really do with them either. It doesn't support multiple namespaces of symbols. -- Daniel Jacobowitz CodeSourcery