Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: gdb/lm32-tdep.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/linux-thread-db.c ('k') | gdb/m2-exp.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/lm32-tdep.c
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 57d73b5aedc0dff2ab2b22c1d8d4d2f78a080bd9..54d80b9ab4a68170854d156bd14d95e8f896e89d 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for Lattice Mico32 processor, for GDB.
Contributed by Jon Beniston <jon@beniston.com>
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -37,7 +37,7 @@
#include "reggroups.h"
#include "opcodes/lm32-desc.h"
-#include "gdb_string.h"
+#include <string.h>
/* Macros to extract fields from an instruction. */
#define LM32_OPCODE(insn) ((insn >> 26) & 0x3f)
@@ -261,7 +261,6 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct value *arg = args[i];
struct type *arg_type = check_typedef (value_type (arg));
gdb_byte *contents;
- int len;
ULONGEST val;
/* Promote small integer types to int. */
@@ -283,8 +282,8 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
/* FIXME: Handle structures. */
contents = (gdb_byte *) value_contents (arg);
- len = TYPE_LENGTH (arg_type);
- val = extract_unsigned_integer (contents, len, byte_order);
+ val = extract_unsigned_integer (contents, TYPE_LENGTH (arg_type),
+ byte_order);
/* First num_arg_regs parameters are passed by registers,
and the rest are passed on the stack. */
@@ -292,7 +291,7 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
else
{
- write_memory (sp, (void *) &val, len);
+ write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
sp -= 4;
}
}
« no previous file with comments | « gdb/linux-thread-db.c ('k') | gdb/m2-exp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698