public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: tom.fowler@hotmail.co.uk
To: gdb-gnats@sources.redhat.com
Subject: gdb/2426: Temporary breakpoint for "finish" command not cleaned up in MI mode
Date: Thu, 06 Mar 2008 17:48:00 -0000	[thread overview]
Message-ID: <20080306174516.10429.qmail@sourceware.org> (raw)


>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:


             reply	other threads:[~2008-03-06 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 17:48 tom.fowler [this message]
2008-03-06 19:48 Nick Roberts

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=20080306174516.10429.qmail@sourceware.org \
    --to=tom.fowler@hotmail.co.uk \
    --cc=gdb-gnats@sources.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).