From cb275538dbddfbb3c2c372a665ac48e6f617ea33 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 1 Jun 2022 15:31:15 -0600 Subject: Use registry in gdbarch gdbarch implements its own registry-like approach. This patch changes it to instead use registry.h. It's a rather large patch but largely uninteresting -- it's mostly a straightforward conversion from the old approach to the new one. The main benefit of this change is that it introduces type safety to the gdbarch registry. It also removes a bunch of code. One possible drawback is that, previously, the gdbarch registry differentiated between pre- and post-initialization setup. This doesn't seem very important to me, though. --- gdb/m2-lang.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/m2-lang.h') diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h index 86a093e..775312f 100644 --- a/gdb/m2-lang.h +++ b/gdb/m2-lang.h @@ -37,11 +37,11 @@ extern int get_long_set_bounds (struct type *type, LONGEST *low, struct builtin_m2_type { - struct type *builtin_char; - struct type *builtin_int; - struct type *builtin_card; - struct type *builtin_real; - struct type *builtin_bool; + struct type *builtin_char = nullptr; + struct type *builtin_int = nullptr; + struct type *builtin_card = nullptr; + struct type *builtin_real = nullptr; + struct type *builtin_bool = nullptr; }; /* Return the Modula-2 type table for the specified architecture. */ -- cgit v1.1