From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10971 invoked by alias); 25 Aug 2003 20:33:40 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 10947 invoked from network); 25 Aug 2003 20:33:28 -0000 Received: from unknown (HELO mail.inka.de) (193.197.184.2) by sources.redhat.com with SMTP; 25 Aug 2003 20:33:28 -0000 Received: from raven.inka.de (uucp@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 19rO1n-0007zz-00; Mon, 25 Aug 2003 22:33:27 +0200 Received: from localhost (localhost [127.0.0.1]) by raven.inka.de (Postfix) with ESMTP id B3F721B8; Mon, 25 Aug 2003 22:32:37 +0200 (CEST) Received: by raven.inka.de (Postfix, from userid 500) id 6C3171C2; Mon, 25 Aug 2003 22:32:37 +0200 (CEST) Date: Mon, 25 Aug 2003 20:33:00 -0000 From: Josef Wolf To: Keith Seitz Cc: insight@sources.redhat.com Subject: Re: Problem with "finish" command in insight. Message-ID: <20030825203237.GB32349@raven.inka.de> References: <20030822223935.GA29951@raven.inka.de> <1061833167.1581.1.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1061833167.1581.1.camel@lindt.uglyboxes.com> User-Agent: Mutt/1.4i X-Virus-Scanned: by AMaViS snapshot-20020531 X-SW-Source: 2003-q3/txt/msg00126.txt.bz2 On Mon, Aug 25, 2003 at 10:39:27AM -0700, Keith Seitz wrote: > [Moved to correct list] [ Cc:'d to gdb list since I am no more sure that this is Insoght specific ] > On Fri, 2003-08-22 at 15:39, Josef Wolf wrote: > > I have noticed a problem with the "finish" command when insight is used. > > The finish command sets an invisible breakpoint in the calling function. > > For some reason this invisible breakpoint is not removed afterwards. > > Therefore all consecutive "continue" commands stumble over this invisible > > breakpoint. > > > > I can't reproduce this with plain gdb. When using insight, it doesn't make > > any difference whether the "finish"-button or the "finish" command from the > > console window is used. > > > > Have anyone seen such an effect? Or maybe someone can reproduce it? > > Maybe someone could give me a hint where I should dig for the bug? > > You must be using an older version of insight. It is insight-5.3. Your patch seems not to be included in 5.3 > I remember checking in a patch for this... > > 2002-11-06 Keith Seitz > * generic/gdbtk-hooks.c (gdbtk_call_command): Make a null > cleanup and run it after every issued gdb command. Apparently > some commands depend on this. [This should really be part of > main gdb...] In the meantime I have located the problem. It is in main gdb. This patch seems to fix it: --- gdb.orig/infcmd.c 2002-09-25 22:43:21.000000000 +0200 +++ gdb/infcmd.c 2003-08-25 19:45:58.000000000 +0200 @@ -1337,8 +1337,10 @@ "finish_command: function has no target type"); /* FIXME: Shouldn't we do the cleanups before returning? */ - if (TYPE_CODE (value_type) == TYPE_CODE_VOID) + if (TYPE_CODE (value_type) == TYPE_CODE_VOID) { + do_cleanups (old_chain); return; + } funcaddr = BLOCK_START (SYMBOL_BLOCK_VALUE (function)); I have no idea why original gdb-5.3 omitted the cleanups on TYPE_CODE_VOID. The FIXME indicates that the original autor was unsure about this, too ;-). This is exactly what triggered my problem. And it seems to exist in the main gdb program (although I could not trigger it in main gdb, but this might be by accident). Your patch seem to be more general, but it fixes only insight and not main gdb. So which patch would be the correct one? Or should both patches be included? Or better your patch and a similar (generic) patch for main gdb in addition? Thanks! -- Please visit and sign http://petition-eurolinux.org and http://www.ffii.org -- Josef Wolf -- jw@raven.inka.de --