From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1311 invoked by alias); 9 Dec 2006 06:34:10 -0000 Received: (qmail 1302 invoked by uid 22791); 9 Dec 2006 06:34:08 -0000 X-Spam-Check-By: sourceware.org Received: from Unknown (HELO pdns.sankhya.co.in) (210.212.208.205) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 09 Dec 2006 06:33:56 +0000 Received: from sankhya.com (sankhya-external [192.168.1.2]) by pdns.sankhya.co.in (8.12.11/8.12.10) with ESMTP id kB95por2025571; Sat, 9 Dec 2006 11:21:50 +0530 Received: from sankhya.com (localhost [127.0.0.1]) by sankhya.com (8.12.8/8.12.5) with ESMTP id kB95uDeD024921; Sat, 9 Dec 2006 11:26:13 +0530 Received: from localhost (anithab@localhost) by sankhya.com (8.12.8/8.12.5/Submit) with ESMTP id kB95uBxM024917; Sat, 9 Dec 2006 11:26:12 +0530 Date: Sat, 09 Dec 2006 06:34:00 -0000 From: Anitha Boyapati To: Daniel Jacobowitz cc: gdb@sourceware.org Subject: Re: break points for shared libs In-Reply-To: <20061207150335.GA13887@nevyn.them.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/msg00071.txt.bz2 Hi, On Thu, 7 Dec 2006, Daniel Jacobowitz wrote: > On Thu, Dec 07, 2006 at 07:40:03PM +0530, Anitha Boyapati wrote: > > On Thu, 7 Dec 2006, Daniel Jacobowitz wrote: > > > > > On Thu, Dec 07, 2006 at 05:34:29PM +0530, Anitha Boyapati wrote: > > > > I want to set breakpoints in shared lib sources while executing another > > > > program.But the symbol is being overridden whenever I use > > > > > > > > file test.so > > > > > > Don't use file. It needs to be automatic or it won't work at all. > > > > > > > warning: shared library handler failed to enable breakpoint > > > > > > This is the problem. You didn't say what platform you're debugging, > > > how you're running GDB, or anything else - one of those is to blame. > > > > Sorry! > > gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20) > > This GDB was configured as "i386-redhat-linux-gnu". > > What system are you running GDB on? > > How are you running GDB? > > Please send a transcript of a session which demonstrates the warning. > Here is the sequence : ------------------------------------------------------------ (gdb) b child.cc:4 No symbol table is loaded. Use the "file" command. (gdb) file libmem.so Reading symbols from libmem.so...done. Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) b child.cc:4 Breakpoint 1 at 0xdf8: file child.cc, line 4. (gdb) run Starting program: /root/libmem.so Breakpoint 1 at 0x80000df8: file child.cc, line 4. warning: shared library handler failed to enable breakpoint ----------------------------------------------------------------- Actually my requirement is to make breakpoints work in a shared library while debugging another application which uses the above shared library. The child.cc is the source file for libmem.so (g++ -g -shared -o libmem.so child.cc) Please let me know how can i do this. -- Regards, Anitha B, Sankhya Technologies Private Limited.