diff options
author | Martin Hunt <hunt@redhat.com> | 1998-08-30 07:53:29 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1998-08-30 07:53:29 +0000 |
commit | 4ff5d55a081fbb280b68d912bf3a4b5f26541b5c (patch) | |
tree | 39ec26e18a03d02cc992a5afe7b352eb3b36b6e6 /gdb/gdbtk-cmds.c | |
parent | d405c4a1aec90299f768f191e63494407ce84536 (diff) | |
download | binutils-4ff5d55a081fbb280b68d912bf3a4b5f26541b5c.zip binutils-4ff5d55a081fbb280b68d912bf3a4b5f26541b5c.tar.gz binutils-4ff5d55a081fbb280b68d912bf3a4b5f26541b5c.tar.bz2 |
Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context
with tcl variable gdb_context_id.
* gdbtk-hooks.c (gdbtk_context_change): Implement new hook called
context_hook. Called when threads change.
* gdbtk.c: Initialize gdb_context.
* gdbtk.h: Declare gdb_context.
* infrun (wait_for_inferior): Call context_hook.
* thread.c (thread_command): Call context_hook.
* defs.h: Declare context_hook.
Diffstat (limited to 'gdb/gdbtk-cmds.c')
-rw-r--r-- | gdb/gdbtk-cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbtk-cmds.c b/gdb/gdbtk-cmds.c index fba5357..15ba833 100644 --- a/gdb/gdbtk-cmds.c +++ b/gdb/gdbtk-cmds.c @@ -304,10 +304,15 @@ Gdbtk_Init (interp) call_wrapper, gdb_get_trace_frame_num, NULL); Tcl_CreateObjCommand (interp, "gdb_stack", call_wrapper, gdb_stack, NULL); - Tcl_LinkVar (interp, "gdb_selected_frame_level", + Tcl_LinkVar (interp, "gdb_selected_frame_level", (char *) &selected_frame_level, TCL_LINK_INT | TCL_LINK_READ_ONLY); + /* gdb_context is used for debugging multiple threads or tasks */ + Tcl_LinkVar (interp, "gdb_context_id", + (char *) &gdb_context, + TCL_LINK_INT | TCL_LINK_READ_ONLY); + Tcl_PkgProvide(interp, "Gdbtk", GDBTK_VERSION); return TCL_OK; } |