aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-05-27 19:06:12 +0000
committerTom Tromey <tromey@redhat.com>2010-05-27 19:06:12 +0000
commit8c6363cf5c34e8728b3ad010a1611de234d6ed9d (patch)
tree944f595e00d1a5b038053628a4cbca6dd3bbc029
parent7ecb917ec886fd48ee38b0861c51f36c0576c36a (diff)
downloadgdb-8c6363cf5c34e8728b3ad010a1611de234d6ed9d.zip
gdb-8c6363cf5c34e8728b3ad010a1611de234d6ed9d.tar.gz
gdb-8c6363cf5c34e8728b3ad010a1611de234d6ed9d.tar.bz2
* arm-tdep.c (push_stack_item): 'contents' now const.
(arm_push_dummy_call): Make 'val' const. Use value_contents, not value_contents_writeable. Introduce new temporary.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/arm-tdep.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e0d8618..6ce98ba 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2010-05-27 Tom Tromey <tromey@redhat.com>
+ * arm-tdep.c (push_stack_item): 'contents' now const.
+ (arm_push_dummy_call): Make 'val' const. Use value_contents, not
+ value_contents_writeable. Introduce new temporary.
+
+2010-05-27 Tom Tromey <tromey@redhat.com>
+
* findcmd.c (parse_find_args): Use value_contents, not
value_contents_raw.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c6c5aca..31f17f1 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1697,7 +1697,7 @@ struct stack_item
};
static struct stack_item *
-push_stack_item (struct stack_item *prev, void *contents, int len)
+push_stack_item (struct stack_item *prev, const void *contents, int len)
{
struct stack_item *si;
si = xmalloc (sizeof (struct stack_item));
@@ -2038,7 +2038,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct type *arg_type;
struct type *target_type;
enum type_code typecode;
- bfd_byte *val;
+ const bfd_byte *val;
int align;
enum arm_vfp_cprc_base_type vfp_base_type;
int vfp_base_count;
@@ -2048,7 +2048,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
len = TYPE_LENGTH (arg_type);
target_type = TYPE_TARGET_TYPE (arg_type);
typecode = TYPE_CODE (arg_type);
- val = value_contents_writeable (args[argnum]);
+ val = value_contents (args[argnum]);
align = arm_type_align (arg_type);
/* Round alignment up to a whole number of words. */
@@ -2149,9 +2149,10 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
CORE_ADDR regval = extract_unsigned_integer (val, len, byte_order);
if (arm_pc_is_thumb (regval))
{
- val = alloca (len);
- store_unsigned_integer (val, len, byte_order,
+ bfd_byte *copy = alloca (len);
+ store_unsigned_integer (copy, len, byte_order,
MAKE_THUMB_ADDR (regval));
+ val = copy;
}
}