aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-20 07:50:58 -0600
committerTom Tromey <tromey@adacore.com>2023-10-30 07:45:39 -0600
commitb4b9074dc0dfab4fb00562b359315d78b09a1564 (patch)
treedd20e8cdfe6cbba2c847f4bf852d8e9daf5d3496 /gdb
parent8942e52e2511cedc3fc1ce574e526ce4e6b7a6ef (diff)
downloadgdb-b4b9074dc0dfab4fb00562b359315d78b09a1564.zip
gdb-b4b9074dc0dfab4fb00562b359315d78b09a1564.tar.gz
gdb-b4b9074dc0dfab4fb00562b359315d78b09a1564.tar.bz2
Fix "finish" with range types on ARM
On ARM (I tested big-endian but it may not matter), "finish" can sometimes print the wrong result when the return type is a range type. Range types should really be treated as their underlying type (normally integer, but sometimes fixed-point). This patch implements this. Approved-By: Luis Machado <luis.machado@arm.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/arm-tdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 97d7c51..ab0df0f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -8915,6 +8915,9 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
+ while (type->code () == TYPE_CODE_RANGE)
+ type = check_typedef (type->target_type ());
+
if (TYPE_CODE_FLT == type->code ())
{
switch (tdep->fp_model)