From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16326 invoked by alias); 7 Jun 2009 23:40:15 -0000 Received: (qmail 16314 invoked by uid 22791); 7 Jun 2009 23:40:14 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Jun 2009 23:40:07 +0000 Received: (qmail 21736 invoked from network); 7 Jun 2009 23:40:05 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Jun 2009 23:40:05 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: varobj bug? Date: Sun, 07 Jun 2009 23:40:00 -0000 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906080041.07004.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00165.txt.bz2 [ 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); }