From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23958 invoked by alias); 22 May 2003 13:52:31 -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 23929 invoked from network); 22 May 2003 13:52:30 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 22 May 2003 13:52:30 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 169692B2F; Thu, 22 May 2003 09:52:23 -0400 (EDT) Message-ID: <3ECCD616.3040108@redhat.com> Date: Thu, 22 May 2003 13:52:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Zeitler Cc: gdb@sources.redhat.com Subject: Re: calling functions in gdb sometimes doesn't work References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00293.txt.bz2 > Hi, > > with gdb 5.2 (Solaris 5.8) sometimes calling a function, > e.g. hello(){printf("hello\n");}, results in the following message: > > (gdb) p hello() > > 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. > Unfortunately this doesn't happen with simple example programs. > The program I'm debugging is threaded (maybe this has something > to do with it). Check which thread has stopped. I'm not sure that GDB's behavior, when trying to do an inferior function call on a threaded program is, er, very well defined :-( > When I switch back to gdb 5.0, calling functions in the same program > works just fine. Now that's a worry. > Does anybody have an idea what's causing this. Andrew