From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25652 invoked by alias); 9 Dec 2006 15:14:28 -0000 Received: (qmail 25642 invoked by uid 22791); 9 Dec 2006 15:14:27 -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; Sat, 09 Dec 2006 15:14:19 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1Gt3u5-0005oN-Bs; Sat, 09 Dec 2006 10:14:17 -0500 Date: Sat, 09 Dec 2006 15:14:00 -0000 From: Daniel Jacobowitz To: Anitha Boyapati Cc: gdb@sourceware.org Subject: Re: break points for shared libs Message-ID: <20061209151416.GA22239@nevyn.them.org> Mail-Followup-To: Anitha Boyapati , gdb@sourceware.org References: <20061207150335.GA13887@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2006-12/txt/msg00072.txt.bz2 On Sat, Dec 09, 2006 at 11:26:11AM +0530, Anitha Boyapati wrote: > 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. You should not have to do anything. Don't mention the shared library explicitly to GDB - it doesn't need that. Just load the real application that you want to debug and run it. You should be able to set a breakpoint in the shared library. If you are using an old version of GDB, upgrade to the latest release. -- Daniel Jacobowitz CodeSourcery