From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22558 invoked by alias); 20 Sep 2002 15:46:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22551 invoked from network); 20 Sep 2002 15:46:51 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 20 Sep 2002 15:46:51 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8KFTQi19458 for ; Fri, 20 Sep 2002 11:29:26 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8KFkmx31776; Fri, 20 Sep 2002 11:46:49 -0400 Received: from romulus.sfbay.redhat.com (IDENT:8bfVfuQWp7QxbBytyLuAqN5B1aITJGes@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8KFklC10514; Fri, 20 Sep 2002 08:46:47 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g8KFkj125831; Fri, 20 Sep 2002 08:46:45 -0700 Date: Fri, 20 Sep 2002 08:46:00 -0000 From: Kevin Buettner Message-Id: <1020920154645.ZM25830@localhost.localdomain> In-Reply-To: Peter Jay Salzman "question about conditional breaking" (Sep 20, 12:36am) References: <20020920073648.GA21072@dirac.org> To: Peter Jay Salzman , Gdb Mailing List Subject: Re: question about conditional breaking MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-09/txt/msg00315.txt.bz2 On Sep 20, 12:36am, Peter Jay Salzman wrote: > so it appears that here's the rule: > > you're allowed to use any function, even library functions, provided that: > > 1. the library is linked to your application > 2. you actually _use_ the function somewhere in your code. > > to be honest, i'm not the least surprised by condition 1, but i'm > shocked by condition 2. Is the library in question a shared library? I'm not all that surprised by condition 2 if you attempt to set these conditional breakpoints prior to running gdb (and thus loading the shared library). For library functions which are used by your application, you're able to find them prior to loading the shared library due to the fact that these symbols have PLT entries. Once the shared library has been loaded, you should be able to find other library functions too. Something to try: Put a breakpoint on main and run the program. Once the breakpoint has been hit, try adding your conditional breakpoints. My guess is that you'll be able to add those that you couldn't previously add. BTW, I believe that this is the same problem as being unable to put breakpoints on shared library functions (which are not directly used by the application) prior to the shared library being loaded. Kevin