From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14473 invoked by alias); 15 Mar 2006 03:45:59 -0000 Received: (qmail 14465 invoked by uid 22791); 15 Mar 2006 03:45:59 -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; Wed, 15 Mar 2006 03:45:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FJMxQ-0000To-18; Tue, 14 Mar 2006 22:45:56 -0500 Date: Wed, 15 Mar 2006 04:16:00 -0000 From: Daniel Jacobowitz To: Nai-Hsien Cc: gdb@sourceware.org Subject: Re: Debugging a shared library through gdbserver Message-ID: <20060315034555.GA1813@nevyn.them.org> Mail-Followup-To: Nai-Hsien , gdb@sourceware.org References: <063201c647e2$b2c39160$0102000a@loop.com.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <063201c647e2$b2c39160$0102000a@loop.com.tw> User-Agent: Mutt/1.5.8i 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-03/txt/msg00070.txt.bz2 On Wed, Mar 15, 2006 at 11:44:01AM +0800, Nai-Hsien wrote: > # load my executable file > (gdb) add-symbol-file console > add symbol table from file "console" at > # load my shared library > (gdb) add-symbol-file lib/libmylib.so.1.0.1 > add symbol table from file "lib/libmylib.so.1.0.1" at > (gdb) b clih_login > Breakpoint 1 at 0x10016238: file sysui.c, line 289. > (gdb) c Why are you doing any of this? Please tell us where you saw suggestions to use add-symbol-file in this way, so that we can correct them. Please take a look at "set solib-absolute-prefix". Use that, and the "file" command, before connecting to gdbserver and everything should work automatically. -- Daniel Jacobowitz CodeSourcery