public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@cygnus.com>
To: Insight Maling List <insight@sources.redhat.com>
Subject: [PATCH] Add support for architecture change events
Date: Mon, 13 Aug 2001 11:31:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0108131130360.22492-100000@makita.cygnus.com> (raw)

Hi,

I've committed the following patch, which adds support for gdb's new
"architecture changed" events.

Keith

ChangeLog
2001-08-13  Keith Seitz  <keiths@redhat.com>

	* generic/gdbtk-hooks.c (gdbtk_add_hooks): Register
	architecture_changed event handler.
	(gdbtk_architecture_changed): New function.
	* library/gdbevent.ith (class ArchChangdEvent): New event.
	* library/ehandler.ith (arch_changed): New method. Handler
	for ArchChangedEvents.
	* library/interface.tcl (gdbtk_tcl_architecture_changed): New
	proc to handle architecture change events.

Patch
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.16
diff -u -p -r1.16 gdbtk-hooks.c
--- gdbtk-hooks.c	2001/06/13 20:01:42	1.16
+++ gdbtk-hooks.c	2001/08/13 18:25:29
@@ -80,6 +80,7 @@ extern void (*post_add_symbol_hook) (voi
 extern void (*selected_frame_level_changed_hook) (int);
 extern int (*ui_loop_hook) (int);

+static void gdbtk_architecture_changed (void);
 static void gdbtk_trace_find (char *arg, int from_tty);
 static void gdbtk_trace_start_stop (int, int);
 static void gdbtk_attach (void);
@@ -132,6 +133,7 @@ gdbtk_add_hooks (void)
   handlers.tracepoint_create = gdbtk_create_tracepoint;
   handlers.tracepoint_modify = gdbtk_modify_tracepoint;
   handlers.tracepoint_delete = gdbtk_delete_tracepoint;
+  handlers.architecture_changed = gdbtk_architecture_changed;
   set_gdb_event_hooks (&handlers);

   /* Hooks */
@@ -840,3 +842,9 @@ gdbtk_detach ()
     }
 }

+/* Called from gdbarch_update_p whenever the architecture changes. */
+static void
+gdbtk_architecture_changed (void)
+{
+  Tcl_Eval (gdbtk_interp, "gdbtk_tcl_architecture_changed");
+}
Index: library/gdbevent.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/gdbevent.ith,v
retrieving revision 1.6
diff -u -p -r1.6 gdbevent.ith
--- gdbevent.ith	2001/06/11 23:08:05	1.6
+++ gdbevent.ith	2001/08/13 18:25:29
@@ -208,3 +208,13 @@ class UpdateEvent {
   private variable _pc               {}
   private variable _shlib            {}
 }
+
+# ARCHITECTURE CHANGED EVENT
+#
+# This event is posted whenever the target architecture changes
+
+class ArchChangedEvent {
+  inherit GDBEvent
+
+  public method handler {} { return "arch_changed" }
+}
Index: library/ehandler.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/ehandler.ith,v
retrieving revision 1.5
diff -u -p -r1.5 ehandler.ith
--- ehandler.ith	2001/06/04 15:49:53	1.5
+++ ehandler.ith	2001/08/13 18:25:29
@@ -41,5 +41,8 @@ class GDBEventHandler {

     # Update event
     method update {event} {}
+
+    # Architecture changed event
+    method arch_changed {event} {}
   }
 }
Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.28
diff -u -p -r1.28 interface.tcl
--- interface.tcl	2001/08/03 18:46:41	1.28
+++ interface.tcl	2001/08/13 18:25:29
@@ -1745,3 +1745,9 @@ proc initialize_gdbtk {} {
   set gdb_target_changed 1
 }

+# The architecture changed. Inform the UI.
+proc gdbtk_tcl_architecture_changed {} {
+  set e [ArchChangedEvent \#auto]
+  GDBEventHandler::dispatch $e
+  delete object $e
+}

                 reply	other threads:[~2001-08-13 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.GSO.4.33.0108131130360.22492-100000@makita.cygnus.com \
    --to=keiths@cygnus.com \
    --cc=insight@sources.redhat.com \
    /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).