This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Adjust insight to recent globals removal
- From: Pedro Alves <pedro at codesourcery dot com>
- To: insight at sourceware dot org
- Date: Fri, 12 Sep 2008 12:09:49 +0100
- Subject: Adjust insight to recent globals removal
Hi,
Recently, GDB lost a bunch of global variables.
This patch allows me to build insight on x86_64-unknown-linux-gnu.
I have no idea how well it works, because insight seems to be broken here
in several ways ("run" or "attach" from the menu does nothing,
"console" either). I'm no insight user, so I can't tell what's
going on.
Just thought I'd fix what I broke. Hope this helps.
--
Pedro Alves
2008-09-12 Pedro Alves <pedro@codesourcery.com>
* generic/gdbtk-cmds.c (gdb_cmd, gdb_immediate_command): Adjust to
new bpstat_do_actions inferface.
* generic/gdbtk-hooks.c: Include gdbthread.h.
(gdbtk_annotate_signal): Get the stop_signal from the current
thread.
---
gdb/gdbtk/generic/gdbtk-cmds.c | 4 ++--
gdb/gdbtk/generic/gdbtk-hooks.c | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
Index: src/gdb/gdbtk/generic/gdbtk-cmds.c
===================================================================
--- src.orig/gdb/gdbtk/generic/gdbtk-cmds.c 2008-09-12 00:52:59.000000000 +0100
+++ src/gdb/gdbtk/generic/gdbtk-cmds.c 2008-09-12 00:53:45.000000000 +0100
@@ -701,7 +701,7 @@ gdb_cmd (ClientData clientData, Tcl_Inte
result_ptr->flags |= GDBTK_TO_RESULT;
}
- bpstat_do_actions (&stop_bpstat);
+ bpstat_do_actions ();
return TCL_OK;
}
@@ -752,7 +752,7 @@ gdb_immediate_command (ClientData client
execute_command (Tcl_GetStringFromObj (objv[1], NULL), from_tty);
- bpstat_do_actions (&stop_bpstat);
+ bpstat_do_actions ();
result_ptr->flags |= GDBTK_TO_RESULT;
Index: src/gdb/gdbtk/generic/gdbtk-hooks.c
===================================================================
--- src.orig/gdb/gdbtk/generic/gdbtk-hooks.c 2008-09-12 00:54:00.000000000 +0100
+++ src/gdb/gdbtk/generic/gdbtk-hooks.c 2008-09-12 00:56:13.000000000 +0100
@@ -33,6 +33,7 @@
#include "annotate.h"
#include "cli/cli-decode.h"
#include "observer.h"
+#include "gdbthread.h"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@@ -794,9 +795,10 @@ gdbtk_error_begin ()
/* notify GDBtk when a signal occurs */
static void
-gdbtk_annotate_signal ()
+gdbtk_annotate_signal (void)
{
char *buf;
+ struct thread_info *tp = inferior_thread ();
/* Inform gui that the target has stopped. This is
a necessary stop button evil. We don't want signal notification
@@ -804,8 +806,9 @@ gdbtk_annotate_signal ()
timeout. */
Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback");
- xasprintf (&buf, "gdbtk_signal %s {%s}", target_signal_to_name (stop_signal),
- target_signal_to_string (stop_signal));
+ xasprintf (&buf, "gdbtk_signal %s {%s}",
+ target_signal_to_name (tp->stop_signal),
+ target_signal_to_string (tp->stop_signal));
if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
report_error ();
free(buf);