public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: insight@sourceware.org
Subject: Adjust insight to recent globals removal
Date: Wed, 17 Sep 2008 16:22:00 -0000	[thread overview]
Message-ID: <200809121209.49776.pedro@codesourcery.com> (raw)

[-- 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);

             reply	other threads:[~2008-09-12 11:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 16:22 Pedro Alves [this message]
2008-09-17 19:53 ` Keith Seitz
2008-09-19 23:23 ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809121209.49776.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).