This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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);
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]