summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-03-01 15:38:27 +0000
committerPedro Alves <palves@redhat.com>2013-03-01 15:38:27 +0000
commite362b51003ad60f4984bf7bed3bc02259db10546 (patch)
tree2145fffb0d0426826038d3d609dc278027f666a3 /gdb
parent75cc61ca4a2bfd2dc81eec6ee0c2fe571a0f208d (diff)
downloadbinutils-gdb-e362b51003ad60f4984bf7bed3bc02259db10546.tar.gz
Use gdb_byte for bytes from the program being debugged.
gdb_byte should be used for bytes from the program being debugged. We have many places using char or unsigned char instead all over the existing ports, and more ends up added over time due to copy/paste as new code is based on old code. I've greped the tree for "char buf[", and fixed all I found. Tested by building with --enable-targets=all. 2013-03-01 Pedro Alves <palves@redhat.com> Use gdb_byte for bytes from the program being debugged. * arm-tdep.c (arm_store_return_value, arm_get_longjmp_target): Change type of local 'buf' to gdb_byte. * avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * cris-tdep.c (cris_sigcontext_addr) (cris_sigtramp_frame_unwind_cache): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp) (frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Likewise. * frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise. * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer) (hppa32_hpux_search_dummy_call_sequence) (hppa_hpux_supply_save_state): Likewise. * hppa-linux-tdep.c (insns_match_pattern) (hppa_linux_find_global_pointer): Likewise. * hppa-tdep.c (hppa_in_function_epilogue_p) (skip_prologue_hard_way, hppa_frame_cache): Likewise. * i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise. * i386fbsd-tdep.c (i386fbsd_supply_uthread) (i386fbsd_collect_uthread): Likewise. * ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise. * ia64-tdep.c (examine_prologue, ia64_frame_cache) (ia64_frame_prev_register, ia64_sigtramp_frame_cache) (ia64_sigtramp_frame_prev_register, ia64_access_reg) (ia64_access_rse_reg, ia64_libunwind_frame_this_id) (ia64_libunwind_frame_prev_register) (ia64_libunwind_sigtramp_frame_this_id) (ia64_find_global_pointer_from_dynamic_section) (find_extant_func_descr, find_func_descr, ia64_dummy_id) (ia64_unwind_pc): Likewise. * iq2000-tdep.c (iq2000_store_return_value): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call) (m68hc11_extract_return_value): Likewise. * m68klinux-nat.c (fetch_register, store_register): Likewise. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write) (mep_get_insn, mep_push_dummy_call): Likewise. * mips-linux-tdep.c (mips_linux_get_longjmp_target) (mips_linux_in_dynsym_stub): Likewise. * mn10300-tdep.c (mep_pseudo_cr32_write): Likewise. * ppc-linux-nat.c (fetch_register, store_register): Likewise. * regcache.c (dump_endian_bytes): Change type of parameter 'buf' to gdb_byte. * remote-mips.c (mips_set_register): Likewise. * remote-sim.c (gdbsim_fetch_register): Likewise. * score-tdep.c (score7_fetch_inst): Change type of parameter 'memblock' and local 'buf' to gdb_byte. (score7_malloc_and_get_memblock): Change return type to gdb_byte. Change type of local 'buf' to gdb_byte. Adjust. (score7_adjust_memblock_ptr): Change type of parameter 'memblock' to gdb_byte**. (score7_analyze_prologue): Change type of 'memblock' and 'memblock_ptr' locals to gdb_byte*. * sh64-tdep.c (sh64_extract_return_value) (sh64_store_return_value): Change type of local 'buf' to gdb_byte. * solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr): * solib-pa64.c (pa64_solib_create_inferior_hook) (pa64_open_symbol_file_object): Remove local 'buf'. * solib-som.c (som_solib_create_inferior_hook, link_map_start) (som_open_symbol_file_object): Likewise. * solib-spu.c (spu_current_sos): Likewise. * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise. * spu-multiarch.c (parse_spufs_run, spu_fetch_registers) (spu_store_registers): Likewise. * target.c (debug_print_register): Likewise. * tic6x-tdep.c (tic6x_get_longjmp_target): Likewise. * xstormy16-tdep.c (xstormy16_store_return_value) (xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry) (xstormy16_find_jmp_table_entry): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog74
-rw-r--r--gdb/arm-tdep.c4
-rw-r--r--gdb/avr-tdep.c4
-rw-r--r--gdb/bfin-tdep.c2
-rw-r--r--gdb/cris-tdep.c4
-rw-r--r--gdb/frv-linux-tdep.c6
-rw-r--r--gdb/frv-tdep.c4
-rw-r--r--gdb/hppa-hpux-tdep.c8
-rw-r--r--gdb/hppa-linux-tdep.c6
-rw-r--r--gdb/hppa-tdep.c6
-rw-r--r--gdb/i386-nto-tdep.c2
-rw-r--r--gdb/i386fbsd-tdep.c4
-rw-r--r--gdb/ia64-hpux-tdep.c2
-rw-r--r--gdb/ia64-linux-tdep.c2
-rw-r--r--gdb/ia64-tdep.c32
-rw-r--r--gdb/iq2000-tdep.c2
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68klinux-nat.c4
-rw-r--r--gdb/mep-tdep.c8
-rw-r--r--gdb/mips-linux-tdep.c4
-rw-r--r--gdb/mn10300-tdep.c2
-rw-r--r--gdb/ppc-linux-nat.c4
-rw-r--r--gdb/regcache.c4
-rw-r--r--gdb/remote-mips.c2
-rw-r--r--gdb/remote-sim.c4
-rw-r--r--gdb/score-tdep.c16
-rw-r--r--gdb/sh64-tdep.c4
-rw-r--r--gdb/solib-darwin.c4
-rw-r--r--gdb/solib-pa64.c2
-rw-r--r--gdb/solib-som.c6
-rw-r--r--gdb/solib-spu.c2
-rw-r--r--gdb/spu-linux-nat.c2
-rw-r--r--gdb/spu-multiarch.c14
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/tic6x-tdep.c2
-rw-r--r--gdb/xstormy16-tdep.c8
36 files changed, 167 insertions, 93 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 425668fc7a2..92d2209a219 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,77 @@
+2013-03-01 Pedro Alves <palves@redhat.com>
+
+ Use gdb_byte for bytes from the program being debugged.
+
+ * arm-tdep.c (arm_store_return_value, arm_get_longjmp_target):
+ Change type of local 'buf' to gdb_byte.
+ * avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise.
+ * bfin-tdep.c (bfin_push_dummy_call): Likewise.
+ * cris-tdep.c (cris_sigcontext_addr)
+ (cris_sigtramp_frame_unwind_cache): Likewise.
+ * frv-linux-tdep.c (frv_linux_pc_in_sigtramp)
+ (frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
+ Likewise.
+ * frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise.
+ * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer)
+ (hppa32_hpux_search_dummy_call_sequence)
+ (hppa_hpux_supply_save_state): Likewise.
+ * hppa-linux-tdep.c (insns_match_pattern)
+ (hppa_linux_find_global_pointer): Likewise.
+ * hppa-tdep.c (hppa_in_function_epilogue_p)
+ (skip_prologue_hard_way, hppa_frame_cache): Likewise.
+ * i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise.
+ * i386fbsd-tdep.c (i386fbsd_supply_uthread)
+ (i386fbsd_collect_uthread): Likewise.
+ * ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise.
+ * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise.
+ * ia64-tdep.c (examine_prologue, ia64_frame_cache)
+ (ia64_frame_prev_register, ia64_sigtramp_frame_cache)
+ (ia64_sigtramp_frame_prev_register, ia64_access_reg)
+ (ia64_access_rse_reg, ia64_libunwind_frame_this_id)
+ (ia64_libunwind_frame_prev_register)
+ (ia64_libunwind_sigtramp_frame_this_id)
+ (ia64_find_global_pointer_from_dynamic_section)
+ (find_extant_func_descr, find_func_descr, ia64_dummy_id)
+ (ia64_unwind_pc): Likewise.
+ * iq2000-tdep.c (iq2000_store_return_value): Likewise.
+ * m68hc11-tdep.c (m68hc11_push_dummy_call)
+ (m68hc11_extract_return_value): Likewise.
+ * m68klinux-nat.c (fetch_register, store_register): Likewise.
+ * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write)
+ (mep_get_insn, mep_push_dummy_call): Likewise.
+ * mips-linux-tdep.c (mips_linux_get_longjmp_target)
+ (mips_linux_in_dynsym_stub): Likewise.
+ * mn10300-tdep.c (mep_pseudo_cr32_write): Likewise.
+ * ppc-linux-nat.c (fetch_register, store_register): Likewise.
+ * regcache.c (dump_endian_bytes): Change type of parameter 'buf'
+ to gdb_byte.
+ * remote-mips.c (mips_set_register): Likewise.
+ * remote-sim.c (gdbsim_fetch_register): Likewise.
+ * score-tdep.c (score7_fetch_inst): Change type of parameter
+ 'memblock' and local 'buf' to gdb_byte.
+ (score7_malloc_and_get_memblock): Change return type to gdb_byte.
+ Change type of local 'buf' to gdb_byte. Adjust.
+ (score7_adjust_memblock_ptr): Change type of parameter 'memblock'
+ to gdb_byte**.
+ (score7_analyze_prologue): Change type of 'memblock' and
+ 'memblock_ptr' locals to gdb_byte*.
+ * sh64-tdep.c (sh64_extract_return_value)
+ (sh64_store_return_value): Change type of local 'buf' to gdb_byte.
+ * solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr):
+ * solib-pa64.c (pa64_solib_create_inferior_hook)
+ (pa64_open_symbol_file_object): Remove local 'buf'.
+ * solib-som.c (som_solib_create_inferior_hook, link_map_start)
+ (som_open_symbol_file_object): Likewise.
+ * solib-spu.c (spu_current_sos): Likewise.
+ * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
+ * spu-multiarch.c (parse_spufs_run, spu_fetch_registers)
+ (spu_store_registers): Likewise.
+ * target.c (debug_print_register): Likewise.
+ * tic6x-tdep.c (tic6x_get_longjmp_target): Likewise.
+ * xstormy16-tdep.c (xstormy16_store_return_value)
+ (xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry)
+ (xstormy16_find_jmp_table_entry): Likewise.
+
2013-03-01 Jiong Wang <jiwang@tilera.com>
* tilegx-tdep.c (tilegx_get_longjmp_target): New function.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index ead09d7872f..d890dcbbac2 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -9043,7 +9043,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
switch (gdbarch_tdep (gdbarch)->fp_model)
{
@@ -9207,7 +9207,7 @@ arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR jb_addr;
- char buf[INT_REGISTER_SIZE];
+ gdb_byte buf[INT_REGISTER_SIZE];
jb_addr = get_frame_register_unsigned (frame, ARM_A1_REGNUM);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 9dd807f8eec..b14bf83612e 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1103,7 +1103,7 @@ avr_frame_prev_register (struct frame_info *this_frame,
everything else about the avr is little endian. Ick! */
ULONGEST pc;
int i;
- unsigned char buf[3];
+ gdb_byte buf[3];
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -1245,7 +1245,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i;
- unsigned char buf[3];
+ gdb_byte buf[3];
int call_length = gdbarch_tdep (gdbarch)->call_length;
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
int regnum = AVR_ARGN_REGNUM;
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index d7fcccb91c9..22dad1b9e7e 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -503,7 +503,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
int i;
long reg_r0, reg_r1, reg_r2;
int total_len = 0;
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index c96315b6d2a..ce916dd2d39 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -261,7 +261,7 @@ cris_sigcontext_addr (struct frame_info *this_frame)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc;
CORE_ADDR sp;
- char buf[4];
+ gdb_byte buf[4];
get_frame_register (this_frame, gdbarch_sp_regnum (gdbarch), buf);
sp = extract_unsigned_integer (buf, 4, byte_order);
@@ -323,7 +323,7 @@ cris_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct cris_unwind_cache *info;
CORE_ADDR addr;
- char buf[4];
+ gdb_byte buf[4];
int i;
if ((*this_cache))
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index b5ff9ee25c9..eb6fcf9d671 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -46,7 +46,7 @@ frv_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc,
const char *name)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[frv_instr_size];
+ gdb_byte buf[frv_instr_size];
LONGEST instr;
int retval = 0;
@@ -182,7 +182,7 @@ frv_linux_sigcontext_reg_addr (struct frame_info *this_frame, int regno,
else
{
CORE_ADDR pc, sp;
- char buf[4];
+ gdb_byte buf[4];
int tramp_type;
pc = get_frame_pc (this_frame);
@@ -266,7 +266,7 @@ frv_linux_sigtramp_frame_cache (struct frame_info *this_frame,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct trad_frame_cache *cache;
CORE_ADDR addr;
- char buf[4];
+ gdb_byte buf[4];
int regnum;
CORE_ADDR sc_addr_cache_val = 0;
struct frame_id this_id;
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 88a2175e2bc..61997093174 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -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];
@@ -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)
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 450c11430f4..aacb0a3fdea 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -772,7 +772,7 @@ hppa32_hpux_find_global_pointer (struct gdbarch *gdbarch,
if (faddr & 2)
{
int status;
- char buf[4];
+ gdb_byte buf[4];
faddr &= ~3;
@@ -790,7 +790,7 @@ hppa64_hpux_find_global_pointer (struct gdbarch *gdbarch,
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR faddr;
- char buf[32];
+ gdb_byte buf[32];
faddr = value_as_address (function);
@@ -857,7 +857,7 @@ hppa32_hpux_search_dummy_call_sequence (struct gdbarch *gdbarch, CORE_ADDR pc,
struct frame_info *frame;
struct unwind_table_entry *u;
CORE_ADDR addr, rp;
- char buf[4];
+ gdb_byte buf[4];
unsigned int insn;
sec = find_pc_section (pc);
@@ -1355,7 +1355,7 @@ hppa_hpux_supply_save_state (const struct regset *regset,
if (regnum == -1 || regnum == HPPA_FLAGS_REGNUM)
{
size_t size = register_size (gdbarch, HPPA_FLAGS_REGNUM);
- char buf[8];
+ gdb_byte buf[8];
store_unsigned_integer (buf, size, byte_order, flags);
regcache_raw_supply (regcache, HPPA_FLAGS_REGNUM, buf);
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 7d29561b6b3..dde237470d5 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -98,7 +98,7 @@ insns_match_pattern (struct gdbarch *gdbarch, CORE_ADDR pc,
for (i = 0; pattern[i].mask; i++)
{
- char buf[4];
+ gdb_byte buf[4];
target_read_memory (npc, buf, 4);
insn[i] = extract_unsigned_integer (buf, 4, byte_order);
@@ -344,7 +344,7 @@ hppa_linux_find_global_pointer (struct gdbarch *gdbarch,
if (faddr & 2)
{
int status;
- char buf[4];
+ gdb_byte buf[4];
faddr &= ~3;
@@ -381,7 +381,7 @@ hppa_linux_find_global_pointer (struct gdbarch *gdbarch,
{
int status;
LONGEST tag;
- char buf[4];
+ gdb_byte buf[4];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 837b10ca9cc..d09bf68b9dc 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -541,7 +541,7 @@ hppa_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long status;
unsigned int inst;
- char buf[4];
+ gdb_byte buf[4];
status = target_read_memory (pc, buf, 4);
if (status != 0)
@@ -1446,7 +1446,7 @@ skip_prologue_hard_way (struct gdbarch *gdbarch, CORE_ADDR pc,
int stop_before_branch)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
CORE_ADDR orig_pc = pc;
unsigned long inst, stack_remaining, save_gr, save_fr, save_rp, save_sp;
unsigned long args_stored, status, i, restart_gr, restart_fr;
@@ -1897,7 +1897,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
pc += 4)
{
int reg;
- char buf4[4];
+ gdb_byte buf4[4];
long inst;
if (!safe_frame_unwind_memory (this_frame, pc, buf4, sizeof buf4))
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index c8fcc5fb9fd..e39e805e0a2 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -294,7 +294,7 @@ i386nto_sigcontext_addr (struct frame_info *this_frame)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
CORE_ADDR ptrctx;
/* We store __ucontext_t addr in EDI register. */
diff --git a/gdb/i386fbsd-tdep.c b/gdb/i386fbsd-tdep.c
index d92a2d6184e..2b49f80c2c5 100644
--- a/gdb/i386fbsd-tdep.c
+++ b/gdb/i386fbsd-tdep.c
@@ -86,7 +86,7 @@ static void
i386fbsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
- char buf[4];
+ gdb_byte buf[4];
int i;
gdb_assert (regnum >= -1);
@@ -106,7 +106,7 @@ static void
i386fbsd_collect_uthread (const struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
- char buf[4];
+ gdb_byte buf[4];
int i;
gdb_assert (regnum >= -1);
diff --git a/gdb/ia64-hpux-tdep.c b/gdb/ia64-hpux-tdep.c
index a8db53347d9..d6a0ff909fb 100644
--- a/gdb/ia64-hpux-tdep.c
+++ b/gdb/ia64-hpux-tdep.c
@@ -265,7 +265,7 @@ ia64_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
{
ULONGEST cfm;
int sof, sol, sor, soo;
- char buf[16];
+ gdb_byte buf[16];
regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
sof = cfm & 0x7f;
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index d3bf520e275..35ee4e2f9d9 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -54,7 +54,7 @@ ia64_linux_sigcontext_register_address (struct gdbarch *gdbarch,
CORE_ADDR sp, int regno)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR sigcontext_addr = 0;
/* The address of the sigcontext area is found at offset 16 in the
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index c3611a9524e..29714a8e7a7 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1380,7 +1380,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
int frameless = 1;
int i;
CORE_ADDR addr;
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR bof, sor, sol, sof, cfm, rrb_gr;
memset (instores, 0, sizeof instores);
@@ -1514,7 +1514,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
else if (qp == 0 && rN == 2
&& ((rM == fp_reg && fp_reg != 0) || rM == 12))
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
CORE_ADDR saved_sp = 0;
/* adds r2, spilloffset, rFramePointer
or
@@ -1850,7 +1850,7 @@ ia64_frame_cache (struct frame_info *this_frame, void **this_cache)
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct ia64_frame_cache *cache;
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR cfm, psr;
if (*this_cache)
@@ -1918,7 +1918,7 @@ ia64_frame_prev_register (struct frame_info *this_frame, void **this_cache,
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct ia64_frame_cache *cache = ia64_frame_cache (this_frame, this_cache);
- char buf[8];
+ gdb_byte buf[8];
gdb_assert (regnum >= 0);
@@ -2238,7 +2238,7 @@ ia64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct ia64_frame_cache *cache;
- char buf[8];
+ gdb_byte buf[8];
if (*this_cache)
return *this_cache;
@@ -2288,7 +2288,7 @@ static struct value *
ia64_sigtramp_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2494,7 +2494,7 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
long new_sof, old_sof;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
@@ -2574,7 +2574,7 @@ ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
long new_sof, old_sof;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
@@ -2929,7 +2929,7 @@ ia64_libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct frame_id id = outer_frame_id;
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR bsp;
libunwind_frame_this_id (this_frame, this_cache, &id);
@@ -2981,7 +2981,7 @@ ia64_libunwind_frame_prev_register (struct frame_info *this_frame,
{
int rrb_pr = 0;
ULONGEST cfm;
- unsigned char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
/* Fetch predicate register rename base from current frame
marker for this frame. */
@@ -3060,7 +3060,7 @@ ia64_libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR bsp;
struct frame_id id = outer_frame_id;
CORE_ADDR prev_ip;
@@ -3480,7 +3480,7 @@ ia64_find_global_pointer_from_dynamic_section (struct gdbarch *gdbarch,
{
int status;
LONGEST tag;
- char buf[8];
+ gdb_byte buf[8];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
@@ -3563,7 +3563,7 @@ find_extant_func_descr (struct gdbarch *gdbarch, CORE_ADDR faddr)
{
int status;
LONGEST faddr2;
- char buf[8];
+ gdb_byte buf[8];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
@@ -3596,7 +3596,7 @@ find_func_descr (struct regcache *regcache, CORE_ADDR faddr, CORE_ADDR *fdaptr)
if (fdesc == 0)
{
ULONGEST global_pointer;
- char buf[16];
+ gdb_byte buf[16];
fdesc = *fdaptr;
*fdaptr += 16;
@@ -3903,7 +3903,7 @@ static struct frame_id
ia64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR sp, bsp;
get_frame_register (this_frame, sp_regnum, buf);
@@ -3925,7 +3925,7 @@ static CORE_ADDR
ia64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR ip, psr, pc;
frame_unwind_register (next_frame, IA64_IP_REGNUM, buf);
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 12362c56f81..d2619ff850d 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -508,7 +508,7 @@ iq2000_store_return_value (struct type *type, struct regcache *regcache,
while (len > 0)
{
- char buf[4];
+ gdb_byte buf[4];
int size = len % 4 ?: 4;
memset (buf, 0, 4);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 9425fe3f098..882f37f5afc 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1174,7 +1174,7 @@ m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
int first_stack_argnum;
struct type *type;
char *val;
- char buf[2];
+ gdb_byte buf[2];
first_stack_argnum = 0;
if (struct_return)
@@ -1288,7 +1288,7 @@ static void
m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
void *valbuf)
{
- char buf[M68HC11_REG_SIZE];
+ gdb_byte buf[M68HC11_REG_SIZE];
regcache_raw_read (regcache, HARD_D_REGNUM, buf);
switch (TYPE_LENGTH (type))
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 19fb7abd3dc..11e8f250aa7 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -109,7 +109,7 @@ fetch_register (struct regcache *regcache, int regno)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
long regaddr, val;
int i;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
int tid;
/* Overload thread id onto process id. */
@@ -164,7 +164,7 @@ store_register (const struct regcache *regcache, int regno)
long regaddr, val;
int i;
int tid;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
/* Overload thread id onto process id. */
tid = TIDGET (inferior_ptid);
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 657ef422095..3d917738ac7 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1143,7 +1143,7 @@ mep_pseudo_cr32_read (struct gdbarch *gdbarch,
/* Read the raw register into a 64-bit buffer, and then return the
appropriate end of that buffer. */
int rawnum = mep_pseudo_to_raw[cookednum];
- char buf64[8];
+ gdb_byte buf64[8];
gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64));
gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4);
@@ -1229,7 +1229,7 @@ mep_pseudo_cr32_write (struct gdbarch *gdbarch,
/* Expand the 32-bit value into a 64-bit value, and write that to
the pseudoregister. */
int rawnum = mep_pseudo_to_raw[cookednum];
- char buf64[8];
+ gdb_byte buf64[8];
gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64));
gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4);
@@ -1430,7 +1430,7 @@ mep_get_insn (struct gdbarch *gdbarch, CORE_ADDR pc, long *insn)
int pc_in_vliw_section;
int vliw_mode;
int insn_len;
- char buf[2];
+ gdb_byte buf[2];
*insn = 0;
@@ -2358,7 +2358,7 @@ mep_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
else
{
- char buf[MEP_GPR_SIZE];
+ gdb_byte buf[MEP_GPR_SIZE];
store_unsigned_integer (buf, MEP_GPR_SIZE, byte_order, value);
write_memory (arg_stack, buf, MEP_GPR_SIZE);
arg_stack += MEP_GPR_SIZE;
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 4589f191371..2ebe2fe316c 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -59,7 +59,7 @@ mips_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
CORE_ADDR jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT];
+ gdb_byte buf[gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT];
jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
@@ -680,7 +680,7 @@ mips_linux_core_read_description (struct gdbarch *gdbarch,
static int
mips_linux_in_dynsym_stub (CORE_ADDR pc, char *name)
{
- unsigned char buf[28], *p;
+ gdb_byte buf[28], *p;
ULONGEST insn, insn1;
int n64 = (mips_abi (target_gdbarch ()) == MIPS_ABI_N64);
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index cc0409fdc4c..06092420c07 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -198,7 +198,7 @@ static void
mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, void *valbuf)
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
int len = TYPE_LENGTH (type);
int reg, regsz;
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index b6defe46847..edb16c0b7a6 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -547,7 +547,7 @@ fetch_register (struct regcache *regcache, int tid, int regno)
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int bytes_transferred;
unsigned int offset; /* Offset of registers within the u area. */
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
if (altivec_register_p (gdbarch, regno))
{
@@ -1034,7 +1034,7 @@ store_register (const struct regcache *regcache, int tid, int regno)
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int i;
size_t bytes_to_transfer;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
if (altivec_register_p (gdbarch, regno))
{
diff --git a/gdb/regcache.c b/gdb/regcache.c
index d413fe889ba..ca00f90d184 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1092,7 +1092,7 @@ reg_flush_command (char *command, int from_tty)
static void
dump_endian_bytes (struct ui_file *file, enum bfd_endian endian,
- const unsigned char *buf, long len)
+ const gdb_byte *buf, long len)
{
int i;
@@ -1130,7 +1130,7 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
int footnote_register_offset = 0;
int footnote_register_type_name_null = 0;
long register_offset = 0;
- unsigned char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
#if 0
fprintf_unfiltered (file, "nr_raw_registers %d\n",
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index e20a740663d..f832d84bade 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1794,7 +1794,7 @@ mips_signal_from_protocol (int sig)
static void
mips_set_register (int regno, ULONGEST value)
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 7918cfce26b..860eaf33adf 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -446,7 +446,7 @@ gdbsim_fetch_register (struct target_ops *ops,
{
/* For moment treat a `does not exist' register the same way
as an ``unavailable'' register. */
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
int nr_bytes;
memset (buf, 0, MAX_REGISTER_SIZE);
@@ -457,7 +457,7 @@ gdbsim_fetch_register (struct target_ops *ops,
default:
{
static int warn_user = 1;
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
int nr_bytes;
gdb_assert (regno >= 0 && regno < gdbarch_num_regs (gdbarch));
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index 0637a723616..46257ba87fe 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -137,11 +137,11 @@ score_print_insn (bfd_vma memaddr, struct disassemble_info *info)
}
static inst_t *
-score7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, char *memblock)
+score7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
static inst_t inst = { 0, 0, 0 };
- char buf[SCORE_INSTLEN] = { 0 };
+ gdb_byte buf[SCORE_INSTLEN] = { 0 };
int big;
int ret;
@@ -807,11 +807,11 @@ score3_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
return 0;
}
-static char *
+static gdb_byte *
score7_malloc_and_get_memblock (CORE_ADDR addr, CORE_ADDR size)
{
int ret;
- char *memblock = NULL;
+ gdb_byte *memblock = NULL;
if (size < 0)
{
@@ -822,7 +822,7 @@ score7_malloc_and_get_memblock (CORE_ADDR addr, CORE_ADDR size)
else if (size == 0)
return NULL;
- memblock = (char *) xmalloc (size);
+ memblock = xmalloc (size);
memset (memblock, 0, size);
ret = target_read_memory (addr & ~0x3, memblock, size);
if (ret)
@@ -841,7 +841,7 @@ score7_free_memblock (char *memblock)
}
static void
-score7_adjust_memblock_ptr (char **memblock, CORE_ADDR prev_pc,
+score7_adjust_memblock_ptr (gdb_byte **memblock, CORE_ADDR prev_pc,
CORE_ADDR cur_pc)
{
if (prev_pc == -1)
@@ -877,8 +877,8 @@ score7_analyze_prologue (CORE_ADDR startaddr, CORE_ADDR pc,
int fp_offset_p = 0;
int inst_len = 0;
- char *memblock = NULL;
- char *memblock_ptr = NULL;
+ gdb_byte *memblock = NULL;
+ gdb_byte *memblock_ptr = NULL;
CORE_ADDR prev_pc = -1;
/* Allocate MEMBLOCK if PC - STARTADDR > 0. */
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index d4253fba8bf..cb035274d43 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -1261,7 +1261,7 @@ sh64_extract_return_value (struct type *type, struct regcache *regcache,
if (len <= 8)
{
int offset;
- char buf[8];
+ gdb_byte buf[8];
/* Result is in register 2. If smaller than 8 bytes, it is padded
at the most significant end. */
regcache_raw_read (regcache, DEFAULT_RETURN_REGNUM, buf);
@@ -1290,7 +1290,7 @@ sh64_store_return_value (struct type *type, struct regcache *regcache,
const void *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- char buf[64]; /* more than enough... */
+ gdb_byte buf[64]; /* more than enough... */
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 93212bdf0db..b9a4be1c600 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -269,7 +269,7 @@ darwin_current_sos (void)
for (i = 0; i < info->all_image.count; i++)
{
CORE_ADDR iinfo = info->all_image.info + i * image_info_size;
- char buf[image_info_size];
+ gdb_byte buf[image_info_size];
CORE_ADDR load_addr;
CORE_ADDR path_addr;
struct mach_o_header_external hdr;
@@ -347,7 +347,7 @@ darwin_read_exec_load_addr (struct darwin_info *info)
for (i = 0; i < info->all_image.count; i++)
{
CORE_ADDR iinfo = info->all_image.info + i * image_info_size;
- char buf[image_info_size];
+ gdb_byte buf[image_info_size];
CORE_ADDR load_addr;
struct mach_o_header_external hdr;
unsigned long hdr_val;
diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c
index eb27b4092a3..f646cfb0abb 100644
--- a/gdb/solib-pa64.c
+++ b/gdb/solib-pa64.c
@@ -298,7 +298,6 @@ pa64_solib_create_inferior_hook (int from_tty)
struct minimal_symbol *msymbol;
unsigned int dld_flags, status;
asection *shlib_info, *interp_sect;
- char buf[4];
struct objfile *objfile;
CORE_ADDR anaddr;
@@ -488,7 +487,6 @@ static int
pa64_open_symbol_file_object (void *from_ttyp)
{
int from_tty = *(int *)from_ttyp;
- char buf[4];
struct load_module_desc dll_desc;
char *dll_path;
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index bd763b8ccd2..ff7fbaa1ffb 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -189,7 +189,7 @@ som_solib_create_inferior_hook (int from_tty)
struct minimal_symbol *msymbol;
unsigned int dld_flags, status, have_endo;
asection *shlib_info;
- char buf[4];
+ gdb_byte buf[4];
CORE_ADDR anaddr;
if (symfile_objfile == NULL)
@@ -528,7 +528,7 @@ link_map_start (void)
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
struct minimal_symbol *sym;
CORE_ADDR addr;
- char buf[4];
+ gdb_byte buf[4];
unsigned int dld_flags;
sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
@@ -697,7 +697,7 @@ som_open_symbol_file_object (void *from_ttyp)
char *filename;
int errcode;
int from_tty = *(int *)from_ttyp;
- char buf[4];
+ gdb_byte buf[4];
if (symfile_objfile)
if (!query (_("Attempt to reload symbols from process? ")))
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 6eb45a507b6..7be5232ed3c 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -162,7 +162,7 @@ spu_current_sos (void)
struct so_list *head;
struct so_list **link_ptr;
- char buf[MAX_SPE_FD * 4];
+ gdb_byte buf[MAX_SPE_FD * 4];
int i, size;
/* First, retrieve the SVR4 shared library list. */
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index ecba0f266c8..ca8d92d33ac 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -493,7 +493,7 @@ spu_fetch_inferior_registers (struct target_ops *ops,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, fd);
regcache_raw_supply (regcache, SPU_ID_REGNUM, buf);
}
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index 53e50a254b9..0922d042298 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -60,7 +60,7 @@ parse_spufs_run (ptid_t ptid, int *fd, CORE_ADDR *addr)
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
struct gdbarch_tdep *tdep;
struct regcache *regcache;
- char buf[4];
+ gdb_byte buf[4];
ULONGEST regval;
/* If we're not on PPU, there's nothing to detect. */
@@ -163,7 +163,7 @@ spu_fetch_registers (struct target_ops *ops,
/* The ID register holds the spufs file handle. */
if (regno == -1 || regno == SPU_ID_REGNUM)
{
- char buf[4];
+ gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, spufs_fd);
regcache_raw_supply (regcache, SPU_ID_REGNUM, buf);
}
@@ -171,7 +171,7 @@ spu_fetch_registers (struct target_ops *ops,
/* The NPC register is found in PPC memory at SPUFS_ADDR. */
if (regno == -1 || regno == SPU_PC_REGNUM)
{
- char buf[4];
+ gdb_byte buf[4];
if (target_read (ops_beneath, TARGET_OBJECT_MEMORY, NULL,
buf, spufs_addr, sizeof buf) == sizeof buf)
@@ -181,7 +181,8 @@ spu_fetch_registers (struct target_ops *ops,
/* The GPRs are found in the "regs" spufs file. */
if (regno == -1 || (regno >= 0 && regno < SPU_NUM_GPRS))
{
- char buf[16 * SPU_NUM_GPRS], annex[32];
+ gdb_byte buf[16 * SPU_NUM_GPRS];
+ char annex[32];
int i;
xsnprintf (annex, sizeof annex, "%d/regs", spufs_fd);
@@ -220,7 +221,7 @@ spu_store_registers (struct target_ops *ops,
/* The NPC register is found in PPC memory at SPUFS_ADDR. */
if (regno == -1 || regno == SPU_PC_REGNUM)
{
- char buf[4];
+ gdb_byte buf[4];
regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
target_write (ops_beneath, TARGET_OBJECT_MEMORY, NULL,
@@ -230,7 +231,8 @@ spu_store_registers (struct target_ops *ops,
/* The GPRs are found in the "regs" spufs file. */
if (regno == -1 || (regno >= 0 && regno < SPU_NUM_GPRS))
{
- char buf[16 * SPU_NUM_GPRS], annex[32];
+ gdb_byte buf[16 * SPU_NUM_GPRS];
+ char annex[32];
int i;
for (i = 0; i < SPU_NUM_GPRS; i++)
diff --git a/gdb/target.c b/gdb/target.c
index 9d8bf6e66b1..ecb1325a410 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3957,7 +3957,7 @@ debug_print_register (const char * func,
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i, size = register_size (gdbarch, regno);
- unsigned char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
regcache_raw_collect (regcache, regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 61cdcb3e3c6..4c44fb9a95a 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -1150,7 +1150,7 @@ tic6x_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR jb_addr;
- char buf[4];
+ gdb_byte buf[4];
/* JMP_BUF is passed by reference in A4. */
jb_addr = get_frame_register_unsigned (frame, 4);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f18714f8a85..1a2ba1dc051 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -181,7 +181,7 @@ xstormy16_store_return_value (struct type *type, struct regcache *regcache,
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);
@@ -238,7 +238,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. */
@@ -525,7 +525,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 +577,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;