This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove deprecated_register_gdbarch_swap


Hi,

I've committed the attached patch which works around the recent removal of deprecated_register_gdbarch_swap. Since we still (fortunately) have gdb-events which defines an event callback for architecture changes, this is an easy workaround: add a new command to the interpreter to do it.

Keith

ChangeLog
2007-06-27  Keith Seitz  <keiths@redhat.com>

        * generic/gdbtk-register.c (Gdbtk_Register_Init): Remove
        calls to deprecated_register_gdbarch_swap.
        Add "gdb_reg_arch_changed" command.
        * library/regwin.itb (arch_changed): Call gdb_reg_arch_changed.
Index: generic/gdbtk-register.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.32
diff -u -p -r1.32 gdbtk-register.c
--- generic/gdbtk-register.c	9 Jun 2007 17:15:01 -0000	1.32
+++ generic/gdbtk-register.c	27 Jun 2007 20:47:17 -0000
@@ -58,15 +58,12 @@ Gdbtk_Register_Init (Tcl_Interp *interp)
 {
   Tcl_CreateObjCommand (interp, "gdb_reginfo", gdbtk_call_wrapper,
                         gdb_register_info, NULL);
+  Tcl_CreateObjCommand (interp, "gdb_reg_arch_changed", gdbtk_call_wrapper,
+			setup_architecture_data, NULL);
 
   /* Register/initialize any architecture specific data */
   setup_architecture_data ();
 
-  deprecated_register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
-  deprecated_register_gdbarch_swap (&regformat, sizeof (regformat), NULL);
-  deprecated_register_gdbarch_swap (&regtype, sizeof (regtype), NULL);
-  deprecated_register_gdbarch_swap (NULL, 0, setup_architecture_data);
-
   return TCL_OK;
 }
 
Index: library/regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.28
diff -u -p -r1.28 regwin.itb
--- library/regwin.itb	23 Dec 2005 18:26:50 -0000	1.28
+++ library/regwin.itb	27 Jun 2007 20:47:17 -0000
@@ -1,5 +1,5 @@
 # Register display window for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Red Hat, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2007 Red Hat, Inc.
 #
 # Written by Keith Seitz (keiths@redhat.com)
 #        and Martin Hunt (hunt@redhat.com)
@@ -931,9 +931,10 @@ itcl::body RegWin::_select_group {} {
 # ------------------------------------------------------------------
 itcl::body RegWin::arch_changed {event} {
 
-  # When the arch changes, gdb will callback into gdbtk-register.c
-  # to swap out the old register set, so we need only redraw the
-  # window, updating the register names and numbers.
+  # Update internal register caches
+  gdb_reg_arch_changed
+
+  # Relayout the table
   _layout_table
 
   # Clear gdb's change list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]