gdb/varobj: Only re-evaluate invalid globals during re_set
authorLancelot SIX <lancelot.six@amd.com>
Wed, 10 Aug 2022 21:23:29 +0000 (22:23 +0100)
committerLancelot SIX <lancelot.six@amd.com>
Thu, 11 Aug 2022 14:10:35 +0000 (15:10 +0100)
commit906dca17d429f468d49a6cc4753993581c51a899
treebedf64436956f8bd52c8084ff6c24a57261dcfa8
parentccb5e559ef13f1c7a32312199f7887b463c56216
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
gdb/varobj.c