From a984e6023d090e1d8f1f6f2a7ee63962639e473e Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Fri, 22 Dec 2000 15:33:06 +0000 Subject: 2000-12-13 Fernando Nasser * variables.tcl (constructor): Use the file_changed_hook to remove all variables if the exec file changes. This prevents the Watch Window to dump core because the "types" are not valid anymore. --- gdb/gdbtk/library/ChangeLog | 6 ++++++ gdb/gdbtk/library/variables.tcl | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gdb/gdbtk/library/ChangeLog b/gdb/gdbtk/library/ChangeLog index 7e61109614f..4d06ba0b394 100644 --- a/gdb/gdbtk/library/ChangeLog +++ b/gdb/gdbtk/library/ChangeLog @@ -1,3 +1,9 @@ +2000-12-13 Fernando Nasser + + * variables.tcl (constructor): Use the file_changed_hook to remove + all variables if the exec file changes. This prevents the Watch + Window to dump core because the "types" are not valid anymore. + 2000-12-13 Fernando Nasser * session.tcl (session_save): Save target name. diff --git a/gdb/gdbtk/library/variables.tcl b/gdb/gdbtk/library/variables.tcl index c55b41d8e63..76bb253ca49 100644 --- a/gdb/gdbtk/library/variables.tcl +++ b/gdb/gdbtk/library/variables.tcl @@ -39,6 +39,10 @@ class VariableWin { add_hook gdb_no_inferior_hook "$this no_inferior" add_hook gdb_idle_hook [list $this idle] add_hook gdb_clear_file_hook [code $this clear_file] + # FIXME: This is too harsh. We must add to varobj a method + # to re-parse the expressions and compute new types so we can + # keep the contents of the window whenever possible. + add_hook file_changed_hook [code $this clear_file] } # ------------------------------------------------------------------ -- cgit v1.2.1