mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
6c96b937df
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 |
||
---|---|---|
.. | ||
array.f90 | ||
basics.c | ||
ChangeLog-1999-2003 | ||
dw2-ref-missing-frame-func.c | ||
dw2-ref-missing-frame-main.c | ||
dw2-ref-missing-frame.exp | ||
dw2-ref-missing-frame.S | ||
gdb669.exp | ||
gdb680.exp | ||
gdb701.c | ||
gdb701.exp | ||
gdb792.cc | ||
gdb792.exp | ||
gdb2549.exp | ||
interrupt-thread-group.c | ||
interrupt-thread-group.exp | ||
list-thread-groups-available.c | ||
list-thread-groups-available.exp | ||
list-thread-groups-no-inferior.exp | ||
mi2-amd64-entry-value.c | ||
mi2-amd64-entry-value.exp | ||
mi2-amd64-entry-value.s | ||
mi2-cli-display.c | ||
mi2-cli-display.exp | ||
mi2-prompt.exp | ||
mi2-var-child.exp | ||
mi-add-inferior.exp | ||
mi-async-run.c | ||
mi-async-run.exp | ||
mi-async.exp | ||
mi-basics.exp | ||
mi-break-qualified.cc | ||
mi-break-qualified.exp | ||
mi-break.exp | ||
mi-breakpoint-changed.exp | ||
mi-breakpoint-multiple-locations.cc | ||
mi-breakpoint-multiple-locations.exp | ||
mi-catch-cpp-exceptions.cc | ||
mi-catch-cpp-exceptions.exp | ||
mi-catch-load-so.c | ||
mi-catch-load.c | ||
mi-catch-load.exp | ||
mi-cli.exp | ||
mi-cmd-error.exp | ||
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 | ||
mi-console.c | ||
mi-console.exp | ||
mi-corefile.c | ||
mi-corefile.exp | ||
mi-detach.exp | ||
mi-disassemble.exp | ||
mi-dprintf-pending.c | ||
mi-dprintf-pending.exp | ||
mi-dprintf-pendshr.c | ||
mi-dprintf.c | ||
mi-dprintf.exp | ||
mi-editing.exp | ||
mi-eval.exp | ||
mi-exec-run.exp | ||
mi-exit-code.c | ||
mi-exit-code.exp | ||
mi-file-transfer.exp | ||
mi-file.exp | ||
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 | ||
mi-hack-cli.exp | ||
mi-i-cmd.exp | ||
mi-info-os.exp | ||
mi-info-sources-base.c | ||
mi-info-sources.c | ||
mi-info-sources.exp | ||
mi-inheritance-syntax-error.cc | ||
mi-inheritance-syntax-error.exp | ||
mi-language.exp | ||
mi-linespec-err-cp.cc | ||
mi-linespec-err-cp.exp | ||
mi-logging.exp | ||
mi-memory-changed.exp | ||
mi-multi-commands.exp | ||
mi-nonstop-exit.exp | ||
mi-nonstop.exp | ||
mi-ns-stale-regcache.exp | ||
mi-nsintrall.exp | ||
mi-nsmoribund.exp | ||
mi-nsthrexec.exp | ||
mi-pending.c | ||
mi-pending.exp | ||
mi-pendshr2.c | ||
mi-pendshr.c | ||
mi-pthreads.exp | ||
mi-read-memory.c | ||
mi-read-memory.exp | ||
mi-record-changed.exp | ||
mi-reg-undefined.c | ||
mi-reg-undefined.exp | ||
mi-reg-undefined.S | ||
mi-regs.exp | ||
mi-return.exp | ||
mi-reverse.exp | ||
mi-simplerun.exp | ||
mi-solib.exp | ||
mi-stack.c | ||
mi-stack.exp | ||
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 | ||
mi-threads-interrupt.c | ||
mi-threads-interrupt.exp | ||
mi-undefined-cmd.exp | ||
mi-until.exp | ||
mi-var-block.exp | ||
mi-var-child-f.exp | ||
mi-var-child.c | ||
mi-var-child.exp | ||
mi-var-cmd.exp | ||
mi-var-cp.cc | ||
mi-var-cp.exp | ||
mi-var-create-rtti.c | ||
mi-var-create-rtti.exp | ||
mi-var-display.exp | ||
mi-var-invalidate-shlib-lib.c | ||
mi-var-invalidate-shlib.c | ||
mi-var-invalidate-shlib.exp | ||
mi-var-invalidate.exp | ||
mi-var-list-children-invalid-grandchild.c | ||
mi-var-list-children-invalid-grandchild.exp | ||
mi-var-rtti.cc | ||
mi-var-rtti.exp | ||
mi-vla-c99.exp | ||
mi-vla-fortran.exp | ||
mi-watch-nonstop.exp | ||
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 | ||
var-cmd.c | ||
vla.c | ||
vla.f90 | ||
watch-nonstop.c |