diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-13 10:31:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-18 11:12:37 -0600 |
commit | 2d39ccd3d1773b26ed8178bcd77375175c48ee62 (patch) | |
tree | e4634ee4c847ad5e71d092188c6f38ab21ae2444 /gdb/windows-tdep.c | |
parent | 333859402c7968dc718dae73ca0fbddbe096fc51 (diff) | |
download | binutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.zip binutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.gz binutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.bz2 |
Unify arch_integer_type and init_integer_type
This unifies arch_integer_type and init_integer_type by using a type
allocator.
Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r-- | gdb/windows-tdep.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 5a58aa3..4a08dd4 100644 --- a/gdb/windows-tdep.c +++ b/gdb/windows-tdep.c @@ -216,13 +216,13 @@ windows_get_tlb_type (struct gdbarch *gdbarch) type_allocator alloc (gdbarch); - dword_ptr_type = arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch), + dword_ptr_type = init_integer_type (alloc, gdbarch_ptr_bit (gdbarch), 1, "DWORD_PTR"); - dword32_type = arch_integer_type (gdbarch, 32, + dword32_type = init_integer_type (alloc, 32, 1, "DWORD32"); - word_type = arch_integer_type (gdbarch, 16, + word_type = init_integer_type (alloc, 16, 1, "WORD"); - wchar_type = arch_integer_type (gdbarch, 16, + wchar_type = init_integer_type (alloc, 16, 1, "wchar_t"); void_ptr_type = lookup_pointer_type (builtin_type (gdbarch)->builtin_void); wchar_ptr_type = arch_pointer_type (gdbarch, gdbarch_ptr_bit (gdbarch), @@ -810,11 +810,12 @@ windows_get_siginfo_type (struct gdbarch *gdbarch) if (windows_gdbarch_data->siginfo_type != NULL) return windows_gdbarch_data->siginfo_type; - dword_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), + type_allocator alloc (gdbarch); + dword_type = init_integer_type (alloc, gdbarch_int_bit (gdbarch), 1, "DWORD"); pvoid_type = arch_pointer_type (gdbarch, gdbarch_ptr_bit (gdbarch), "PVOID", builtin_type (gdbarch)->builtin_void); - ulongptr_type = arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch), + ulongptr_type = init_integer_type (alloc, gdbarch_ptr_bit (gdbarch), 1, "ULONG_PTR"); /* ExceptionCode value names */ |