From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32442 invoked by alias); 27 Jul 2009 17:55:49 -0000 Received: (qmail 32421 invoked by uid 22791); 27 Jul 2009 17:55:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Jul 2009 17:55:42 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 849531301E; Mon, 27 Jul 2009 10:55:40 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost4.vmware.com (Postfix) with ESMTP id 7B8FBC9E73; Mon, 27 Jul 2009 10:55:40 -0700 (PDT) Message-ID: <4A6DE871.3060409@vmware.com> Date: Mon, 27 Jul 2009 17:55:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: "Anmol P. Paralkar" CC: Daniel Jacobowitz , "gdb@sourceware.org" Subject: Re: Cannot insert breakpoint -1. References: <20090724211855.GA23302@caradoc.them.org> <20090725022514.GA16383@caradoc.them.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-07/txt/msg00214.txt.bz2 Anmol P. Paralkar wrote: > On Fri, 24 Jul 2009, Daniel Jacobowitz wrote: > >> On Fri, Jul 24, 2009 at 05:00:45PM -0500, Anmol P. Paralkar wrote: >>> Yes, I see: >>> >>> (gdb) maintenance info breakpoints Num Type Disp Enb >>> Address What >>> -1 shlib events keep y 0x00110000 <_start> >>> >>> How do I delete it/prevent it from being set? Is this a configure >> time setting? >> >> It may help to use a powerpc-elf debugger instead. > > I tried powerpc-elf GDB, and it'll work (I see that I cannot set a > breakpoint in the application - but that seems to be a problem with > the application itself). > > -- > > I do have one question about powerpc-linux-gnu GDB; I see that the breakpoint > is inserted inspite of: > > (gdb) show stop-on-solib-events > Stopping for shared library events is 0. > > -- > > From breakpoint.h: > > /* Some dynamic linkers (HP, maybe Solaris) can arrange for special > code in the inferior to run when significant events occur in the > dynamic linker (for example a library is loaded or unloaded). > > By placing a breakpoint in this magic code GDB will get control > when these significant events occur. GDB can then re-examine > the dynamic linker's data structures to discover any newly loaded > dynamic libraries. */ > bp_shlib_event, > > -- > > I would assume that if stop-on-solib-events is 0, then it ought not to set > the -1 breakpoint. Please could you help understanding this part. Anmol, "stop-on-solib-events" means 'stop' as in "show the user a gdb prompt". If it's unset, we still insert the breakpoints so that we can handle the shared library events (read symbol files), we just don't go to the interactive prompt. I think it's really unusual for someone to want to actually go to the prompt when a shared lib event occurs, but normally we want symbols to be loaded. Don't know if there's any way to actually disable that... Michael