public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove two unused fields from gdbarch
@ 2023-01-17 19:46 Tom Tromey
  2023-01-17 19:59 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2023-01-17 19:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

When I converted gdbarch to use the registry, I forgot to remove the
two fields that were used to implement the previous approach.  This
patch removes them.  Tested by rebuilding.
---
 gdb/gdbarch.c  | 4 ----
 gdb/gdbarch.py | 4 ----
 2 files changed, 8 deletions(-)

diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 46baca9c479..04fcc92f8f9 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -48,10 +48,6 @@ struct gdbarch
   gdbarch_tdep_up tdep;
   gdbarch_dump_tdep_ftype *dump_tdep = nullptr;
 
-  /* per-architecture data-pointers.  */
-  unsigned nr_data = 0;
-  void **data = nullptr;
-
   int short_bit = 2*TARGET_CHAR_BIT;
   int int_bit = 4*TARGET_CHAR_BIT;
   int long_bit = 4*TARGET_CHAR_BIT;
diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py
index 7dc79386940..3ebc3598047 100755
--- a/gdb/gdbarch.py
+++ b/gdb/gdbarch.py
@@ -289,10 +289,6 @@ with open("gdbarch.c", "w") as f:
     print("  gdbarch_tdep_up tdep;", file=f)
     print("  gdbarch_dump_tdep_ftype *dump_tdep = nullptr;", file=f)
     print(file=f)
-    print("  /* per-architecture data-pointers.  */", file=f)
-    print("  unsigned nr_data = 0;", file=f)
-    print("  void **data = nullptr;", file=f)
-    print(file=f)
     for c in filter(not_info, components):
         if isinstance(c, Function):
             print(f"  gdbarch_{c.name}_ftype *", file=f, end="")
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove two unused fields from gdbarch
  2023-01-17 19:46 [PATCH] Remove two unused fields from gdbarch Tom Tromey
@ 2023-01-17 19:59 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2023-01-17 19:59 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 1/17/23 14:46, Tom Tromey via Gdb-patches wrote:
> When I converted gdbarch to use the registry, I forgot to remove the
> two fields that were used to implement the previous approach.  This
> patch removes them.  Tested by rebuilding.

LGTM (seems obvious even).

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-17 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 19:46 [PATCH] Remove two unused fields from gdbarch Tom Tromey
2023-01-17 19:59 ` Simon Marchi

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).