* [PATCH] Don't use selected_frame_level
@ 2002-04-22 17:03 Keith Seitz
0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2002-04-22 17:03 UTC (permalink / raw)
To: Insight Maling List
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 ----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-23 0:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 17:03 [PATCH] Don't use selected_frame_level Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).