* Re: Problem with "finish" command in insight.
[not found] <20030822223935.GA29951@raven.inka.de>
@ 2003-08-25 17:37 ` Keith Seitz
2003-08-25 20:33 ` Josef Wolf
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2003-08-25 17:37 UTC (permalink / raw)
To: Josef Wolf; +Cc: insight
[Moved to correct list]
On Fri, 2003-08-22 at 15:39, Josef Wolf wrote:
> Hello!
>
> 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. 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...]
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with "finish" command in insight.
2003-08-25 17:37 ` Problem with "finish" command in insight Keith Seitz
@ 2003-08-25 20:33 ` Josef Wolf
2003-08-25 20:51 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Josef Wolf @ 2003-08-25 20:33 UTC (permalink / raw)
To: Keith Seitz; +Cc: insight
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 --
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with "finish" command in insight.
2003-08-25 20:33 ` Josef Wolf
@ 2003-08-25 20:51 ` Keith Seitz
0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2003-08-25 20:51 UTC (permalink / raw)
To: Josef Wolf; +Cc: insight
On Mon, 2003-08-25 at 13:32, Josef Wolf wrote:
> 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?
My patch fixes insight so that it's main loop behaves the same as the
console's command loop.
Your patch addresses a slightly different problem: one with gdb. IMO,
you should use my patch AND your patch if that fixes gdb. If the finish
problem you are seeing in gdb still exists, I recommend filing a bug
report in the gdb database and attaching your patch. I'm sure they'd
welcome that.
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-25 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030822223935.GA29951@raven.inka.de>
2003-08-25 17:37 ` Problem with "finish" command in insight Keith Seitz
2003-08-25 20:33 ` Josef Wolf
2003-08-25 20:51 ` Keith Seitz
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).