diff -urp insight-6.8-1/gdb/gdbtk/generic/gdbtk.c insight-6.8-1.new/gdb/gdbtk/generic/gdbtk.c --- insight-6.8-1/gdb/gdbtk/generic/gdbtk.c 2013-01-18 12:25:26.000000000 +0000 +++ insight-6.8-1.new/gdb/gdbtk/generic/gdbtk.c 2013-01-18 12:25:52.000000000 +0000 @@ -493,17 +493,17 @@ gdbtk_init (void) make_final_cleanup (gdbtk_cleanup, NULL); if (Tcl_Init (gdbtk_interp) != TCL_OK) - error ("Tcl_Init failed: %s", gdbtk_interp->result); + error ("Tcl_Init failed: %s", Tcl_GetStringResult (gdbtk_interp)); /* Initialize the Paths variable. */ if (ide_initialize_paths (gdbtk_interp, "") != TCL_OK) - error ("ide_initialize_paths failed: %s", gdbtk_interp->result); + error ("ide_initialize_paths failed: %s", Tcl_GetStringResult (gdbtk_interp)); if (Tk_Init (gdbtk_interp) != TCL_OK) - error ("Tk_Init failed: %s", gdbtk_interp->result); + error ("Tk_Init failed: %s", Tcl_GetStringResult (gdbtk_interp)); if (Tktable_Init (gdbtk_interp) != TCL_OK) - error ("Tktable_Init failed: %s", gdbtk_interp->result); + error ("Tktable_Init failed: %s", Tcl_GetStringResult (gdbtk_interp)); Tcl_StaticPackage (gdbtk_interp, "Tktable", Tktable_Init, (Tcl_PackageInitProc *) NULL); @@ -559,7 +559,7 @@ gdbtk_init (void) if (Gdbtk_Init (gdbtk_interp) != TCL_OK) { - error ("Gdbtk_Init failed: %s", gdbtk_interp->result); + error ("Gdbtk_Init failed: %s", Tcl_GetStringResult (gdbtk_interp)); } Tcl_StaticPackage (gdbtk_interp, "Insight", Gdbtk_Init, NULL); @@ -739,7 +739,7 @@ tk_command (char *cmd, int from_tty) retval = Tcl_Eval (gdbtk_interp, cmd); - result = xstrdup (gdbtk_interp->result); + result = xstrdup (Tcl_GetStringResult (gdbtk_interp)); old_chain = make_cleanup (free, result); diff -urp insight-6.8-1/gdb/gdbtk/generic/gdbtk-hooks.c insight-6.8-1.new/gdb/gdbtk/generic/gdbtk-hooks.c --- insight-6.8-1/gdb/gdbtk/generic/gdbtk-hooks.c 2013-01-18 12:25:26.000000000 +0000 +++ insight-6.8-1.new/gdb/gdbtk/generic/gdbtk-hooks.c 2013-01-18 12:25:52.000000000 +0000 @@ -255,13 +255,16 @@ gdbtk_read (struct ui_file *stream, char actual_len = 0; } else - actual_len = strlen (gdbtk_interp->result); - - /* Truncate the string if it is too big for the caller's buffer. */ - if (actual_len >= sizeof_buf) - actual_len = sizeof_buf - 1; + { + const char *tclResult = Tcl_GetStringResult (gdbtk_interp); + actual_len = strlen (tclResult); + + /* Truncate the string if it is too big for the caller's buffer. */ + if (actual_len >= sizeof_buf) + actual_len = sizeof_buf - 1; - memcpy (buf, gdbtk_interp->result, actual_len); + memcpy (buf, tclResult, actual_len); + } buf[actual_len] = '\0'; return actual_len; } @@ -506,11 +509,11 @@ gdbtk_readline (char *prompt) if (result == TCL_OK) { - return (xstrdup (gdbtk_interp->result)); + return (xstrdup (Tcl_GetStringResult (gdbtk_interp))); } else { - gdbtk_fputs (gdbtk_interp->result, gdb_stdout); + gdbtk_fputs (Tcl_GetStringResult (gdbtk_interp), gdb_stdout); gdbtk_fputs ("\n", gdb_stdout); return (NULL); } @@ -634,7 +637,7 @@ gdbtk_load_hash (const char *section, un report_error (); free(buf); - return atoi (gdbtk_interp->result); + return atoi (Tcl_GetStringResult (gdbtk_interp)); } @@ -687,7 +690,7 @@ gdbtk_query (const char *query, va_list gdbtk_two_elem_cmd ("gdbtk_tcl_query", buf); free(buf); - val = atol (gdbtk_interp->result); + val = atol (Tcl_GetStringResult (gdbtk_interp)); return val; } diff -urp insight-6.8-1/gdb/gdbtk/plugins/rhabout/rhabout.c insight-6.8-1.new/gdb/gdbtk/plugins/rhabout/rhabout.c --- insight-6.8-1/gdb/gdbtk/plugins/rhabout/rhabout.c 2004-12-08 20:21:08.000000000 +0000 +++ insight-6.8-1.new/gdb/gdbtk/plugins/rhabout/rhabout.c 2013-01-18 12:31:57.000000000 +0000 @@ -22,7 +22,7 @@ extra_text (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - interp->result = "\nThis is a sample plug-in\n"; + Tcl_SetResult (interp, "\nThis is a sample plug-in\n", TCL_STATIC); return TCL_OK; }