public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Josef Wolf <jw@raven.inka.de>
To: Keith Seitz <keiths@redhat.com>
Cc: insight@sources.redhat.com
Subject: Re: Problem with "finish" command in insight.
Date: Mon, 25 Aug 2003 20:33:00 -0000	[thread overview]
Message-ID: <20030825203237.GB32349@raven.inka.de> (raw)
In-Reply-To: <1061833167.1581.1.camel@lindt.uglyboxes.com>

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  <keiths@redhat.com>
>         * 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 --

  reply	other threads:[~2003-08-25 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030822223935.GA29951@raven.inka.de>
2003-08-25 17:37 ` Keith Seitz
2003-08-25 20:33   ` Josef Wolf [this message]
2003-08-25 20:51     ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030825203237.GB32349@raven.inka.de \
    --to=jw@raven.inka.de \
    --cc=insight@sources.redhat.com \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).