aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 11:30:08 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:38 -0600
commit77c5f49648cc39d9e4b1bd0411998ec42375654b (patch)
tree3408ebafaa9c105fddb231e71005171f4be8df26 /gdb/arm-tdep.c
parent46c04ea32f7f259432a68b002a13cdea86f9f902 (diff)
downloadgdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.zip
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.gz
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.bz2
Unify arch_float_type and init_float_type
This unifies arch_float_type and init_float_type by using a type allocator. Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 883f8be..803596d 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4904,9 +4904,12 @@ arm_ext_type (struct gdbarch *gdbarch)
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (!tdep->arm_ext_type)
- tdep->arm_ext_type
- = arch_float_type (gdbarch, -1, "builtin_type_arm_ext",
- floatformats_arm_ext);
+ {
+ type_allocator alloc (gdbarch);
+ tdep->arm_ext_type
+ = init_float_type (alloc, -1, "builtin_type_arm_ext",
+ floatformats_arm_ext);
+ }
return tdep->arm_ext_type;
}