aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-20 07:38:54 -0600
committerTom Tromey <tromey@adacore.com>2023-10-30 07:45:39 -0600
commit8942e52e2511cedc3fc1ce574e526ce4e6b7a6ef (patch)
tree0bb0c1ea823b94df0480220184129fa2f1bf42fb /gdb/arm-tdep.c
parenta4a51292bb5739e23dc1e16866139e00a2578c06 (diff)
downloadgdb-8942e52e2511cedc3fc1ce574e526ce4e6b7a6ef.zip
gdb-8942e52e2511cedc3fc1ce574e526ce4e6b7a6ef.tar.gz
gdb-8942e52e2511cedc3fc1ce574e526ce4e6b7a6ef.tar.bz2
Fix calls with small integers on ARM
On big-endian ARM, an inferior call with a small integer will pass the wrong value. This patch fixes the problem. Because the code here works using scalar values, and not just bytes, left-shifting is unnecessary. Approved-By: Luis Machado <luis.machado@arm.com>
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index a0ad1fb..97d7c51 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4824,9 +4824,6 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
{
/* The argument is being passed in a general purpose
register. */
- if (byte_order == BFD_ENDIAN_BIG)
- regval <<= (ARM_INT_REGISTER_SIZE - partial_len) * 8;
-
arm_debug_printf ("arg %d in %s = 0x%s", argnum,
gdbarch_register_name (gdbarch, argreg),
phex (regval, ARM_INT_REGISTER_SIZE));