diff options
-rw-r--r-- | gdb/gdbtk/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbtk/generic/gdbtk-hooks.c | 10 | ||||
-rw-r--r-- | gdb/gdbtk/generic/gdbtk-stack.c | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 64243456e95..3a4f9c95b0c 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,10 @@ +2002-04-22 Keith Seitz <keiths@redhat.com> + + * generic/gdbtk-stack.c (Gdbtk_Stack_Init): Don't link + selected_frame_level directly. + * generic/gdbtk-hooks.c (gdbtk_selected_frame_changed): Set + the global "gdb_selected_frame_level" directly. + 2002-04-21 Andrew Cagney <ac131313@redhat.com> * generic/gdbtk-wrapper.c (GDB_find_frame_addr_in_frame_chain): diff --git a/gdb/gdbtk/generic/gdbtk-hooks.c b/gdb/gdbtk/generic/gdbtk-hooks.c index 30c6121b3a0..4bb2d4c4b6e 100644 --- a/gdb/gdbtk/generic/gdbtk-hooks.c +++ b/gdb/gdbtk/generic/gdbtk-hooks.c @@ -736,7 +736,15 @@ gdbtk_trace_start_stop (int start, int from_tty) static void gdbtk_selected_frame_changed (int level) { - Tcl_UpdateLinkedVar (gdbtk_interp, "gdb_selected_frame_level"); +#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1 + char *a; + xasprintf (&a, "%d", level); + Tcl_SetVar (gdbtk_interp, "gdb_selected_frame_level", a, TCL_GLOBAL_ONLY); + xfree (a); +#else + Tcl_SetVar2Ex (gdbtk_interp, "gdb_selected_frame_level", NULL, + Tcl_NewIntObj (level), TCL_GLOBAL_ONLY); +#endif } /* Called when the current thread changes. */ diff --git a/gdb/gdbtk/generic/gdbtk-stack.c b/gdb/gdbtk/generic/gdbtk-stack.c index aa8957df036..ab40744482e 100644 --- a/gdb/gdbtk/generic/gdbtk-stack.c +++ b/gdb/gdbtk/generic/gdbtk-stack.c @@ -67,10 +67,6 @@ Gdbtk_Stack_Init (Tcl_Interp *interp) gdb_selected_frame, NULL); Tcl_CreateObjCommand (interp, "gdb_stack", gdbtk_call_wrapper, gdb_stack, NULL); - Tcl_LinkVar (interp, "gdb_selected_frame_level", - (char *) &selected_frame_level, - TCL_LINK_INT | TCL_LINK_READ_ONLY); - return TCL_OK; } |