aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 10:31:06 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:37 -0600
commit2d39ccd3d1773b26ed8178bcd77375175c48ee62 (patch)
treee4634ee4c847ad5e71d092188c6f38ab21ae2444 /gdb/linux-tdep.c
parent333859402c7968dc718dae73ca0fbddbe096fc51 (diff)
downloadfsf-binutils-gdb-2d39ccd3d1773b26ed8178bcd77375175c48ee62.zip
fsf-binutils-gdb-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.gz
fsf-binutils-gdb-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/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 67adf12..d0bda5a 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -277,13 +277,13 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
type_allocator alloc (gdbarch);
- int_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
+ int_type = init_integer_type (alloc, gdbarch_int_bit (gdbarch),
0, "int");
- uint_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
+ uint_type = init_integer_type (alloc, gdbarch_int_bit (gdbarch),
1, "unsigned int");
- long_type = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
+ long_type = init_integer_type (alloc, gdbarch_long_bit (gdbarch),
0, "long");
- short_type = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
+ short_type = init_integer_type (alloc, gdbarch_long_bit (gdbarch),
0, "short");
void_ptr_type = lookup_pointer_type (builtin_type (gdbarch)->builtin_void);
@@ -1742,8 +1742,9 @@ linux_make_mappings_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
int *note_size)
{
struct linux_make_mappings_data mapping_data;
+ type_allocator alloc (gdbarch);
struct type *long_type
- = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch), 0, "long");
+ = init_integer_type (alloc, gdbarch_long_bit (gdbarch), 0, "long");
gdb_byte buf[sizeof (ULONGEST)];
auto_obstack data_obstack, filename_obstack;