public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: gdb/2426: Temporary breakpoint for "finish" command not cleaned up in MI mode
@ 2008-03-06 19:48 Nick Roberts
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 2008-03-06 19:48 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR gdb/2426; it has been noted by GNATS.

From: Nick Roberts <nickrob@snap.net.nz>
To: tom.fowler@hotmail.co.uk
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/2426: Temporary breakpoint for "finish" command not cleaned up in MI mode
Date: Fri, 7 Mar 2008 08:43:19 +1300

  > The "finish" command appears to work by setting a temporary breakpoint which
  > is deleted immediately after it is triggered. Using my version of GDB in
  > normal console mode this works as expected, but using the same executable in
  > "--interpreter=mi" mode, the "finish" command leaves its breakpoint around
  > to fire spuriously later on. Having looked into this a little, it seems to
  > be a regression, in that the problem does not occur for an earlier version
  > of GDB (v 6.0.x).
 
 Looks like it's fixed in GDB in the Sourceware CVS repository.  If you can't
 get this, GDB 6.8 should be released very shortly.
 
 -- 
 Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 2+ messages in thread

* gdb/2426: Temporary breakpoint for "finish" command not cleaned up in MI mode
@ 2008-03-06 17:48 tom.fowler
  0 siblings, 0 replies; 2+ messages in thread
From: tom.fowler @ 2008-03-06 17:48 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2426
>Category:       gdb
>Synopsis:       Temporary breakpoint for "finish" command not cleaned up in MI mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 06 17:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     tom.fowler@hotmail.co.uk
>Release:        6.7.1
>Organization:
>Environment:
Linux host, arm-elf remote target
>Description:
The "finish" command appears to work by setting a temporary breakpoint which is deleted immediately after it is triggered. Using my version of GDB in normal console mode this works as expected, but using the same executable in "--interpreter=mi" mode, the "finish" command leaves its breakpoint around to fire spuriously later on. Having looked into this a little, it seems to be a regression, in that the problem does not occur for an earlier version of GDB (v 6.0.x).
>How-To-Repeat:
In MI mode, debug a simple test case like:

----------
int x=0;
void f2(void) {
    x=3;
}
void f1(void) {
    x=1;
    f2();
    x=2;
}
int main() {
    for(;;)
        f1();
}
----------
Run into f2(), e.g.:
   > advance f2
Use "finish" to run until out of f2()
   > finish
Now continue
   > cont
In the error case execution will stop in f1 again (after the call to f2), next time the loop in main is executed.
>Fix:
Not clear to me. Comparing the source of mi-main.c for v6.0.x (working) against v6.7.1 (broken), the call to mi_execute_cli_command() has been replaced by a similar call to mi_cmd_interpreter_exec(), but unfortunately somehow the required call to do_cleanups() has been lost.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-06 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 19:48 gdb/2426: Temporary breakpoint for "finish" command not cleaned up in MI mode Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
2008-03-06 17:48 tom.fowler

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).