+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.
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- char buf[MAX_REGISTER_SIZE];
+ gdb_byte buf[MAX_REGISTER_SIZE];
switch (gdbarch_tdep (gdbarch)->fp_model)
{
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);
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);
{
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;
{
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;
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);
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))
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;
else
{
CORE_ADDR pc, sp;
- char buf[4];
+ gdb_byte buf[4];
int tramp_type;
pc = get_frame_pc (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;
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];
/* 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)
if (faddr & 2)
{
int status;
- char buf[4];
+ gdb_byte buf[4];
faddr &= ~3;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR faddr;
- char buf[32];
+ gdb_byte buf[32];
faddr = value_as_address (function);
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);
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);
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);
if (faddr & 2)
{
int status;
- char buf[4];
+ gdb_byte buf[4];
faddr &= ~3;
{
int status;
LONGEST tag;
- char buf[4];
+ gdb_byte buf[4];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
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)
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;
pc += 4)
{
int reg;
- char buf4[4];
+ gdb_byte buf4[4];
long inst;
if (!safe_frame_unwind_memory (this_frame, pc, buf4, sizeof buf4))
{
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. */
i386fbsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
- char buf[4];
+ gdb_byte buf[4];
int i;
gdb_assert (regnum >= -1);
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);
{
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;
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
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);
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
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)
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);
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;
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);
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);
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);
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);
{
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. */
{
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;
{
int status;
LONGEST tag;
- char buf[8];
+ gdb_byte buf[8];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
{
int status;
LONGEST faddr2;
- char buf[8];
+ gdb_byte buf[8];
status = target_read_memory (addr, buf, sizeof (buf));
if (status != 0)
if (fdesc == 0)
{
ULONGEST global_pointer;
- char buf[16];
+ gdb_byte buf[16];
fdesc = *fdaptr;
*fdaptr += 16;
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);
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);
while (len > 0)
{
- char buf[4];
+ gdb_byte buf[4];
int size = len % 4 ?: 4;
memset (buf, 0, 4);
int first_stack_argnum;
struct type *type;
char *val;
- char buf[2];
+ gdb_byte buf[2];
first_stack_argnum = 0;
if (struct_return)
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))
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. */
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);
/* 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);
/* 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);
int pc_in_vliw_section;
int vliw_mode;
int insn_len;
- char buf[2];
+ gdb_byte buf[2];
*insn = 0;
}
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;
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);
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 ());
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;
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))
{
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))
{
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;
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",
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);
{
/* 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);
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));
}
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;
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)
{
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)
}
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)
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. */
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);
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)
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;
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;
struct minimal_symbol *msymbol;
unsigned int dld_flags, status;
asection *shlib_info, *interp_sect;
- char buf[4];
struct objfile *objfile;
CORE_ADDR anaddr;
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;
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)
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);
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? ")))
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. */
{
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);
}
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. */
/* 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);
}
/* 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)
/* 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);
/* 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,
/* 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++)
{
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, " = ");
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);
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);
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. */
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"))
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;