summaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index e54969c3743..d8261c822f0 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -480,7 +480,7 @@ value_assign (struct value *toval, struct value *fromval)
{
register struct type *type;
struct value *val;
- char raw_buffer[MAX_REGISTER_SIZE];
+ char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
int use_buffer = 0;
struct frame_id old_frame;
@@ -634,7 +634,8 @@ value_assign (struct value *toval, struct value *fromval)
amount_to_copy = byte_offset + TYPE_LENGTH (type);
/* And a bounce buffer. Be slightly over generous. */
- buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE);
+ buffer = (char *) alloca (amount_to_copy
+ + MAX_REGISTER_RAW_SIZE);
/* Copy it in. */
for (regno = reg_offset, amount_copied = 0;
@@ -961,8 +962,8 @@ value_ind (struct value *arg1)
CORE_ADDR
push_word (CORE_ADDR sp, ULONGEST word)
{
- register int len = DEPRECATED_REGISTER_SIZE;
- char buffer[MAX_REGISTER_SIZE];
+ register int len = REGISTER_SIZE;
+ char *buffer = alloca (MAX_REGISTER_RAW_SIZE);
store_unsigned_integer (buffer, len, word);
if (INNER_THAN (1, 2))