Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Cc: Michael Snyder <msnyder@vmware.com>,
	Marc Khouzam <marc.khouzam@ericsson.com>
Subject: [RFA] Patch to fix reverse return from subroutine error
Date: Thu, 11 Jun 2009 08:27:00 -0000	[thread overview]
Message-ID: <daef60380906110127p5a834832k557f01e12d7a40e2@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

Hi,

This patch is to fix bug in http://sourceware.org/ml/gdb/2009-06/msg00089.html

2009-06-11  Hui Zhu  <teawater@gmail.com>

	* infrun.c (handle_inferior_event): Reverse return from
	subroutine doesn't use code "infrun: stepped into subroutine".

There still are 3 reverse patches like it need be review:
http://sourceware.org/ml/gdb-patches/2009-05/msg00103.html
http://sourceware.org/ml/gdb-patches/2009-05/msg00104.html
http://sourceware.org/ml/gdb-patches/2009-05/msg00105.html

And other one need to be comment:
http://sourceware.org/ml/gdb-patches/2009-05/msg00078.html

Maybe some nice people can spend sometime on these poor babies.  :)

Thanks,
Hui

[-- Attachment #2: fix-reverse-return-from-subroutine.txt --]
[-- Type: text/plain, Size: 740 bytes --]

---
 infrun.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/infrun.c
+++ b/infrun.c
@@ -3708,7 +3708,12 @@ infrun: not switching back to stepped th
 		    ecs->event_thread->step_frame_id)
       && (frame_id_eq (frame_unwind_id (get_current_frame ()),
 		       ecs->event_thread->step_frame_id)
-	  || execution_direction == EXEC_REVERSE))
+	  || (execution_direction == EXEC_REVERSE
+	      && ecs->event_thread->step_frame_id.stack_addr_p
+	      && get_frame_id (get_current_frame ()).stack_addr_p
+              && !gdbarch_inner_than (current_gdbarch,
+				      ecs->event_thread->step_frame_id.stack_addr,
+				      get_frame_id (get_current_frame()).stack_addr))))
     {
       CORE_ADDR real_stop_pc;
 

             reply	other threads:[~2009-06-11  8:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  8:27 Hui Zhu [this message]
2009-06-27 18:59 ` Michael Snyder
2009-06-27 19:48   ` Pedro Alves
2009-06-27 19:56     ` Daniel Jacobowitz
2009-06-27 20:59     ` Michael Snyder
2009-06-27 21:12       ` Daniel Jacobowitz
2009-06-28 18:46         ` Michael Snyder
2009-06-28 21:09           ` Daniel Jacobowitz
2009-06-29  0:38             ` Hui Zhu

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=daef60380906110127p5a834832k557f01e12d7a40e2@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=msnyder@vmware.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