binutils-gdb/gdb/testsuite/gdb.mi
Lancelot SIX 6c96b937df gdb/varobj: Fix varobj_invalidate_iter
The varobj_invalidate function is meant to be called when restarting a
process, and check at this point if some of the previously existing
varobj can be recreated in the context of the new process.

Two kind of varobj are subject to re-creation:  global varobj (i.e.
varobj which reference a global variable), and floating varobj (i.e.
varobj which are always re-evaluated in the context of whatever is
the currently selected frame at the time of evaluation).

However, in the re-creation process, the varobj_invalidate_iter
recreates floating varobj as non-floating, due to an invalid parameter.
This patches fixes this and adds an assertion to check that if a varobj
is indeed recreated, it matches the original varobj "floating" property.

Another issue is that if at this recreation time the expression watched
by the floating varobj is not in scope, then the varobj is marked as
invalid.  If later the user selects a frame where the expression becomes
valid, the varobj remains invalid and this is wrong.  This patch also
make sure that floating varobj are not invalidated if they cannot be
evaluated.

The last important thing to note is that due to the previous patch, when
varobj_invalidate is executed (in the context of a new process), any
global var have already been invalidated (this has been done when the
objfile it referred to got invalidated).  As a consequence,
varobj_invalidate tries to recreate vars which are already marked as
invalid.  This does not entirely feels right, but I keep this behavior
for backward compatibility.

Tested on x86_64-linux
2022-07-26 08:27:27 +01:00
..
array.f90
basics.c
ChangeLog-1999-2003
dw2-ref-missing-frame-func.c
dw2-ref-missing-frame-main.c
dw2-ref-missing-frame.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
dw2-ref-missing-frame.S
gdb669.exp
gdb680.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
gdb701.c
gdb701.exp
gdb792.cc
gdb792.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
gdb2549.exp
interrupt-thread-group.c
interrupt-thread-group.exp
list-thread-groups-available.c
list-thread-groups-available.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
list-thread-groups-no-inferior.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi2-amd64-entry-value.c
mi2-amd64-entry-value.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi2-amd64-entry-value.s
mi2-cli-display.c
mi2-cli-display.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi2-prompt.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi2-var-child.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-add-inferior.exp
mi-async-run.c
mi-async-run.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-async.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-basics.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-break-qualified.cc
mi-break-qualified.exp gdb/testsuite: small cleanup in mi-break-qualified.exp 2022-05-03 10:30:33 +01:00
mi-break.exp Remove "-break-insert -r" tests 2022-06-06 12:42:12 -06:00
mi-breakpoint-changed.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-breakpoint-multiple-locations.cc
mi-breakpoint-multiple-locations.exp
mi-catch-cpp-exceptions.cc
mi-catch-cpp-exceptions.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-catch-load-so.c
mi-catch-load.c
mi-catch-load.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-cli.exp
mi-cmd-error.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-cmd-param-changed.exp
mi-cmd-user-context.c
mi-cmd-user-context.exp
mi-complete.cc
mi-complete.exp
mi-condbreak-call-thr-state-mt.c
mi-condbreak-call-thr-state-st.c
mi-condbreak-call-thr-state.c
mi-condbreak-call-thr-state.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-console.c
mi-console.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-corefile.c Always emit =thread-exited notifications, even if silent 2022-07-11 19:43:37 +01:00
mi-corefile.exp Always emit =thread-exited notifications, even if silent 2022-07-11 19:43:37 +01:00
mi-detach.exp
mi-disassemble.exp
mi-dprintf-pending.c
mi-dprintf-pending.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-dprintf-pendshr.c
mi-dprintf.c
mi-dprintf.exp
mi-editing.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-eval.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-exec-run.exp gdb/testsuite: change mi_gdb_start to take a list of flags 2022-05-03 10:30:33 +01:00
mi-exit-code.c
mi-exit-code.exp
mi-file-transfer.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-file.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-fill-memory.exp
mi-fortran-modules-2.f90
mi-fortran-modules.exp
mi-fortran-modules.f90
mi-frame-regs.exp
mi-fullname-deleted.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-hack-cli.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-i-cmd.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-info-os.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-info-sources-base.c
mi-info-sources.c
mi-info-sources.exp
mi-inheritance-syntax-error.cc
mi-inheritance-syntax-error.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-language.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-linespec-err-cp.cc
mi-linespec-err-cp.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-logging.exp
mi-memory-changed.exp
mi-multi-commands.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-nonstop-exit.exp
mi-nonstop.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-ns-stale-regcache.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-nsintrall.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-nsmoribund.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-nsthrexec.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-pending.c
mi-pending.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-pendshr2.c
mi-pendshr.c
mi-pthreads.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-read-memory.c
mi-read-memory.exp
mi-record-changed.exp
mi-reg-undefined.c
mi-reg-undefined.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-reg-undefined.S
mi-regs.exp
mi-return.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-reverse.exp
mi-simplerun.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-solib.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-stack.c
mi-stack.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-start.c
mi-start.exp
mi-stepi.exp
mi-stepn.c
mi-stepn.exp
mi-sym-info-1.c
mi-sym-info-2.c
mi-sym-info.exp
mi-syn-frame.c
mi-syn-frame.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-threads-interrupt.c
mi-threads-interrupt.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-undefined-cmd.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-until.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-block.exp [gdb/testsuite] Detect change instead of init in gdb.mi/mi-var-block.exp 2022-06-02 20:40:06 +02:00
mi-var-child-f.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-child.c
mi-var-child.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-cmd.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-cp.cc
mi-var-cp.exp gdb/testsuite: remove unneeded calls to get_compiler_info 2022-06-24 15:07:29 +01:00
mi-var-create-rtti.c
mi-var-create-rtti.exp
mi-var-display.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-invalidate-shlib-lib.c gdb/varobj: Fix use after free in varobj 2022-07-26 08:27:27 +01:00
mi-var-invalidate-shlib.c gdb/varobj: Fix varobj_invalidate_iter 2022-07-26 08:27:27 +01:00
mi-var-invalidate-shlib.exp gdb/varobj: Fix varobj_invalidate_iter 2022-07-26 08:27:27 +01:00
mi-var-invalidate.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-list-children-invalid-grandchild.c
mi-var-list-children-invalid-grandchild.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-var-rtti.cc
mi-var-rtti.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-vla-c99.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-vla-fortran.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-watch-nonstop.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
mi-watch.exp
new-ui-mi-sync.c
new-ui-mi-sync.exp
non-stop-exit.c
non-stop.c
ns-stale-regcache.c
nsintrall.c
nsmoribund.c
nsthrexec.c
pending.c
pendshr1.c
pendshr2.c
pr11022.c
pr11022.exp
pthreads.c
solib-lib.c
solib-main.c
testcmds
until.c
user-selected-context-sync.c
user-selected-context-sync.exp [gdb/testsuite] Handle init errors in gdb.mi/user-selected-context-sync.exp 2022-05-08 18:32:05 +02:00
var-cmd.c [gdb/testsuite] Detect change instead of init in gdb.mi/mi-var-block.exp 2022-06-02 20:40:06 +02:00
vla.c
vla.f90
watch-nonstop.c