Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: varobj bug?
Date: Sun, 07 Jun 2009 23:40:00 -0000	[thread overview]
Message-ID: <200906080041.07004.pedro@codesourcery.com> (raw)

[ Just stumbled on this while reading this code. ]

Isn't the patch below a bug fix?  FI possibly points at
the frame returned by:

 fi = find_frame_addr_in_frame_chain (frame);

not the originally selected frame.

Maybe this code should be using make_cleanup_restore_current_thread?

-- 
Pedro Alves

---
 gdb/varobj.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: src/gdb/varobj.c
===================================================================
--- src.orig/gdb/varobj.c	2009-06-08 00:37:55.000000000 +0100
+++ src/gdb/varobj.c	2009-06-08 00:38:47.000000000 +0100
@@ -577,7 +577,7 @@ varobj_create (char *objname,
       var->root->rootvar = var;
 
       /* Reset the selected frame */
-      if (fi != NULL)
+      if (old_fi != NULL)
 	select_frame (old_fi);
     }
 


             reply	other threads:[~2009-06-07 23:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 23:40 Pedro Alves [this message]
2009-06-09 21:11 ` Tom Tromey
2009-06-10 23:41   ` 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=200906080041.07004.pedro@codesourcery.com \
    --to=pedro@codesourcery.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