From 906dca17d429f468d49a6cc4753993581c51a899 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Wed, 10 Aug 2022 22:23:29 +0100 Subject: gdb/varobj: Only re-evaluate invalid globals during re_set When doing varobj_re_set, we currently try to recreate floating varobj. This was introduced by 4e969b4f0128 "Re-evaluate floating varobj as part of varobj_invalidate" to deal with use a after free issue. However since bc20e562ec0 "Fix use after free in varobj" we now ensure that we never have dangling pointers so this all recreation is not strictly needed anymore for floating varobjs. This commit proposes to remove this recreation process for floating varobjs. Tested on x86_64-linux. --- gdb/testsuite/gdb.mi/mi-var-invalidate.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/testsuite/gdb.mi') diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp index 1b2c68d..3485156 100644 --- a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp +++ b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp @@ -75,8 +75,8 @@ mi_runto_main # Change format of floating variable immediately after reload reveals a # bug where gdb still uses a free'd pointer. mi_gdb_test "-var-set-format float_simple hexadecimal" \ - "\\^done,format=\"hexadecimal\",value=\"\\\[-1\\\]\"" \ - "set format variable float_simple" + "\\^done,format=\"hexadecimal\",value=\"\\\[3\\\]\"" \ + "set format variable float_simple" # Check local variable is "invalid". mi_gdb_test "-var-update linteger" \ -- cgit v1.1