From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32180 invoked by alias); 4 Dec 2006 22:25:21 -0000 Received: (qmail 32163 invoked by uid 22791); 4 Dec 2006 22:25:18 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Dec 2006 22:25:09 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id DF87F103B1B; Mon, 4 Dec 2006 14:25:05 -0800 (PST) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11402-02-78; Mon, 4 Dec 2006 14:25:04 -0800 (PST) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 9BD281035D6; Mon, 4 Dec 2006 14:25:04 -0800 (PST) Received: from 192.168.92.189 ([192.168.92.189]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Mon, 4 Dec 2006 22:25:04 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 04 Dec 2006 14:25:03 -0800 Subject: Re: GDB solib interface From: Michael Snyder To: "Smith, Stephen (SWCOE)" Cc: General GDB Mailing List In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 04 Dec 2006 22:25:00 -0000 Message-Id: <1165271102.2036.114.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 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: 2006-12/txt/msg00032.txt.bz2 On Mon, 2006-12-04 at 15:12 -0700, Smith, Stephen (SWCOE) wrote: > I'm sorry - way back when Kevin asked that I investigate this. So now I > am. > > Anyway - Pretend that my "custom" GDB remote.c has been told that a > library has been loaded - what would I need to write to use the solib > interface? Another way of asking the question would be, what would I > need to add to my remote interface file (remote.c) to have it load the > symbols. Presumably something like solib_add() or add_symbol_file(). Your back-end (eg. remote target) should give you the name of a shared library (with or without path), and then gdb has built-in schemes for finding it. If your target libraries are different from your host libraries (which they usually are), you will need to tell GDB where to find them (on the host file system), using the commands set solib-search-path and set solib-absolute-prefix Daniel, I would have assumed that this stuff was working with linux-x-linux and gdbserver? > > I am not looking for a command, per se, just trying to figure out what > functions/structures etc I need to write to have my "custom" GDB load > the libraries symbols. > > -----Original Message----- > From: Daniel Jacobowitz [mailto:drow@false.org] > Sent: Monday, December 04, 2006 2:58 PM > To: Smith, Stephen (SWCOE) > Cc: General GDB Mailing List > Subject: Re: GDB solib interface > > On Mon, Dec 04, 2006 at 02:55:28PM -0700, Smith, Stephen (SWCOE) wrote: > > I am running GDB to debug a remote application. If I find that a > shared > > library has been loaded, I would like to use the solib interface to > load > > the appropriate shared library symbols. > > > > So lets assume that I have the file name of the shared library, that > was > > just loaded, how do I inform the solib subsystem that to load the > > symbols. > > There's no command for this. The solib system is designed for targets > where the target can report that the library was loaded, or where GDB > can otherwise detect it. If you're willing to have a custom GDB for > your platform, you might be able to make it examine the shared library > table in your target, assuming there is one. >