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

Unified Diff: gdb/frv-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/frv-tdep.h ('k') | gdb/gcore.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/frv-tdep.c
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 9262b103aa8d789ff26d0005b0a7beee5570e276..9819d42a361e9c3d5c1b7d9b0d320f9304f16de5 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
- Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
#include "inferior.h"
#include "gdbcore.h"
#include "arch-utils.h"
@@ -233,7 +233,7 @@ set_variant_num_gprs (struct gdbarch_tdep *var, int num_gprs)
{
char buf[20];
- sprintf (buf, "gr%d", r);
+ xsnprintf (buf, sizeof (buf), "gr%d", r);
var->register_names[first_gpr_regnum + r] = xstrdup (buf);
}
}
@@ -252,7 +252,7 @@ set_variant_num_fprs (struct gdbarch_tdep *var, int num_fprs)
{
char buf[20];
- sprintf (buf, "fr%d", r);
+ xsnprintf (buf, sizeof (buf), "fr%d", r);
var->register_names[first_fpr_regnum + r] = xstrdup (buf);
}
}
@@ -351,7 +351,7 @@ frv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int raw_regnum = accg0123_regnum + (reg - accg0_regnum) / 4;
int byte_num = (reg - accg0_regnum) % 4;
- char buf[4];
+ gdb_byte buf[4];
regcache_raw_read (regcache, raw_regnum, buf);
buf[byte_num] = ((bfd_byte *) buffer)[0];
@@ -456,7 +456,7 @@ frv_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
an instruction word whose packing bit is set to one. */
while (count-- > 0 && addr >= func_start)
{
- char instr[frv_instr_size];
+ gdb_byte instr[frv_instr_size];
int status;
status = target_read_memory (addr, instr, sizeof instr);
@@ -602,7 +602,7 @@ frv_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
/* Scan the prologue. */
while (pc < lim_pc)
{
- char buf[frv_instr_size];
+ gdb_byte buf[frv_instr_size];
LONGEST op;
if (target_read_memory (pc, buf, sizeof buf) != 0)
@@ -1072,7 +1072,7 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
LONGEST displ;
CORE_ADDR call_dest;
- struct minimal_symbol *s;
+ struct bound_minimal_symbol s;
displ = ((op & 0xfe000000) >> 7) | (op & 0x0003ffff);
if ((displ & 0x00800000) != 0)
@@ -1081,9 +1081,9 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
call_dest = pc + 4 * displ;
s = lookup_minimal_symbol_by_pc (call_dest);
- if (s != NULL
- && SYMBOL_LINKAGE_NAME (s) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s), "__main") == 0)
+ if (s.minsym != NULL
+ && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
{
pc += 4;
return pc;
@@ -1154,7 +1154,7 @@ find_func_descr (struct gdbarch *gdbarch, CORE_ADDR entry_point)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR descr;
- char valbuf[4];
+ gdb_byte valbuf[4];
CORE_ADDR start_addr;
/* If we can't find the function in the symbol table, then we assume
@@ -1206,8 +1206,8 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argreg;
int argnum;
- char *val;
- char valbuf[4];
+ const gdb_byte *val;
+ gdb_byte valbuf[4];
struct value *arg;
struct type *arg_type;
int len;
@@ -1274,7 +1274,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
else
{
- val = (char *) value_contents (arg);
+ val = value_contents (arg);
}
while (len > 0)
« no previous file with comments | « gdb/frv-tdep.h ('k') | gdb/gcore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698