X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fxstormy16-tdep.c;h=9692742189ae55c37542aa6d366986af9ef7b43d;hb=621661e3faf809d4f28bb84e94e30c1c8a8cc933;hp=d5e315c4df65e5f979d3ea1088136c9f4b71db20;hpb=ecfb0d68c570de8a5e29858d104d82a76982de15;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index d5e315c4df..9692742189 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor. - Copyright (C) 2001-2005, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -29,8 +29,6 @@ #include "value.h" #include "dis-asm.h" #include "inferior.h" -#include "gdb_string.h" -#include "gdb_assert.h" #include "arch-utils.h" #include "floatformat.h" #include "regcache.h" @@ -160,13 +158,13 @@ xstormy16_use_struct_convention (struct type *type) static void xstormy16_extract_return_value (struct type *type, struct regcache *regcache, - void *valbuf) + gdb_byte *valbuf) { int len = TYPE_LENGTH (type); int i, regnum = E_1ST_ARG_REGNUM; for (i = 0; i < len; i += xstormy16_reg_size) - regcache_raw_read (regcache, regnum++, (char *) valbuf + i); + regcache_raw_read (regcache, regnum++, valbuf + i); } /* Function: xstormy16_store_return_value @@ -176,12 +174,12 @@ xstormy16_extract_return_value (struct type *type, struct regcache *regcache, static void xstormy16_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { if (TYPE_LENGTH (type) == 1) { /* Add leading zeros to the value. */ - char buf[xstormy16_reg_size]; + gdb_byte buf[xstormy16_reg_size]; memset (buf, 0, xstormy16_reg_size); memcpy (buf, valbuf, 1); regcache_raw_write (regcache, E_1ST_ARG_REGNUM, buf); @@ -192,7 +190,7 @@ xstormy16_store_return_value (struct type *type, struct regcache *regcache, int i, regnum = E_1ST_ARG_REGNUM; for (i = 0; i < len; i += xstormy16_reg_size) - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + regcache_raw_write (regcache, regnum++, valbuf + i); } } @@ -238,7 +236,7 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch, int i, j; int typelen, slacklen; const gdb_byte *val; - char buf[xstormy16_pc_size]; + gdb_byte buf[xstormy16_pc_size]; /* If struct_return is true, then the struct return address will consume one argument-passing register. */ @@ -278,7 +276,7 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch, wordaligned. */ for (j = nargs - 1; j >= i; j--) { - char *val; + gdb_byte *val; struct cleanup *back_to; const gdb_byte *bytes = value_contents (args[j]); @@ -376,7 +374,7 @@ xstormy16_analyze_prologue (struct gdbarch *gdbarch, /* Probably only in optimized case but legal action for prologue. */ else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */ && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070 - && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d) + && (inst & 0x000f) >= 0x000a && (inst & 0x000f) <= 0x000d) ; /* Optional copying of args in r2-r7 to stack. */ @@ -505,7 +503,7 @@ xstormy16_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc) return 0; } -const static unsigned char * +static const unsigned char * xstormy16_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { @@ -525,7 +523,7 @@ xstormy16_resolve_jmp_table_entry (struct gdbarch *gdbarch, CORE_ADDR faddr) if (faddr_sect) { LONGEST inst, inst2, addr; - char buf[2 * xstormy16_inst_size]; + gdb_byte buf[2 * xstormy16_inst_size]; /* Return faddr if it's not pointing into the jump table. */ if (strcmp (faddr_sect->the_bfd_section->name, ".plt")) @@ -577,7 +575,7 @@ xstormy16_find_jmp_table_entry (struct gdbarch *gdbarch, CORE_ADDR faddr) for (; addr < endaddr; addr += 2 * xstormy16_inst_size) { LONGEST inst, inst2, faddr2; - char buf[2 * xstormy16_inst_size]; + gdb_byte buf[2 * xstormy16_inst_size]; if (target_read_memory (addr, buf, sizeof buf)) return 0;