aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/msp430-tdep.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c547ee9..9a8390b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-10-04 Tom Tromey <tom@tromey.com>
+ * msp430-tdep.c (msp430_push_dummy_call): Rename inner
+ "structs_addr" and hoist declaration.
+
+2018-10-04 Tom Tromey <tom@tromey.com>
+
* linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
variable "size".
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index b6e062a..427f58c 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -715,6 +715,7 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
ULONGEST arg_size = TYPE_LENGTH (arg_type);
int offset;
int current_arg_on_stack;
+ gdb_byte struct_addr_buf[4];
current_arg_on_stack = 0;
@@ -722,11 +723,9 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|| TYPE_CODE (arg_type) == TYPE_CODE_UNION)
{
/* Aggregates of any size are passed by reference. */
- gdb_byte struct_addr[4];
-
- store_unsigned_integer (struct_addr, 4, byte_order,
+ store_unsigned_integer (struct_addr_buf, 4, byte_order,
value_address (arg));
- arg_bits = struct_addr;
+ arg_bits = struct_addr_buf;
arg_size = (code_model == MSP_LARGE_CODE_MODEL) ? 4 : 2;
}
else