From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15123 invoked by alias); 22 May 2003 15:46:13 -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 1491 invoked from network); 22 May 2003 15:40:11 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 22 May 2003 15:40:11 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Is9z-00021s-00; Thu, 22 May 2003 10:39:15 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19Is9L-0006lr-00; Thu, 22 May 2003 11:38:35 -0400 Date: Thu, 22 May 2003 15:46:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Klaus Zeitler , gdb@sources.redhat.com Subject: Re: calling functions in gdb sometimes doesn't work Message-ID: <20030522153835.GA25965@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Klaus Zeitler , gdb@sources.redhat.com References: <3ECCD616.3040108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ECCD616.3040108@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00295.txt.bz2 On Thu, May 22, 2003 at 09:52:22AM -0400, Andrew Cagney wrote: > >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 :-( In fact, it really doesn't work right. Jim discovered a few months ago that other threads will be resumed. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer