* Adjust insight to recent globals removal
@ 2008-09-17 16:22 Pedro Alves
2008-09-17 19:53 ` Keith Seitz
2008-09-19 23:23 ` Keith Seitz
0 siblings, 2 replies; 3+ messages in thread
From: Pedro Alves @ 2008-09-17 16:22 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
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
[-- Attachment #2: fix_insight.diff --]
[-- Type: text/x-diff, Size: 2381 bytes --]
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 ()
\f
/* 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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Adjust insight to recent globals removal
2008-09-17 16:22 Adjust insight to recent globals removal Pedro Alves
@ 2008-09-17 19:53 ` Keith Seitz
2008-09-19 23:23 ` Keith Seitz
1 sibling, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2008-09-17 19:53 UTC (permalink / raw)
To: Pedro Alves; +Cc: insight
Pedro Alves wrote:
> Just thought I'd fix what I broke. Hope this helps.
Indeed it does help, thank you for thinking of me. :-)
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Adjust insight to recent globals removal
2008-09-17 16:22 Adjust insight to recent globals removal Pedro Alves
2008-09-17 19:53 ` Keith Seitz
@ 2008-09-19 23:23 ` Keith Seitz
1 sibling, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2008-09-19 23:23 UTC (permalink / raw)
To: insight; +Cc: Pedro Alves
Pedro Alves wrote:
> 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.
Hmmm. That's odd... "It works for me." Target settings problem?
> Just thought I'd fix what I broke. Hope this helps.
I haven't seen a commit on this, so I committed this myself this afternoon.
Thanks a bunch for thinking about me!
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-19 2:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-17 16:22 Adjust insight to recent globals removal Pedro Alves
2008-09-17 19:53 ` Keith Seitz
2008-09-19 23:23 ` 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).