This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] Don't use selected_frame_level
- From: Keith Seitz <keiths at redhat dot com>
- To: Insight Maling List <insight at sources dot redhat dot com>
- Date: Mon, 22 Apr 2002 17:03:14 -0700 (PDT)
- Subject: [PATCH] Don't use selected_frame_level
Hi,
This patch removes the use of selected_frame_level, which is going away in
gdb. This is now all accomplished via the hook.
Keith
ChangeLog
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.
Patch
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.23
diff -p -r1.23 gdbtk-hooks.c
*** generic/gdbtk-hooks.c 25 Mar 2002 22:58:54 -0000 1.23
--- generic/gdbtk-hooks.c 23 Apr 2002 00:00:59 -0000
*************** gdbtk_trace_start_stop (int start, int f
*** 736,742 ****
static void
gdbtk_selected_frame_changed (int level)
{
! Tcl_UpdateLinkedVar (gdbtk_interp, "gdb_selected_frame_level");
}
/* Called when the current thread changes. */
--- 736,750 ----
static void
gdbtk_selected_frame_changed (int 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. */
Index: generic/gdbtk-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-stack.c,v
retrieving revision 1.8
diff -p -r1.8 gdbtk-stack.c
*** generic/gdbtk-stack.c 5 Apr 2002 22:27:30 -0000 1.8
--- generic/gdbtk-stack.c 23 Apr 2002 00:00:59 -0000
*************** Gdbtk_Stack_Init (Tcl_Interp *interp)
*** 67,76 ****
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;
}
--- 67,72 ----