From: Andreas Kaufmann <Andreas.Kaufmann@synopsys.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] Fix for 15072: stopped response missing for reverse-finish
Date: Mon, 22 Apr 2013 14:01:00 -0000 [thread overview]
Message-ID: <5570CCEF7886EE48BAAD632645A58FDA12829B3A@DE02WEMBXB.internal.synopsys.com> (raw)
Hi!
The following patch fixes the issue with "*stopped" response missing (for MI interface) when
"reverse-finish" command hits a breakpoint. Please see http://sourceware.org/bugzilla/show_bug.cgi?id=15072
This is quite nasty bug when using reverse debugging with Eclipse. Basically, without "*stopped"
response Eclipse will show state as "running" and the user has to restart the debug session.
Here is explanation why this change is needed.
GDB code has special handling for "forward finish", since returned value is included in the response:
static void
finish_forward (struct symbol *function, struct frame_info *frame)
{
. . .
add_continuation (tp, finish_command_continuation, cargs,
finish_command_continuation_free_arg);
. . .
static void
finish_command_continuation (void *arg, int err)
{
. . .
observer_notify_normal_stop (bs, 1 /* print frame */);
The above is not done (and nor needed) for "reverse-finish". So I added additional
check "execution_direction != EXEC_REVERSE" to ensure that observer_notify_normal_stop()
is called for "reverse-finish" from normal_stop() in gdb/infrun.c.
Please let me know if you have any comments!
Thanks,
Andreas Kaufmann
Synopsys Inc
2013-04-18 Andreas Kaufmann <Andreas.Kaufmann@synopsys.com>
PR gdb/15072
* infrun.c (normal_stop): Ensure "observer_notify_normal_stop" is called
when "reverse-finish" command hits a breakpoint.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.577
diff -u -p -r1.577 infrun.c
--- infrun.c 13 Mar 2013 18:34:53 -0000 1.577
+++ infrun.c 18 Apr 2013 13:45:09 -0000
@@ -6149,7 +6149,8 @@ done:
|| (!(inferior_thread ()->step_multi
&& inferior_thread ()->control.stop_step)
&& !(inferior_thread ()->control.stop_bpstat
- && inferior_thread ()->control.proceed_to_finish)
+ && inferior_thread ()->control.proceed_to_finish
+ && execution_direction != EXEC_REVERSE)
&& !inferior_thread ()->control.in_infcall))
{
if (!ptid_equal (inferior_ptid, null_ptid))
next reply other threads:[~2013-04-22 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 14:01 Andreas Kaufmann [this message]
2013-04-22 14:54 ` Abid, Hafiz
2013-04-25 8:19 ` Tom Tromey
2013-05-15 15:49 ` Pedro Alves
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=5570CCEF7886EE48BAAD632645A58FDA12829B3A@DE02WEMBXB.internal.synopsys.com \
--to=andreas.kaufmann@synopsys.com \
--cc=gdb-patches@sourceware.org \
/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