From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1713 invoked by alias); 23 May 2003 13:13:07 -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 1613 invoked from network); 23 May 2003 13:13:04 -0000 Received: from unknown (HELO auemail2.firewall.lucent.com) (192.11.223.163) by sources.redhat.com with SMTP; 23 May 2003 13:13:04 -0000 Received: from nbgif1.de.lucent.com (h135-248-192-26.lucent.com [135.248.192.26]) by auemail2.firewall.lucent.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id h4NDD2K02027 for ; Fri, 23 May 2003 09:13:02 -0400 (EDT) Received: from sfsws1.de.lucent.com (sfsws1 [135.248.217.84]) by nbgif1.de.lucent.com (8.8.8/8.8.5) with ESMTP id PAA10309 for ; Fri, 23 May 2003 15:12:57 +0200 (MEST) Received: from sfsw51.de.lucent.com (sfsw51 [135.248.216.225]) by sfsws1.de.lucent.com (8.11.7+Sun/8.8.5) with ESMTP id h4NDCvT18457 for ; Fri, 23 May 2003 15:12:57 +0200 (MEST) Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.7+Sun/8.8.8) id h4NDCua22802; Fri, 23 May 2003 15:12:56 +0200 (MEST) X-Authentication-Warning: sfsw51.de.lucent.com: kzeitler set sender to kzeitler@lucent.com using -f To: gdb Subject: Re: calling functions in gdb sometimes doesn't work X-Antipastobozoticataclysm: Bariumenemanilow From: Klaus Zeitler Date: Fri, 23 May 2003 13:13:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00309.txt.bz2 >>>>> "Andrew" == Andrew Cagney writes: Andrew> >> Hi, >> with gdb 5.2 (Solaris 5.8) sometimes calling a function, Andrew> >> e.g. hello(){printf("hello\n");}, results in the following message: >> (gdb) p hello() Andrew> >> The program being debugged stopped while in a function called from GDB. >> When the function (hello) is done executing, GDB will silently >> stop (instead of continuing to evaluate the expression containing >> the function call). >> When I try to continue my program it appears as if this function didn't >> get call at all. Andrew> Andrew> Check which thread has stopped. The one where I'm just at when I call a function. Actually the message from above appears only when I've some breakpoint defined, in which gdb would eventually run into, when I continue. If there's no breakpoint, gdb will ignore my function call and continue the program, but it'll show this message when I interrupt the program again. Klaus -- ------------------------------------------ | Klaus Zeitler Lucent Technologies | | Email: kzeitler@lucent.com | ------------------------------------------ --- Idiot, n.: A member of a large and powerful tribe whose influence in human affairs has always been dominant and controlling. -- Ambrose Bierce, "The Devil's Dictionary"