From 8bf8793ca09479bd7963e413db6f07958125c2f0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Jun 2007 22:44:13 +0000 Subject: [PATCH] * arm-tdep.c (arm_push_dummy_call): Correct padding of partial registers for big-endian. --- gdb/ChangeLog | 5 +++++ gdb/arm-tdep.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4eebde2d456..d3f42de3dfc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-06-19 Joseph Myers + + * arm-tdep.c (arm_push_dummy_call): Correct padding of partial + registers for big-endian. + 2007-06-19 Markus Deuling * gdbarch.sh (TARGET_PRINT_INSN): Replace by gdbarch_print_insn. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2f15050a01f..575c59a2a41 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1289,6 +1289,8 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* The argument is being passed in a general purpose register. */ CORE_ADDR regval = extract_unsigned_integer (val, partial_len); + if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + regval <<= (INT_REGISTER_SIZE - partial_len) * 8; if (arm_debug) fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n", argnum, -- 2.30.2