diff options
author | Tom Tromey <tom@tromey.com> | 2022-06-01 15:31:15 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-08-04 13:28:04 -0600 |
commit | cb275538dbddfbb3c2c372a665ac48e6f617ea33 (patch) | |
tree | 7bc54ff4fc92c9b1cee74c2d7b9ae452b5ffec8b /gdb/go-lang.h | |
parent | 8b1540430107b0752485ab9e6a841dbbacd45681 (diff) | |
download | gdb-cb275538dbddfbb3c2c372a665ac48e6f617ea33.zip gdb-cb275538dbddfbb3c2c372a665ac48e6f617ea33.tar.gz gdb-cb275538dbddfbb3c2c372a665ac48e6f617ea33.tar.bz2 |
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.
Diffstat (limited to 'gdb/go-lang.h')
-rw-r--r-- | gdb/go-lang.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/go-lang.h b/gdb/go-lang.h index fb57dd7..523501b 100644 --- a/gdb/go-lang.h +++ b/gdb/go-lang.h @@ -30,24 +30,24 @@ struct parser_state; struct builtin_go_type { - struct type *builtin_void; - struct type *builtin_char; - struct type *builtin_bool; - struct type *builtin_int; - struct type *builtin_uint; - struct type *builtin_uintptr; - struct type *builtin_int8; - struct type *builtin_int16; - struct type *builtin_int32; - struct type *builtin_int64; - struct type *builtin_uint8; - struct type *builtin_uint16; - struct type *builtin_uint32; - struct type *builtin_uint64; - struct type *builtin_float32; - struct type *builtin_float64; - struct type *builtin_complex64; - struct type *builtin_complex128; + struct type *builtin_void = nullptr; + struct type *builtin_char = nullptr; + struct type *builtin_bool = nullptr; + struct type *builtin_int = nullptr; + struct type *builtin_uint = nullptr; + struct type *builtin_uintptr = nullptr; + struct type *builtin_int8 = nullptr; + struct type *builtin_int16 = nullptr; + struct type *builtin_int32 = nullptr; + struct type *builtin_int64 = nullptr; + struct type *builtin_uint8 = nullptr; + struct type *builtin_uint16 = nullptr; + struct type *builtin_uint32 = nullptr; + struct type *builtin_uint64 = nullptr; + struct type *builtin_float32 = nullptr; + struct type *builtin_float64 = nullptr; + struct type *builtin_complex64 = nullptr; + struct type *builtin_complex128 = nullptr; }; enum go_type |