This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
varobj bug?
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 8 Jun 2009 00:41:06 +0100
- Subject: varobj bug?
[ 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);
}