diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 15:09:46 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 15:09:46 +0000 |
commit | 948f8e3d72fa7047c43a952017ad4a7c9d55ab0d (patch) | |
tree | 536f0a3b3b408b5877ca78e1d0549b0f69dcc9d5 | |
parent | 433730c97306608f78fc8de0a319c9a5c6758db2 (diff) | |
download | gdb-948f8e3d72fa7047c43a952017ad4a7c9d55ab0d.zip gdb-948f8e3d72fa7047c43a952017ad4a7c9d55ab0d.tar.gz gdb-948f8e3d72fa7047c43a952017ad4a7c9d55ab0d.tar.bz2 |
-Wpointer-sign: char -> gdb_byte.
-Wpointer-sign catches all these cases across the codebase that should
be using gdb_byte for raw target bytes. I think these are all
obvious, hence I've collapsed into a single patch.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* aarch64-tdep.c (aarch64_default_breakpoint): Change type to
gdb_byte[].
(aarch64_breakpoint_from_pc): Change return type to gdb_byte *.
* ada-lang.c (ada_value_assign): Use gdb_byte.
* alphanbsd-tdep.c (sigtramp_retcode): Change type to gdb_byte[].
(alphanbsd_sigtramp_offset): Use gdb_byte.
* arm-linux-tdep.c (arm_linux_arm_le_breakpoint)
(arm_linux_arm_be_breakpoint, eabi_linux_arm_le_breakpoint)
(eabi_linux_arm_be_breakpoint, arm_linux_thumb_be_breakpoint)
(arm_linux_thumb_le_breakpoint, arm_linux_thumb2_be_breakpoint)
(arm_linux_thumb2_le_breakpoint): Change type to gdb_byte[].
* arm-tdep.c (arm_stub_unwind_sniffer)
(arm_displaced_init_closure): Use gdb_byte.
(arm_default_arm_le_breakpoint, arm_default_arm_be_breakpoint)
(arm_default_thumb_le_breakpoint)
(arm_default_thumb_be_breakpoint): Change type to gdb_byte[].
* arm-tdep.h (struct gdbarch_tdep) <arm_breakpoint,
thumb_breakpoint, thumb2_breakpoint>: Change type to gdb_byte *.
* arm-wince-tdep.c (arm_wince_le_breakpoint)
(arm_wince_thumb_le_breakpoint): Change type to gdb_byte[].
* armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint)
(arm_nbsd_arm_be_breakpoint, arm_nbsd_thumb_le_breakpoint)
(arm_nbsd_thumb_be_breakpoint): Change type to gdb_byte[].
* armobsd-tdep.c (arm_obsd_thumb_le_breakpoint)
(arm_obsd_thumb_be_breakpoint): Change type to gdb_byte[].
* cris-tdep.c (push_stack_item, cris_push_dummy_call)
(cris_store_return_value, cris_extract_return_value): Use
gdb_byte.
(constraint): Change type of parameter to char * from signed
char*. Use gdb_byte.
* dwarf2loc.c (read_pieced_value, write_pieced_value): Change type
of local buffer to gdb_byte *.
* dwarf2read.c (read_index_from_section): Use gdb_byte.
(create_dwp_hash_table): Change type of locals to gdb_byte *.
(add_address_entry): Change type of local buffer to gdb_byte[].
* frv-tdep.c (frv_adjust_breakpoint_address, find_func_descr)
(frv_push_dummy_call): Use gdb_byte.
* hppa-hpux-tdep.c (hppa_hpux_push_dummy_code)
(hppa_hpux_supply_ss_fpblock, hppa_hpux_supply_ss_wide)
(hppa_hpux_supply_save_state): Use gdb_byte.
* hppa-tdep.c (hppa32_push_dummy_call)
(hppa64_convert_code_addr_to_fptr): Use gdb_byte.
* ia64-tdep.c (extract_bit_field, replace_bit_field)
(slotN_contents, replace_slotN_contents): Change type of parameter
to gdb_byte *.
(fetch_instruction, ia64_pseudo_register_write)
(ia64_register_to_value, ia64_value_to_register)
(ia64_extract_return_value, ia64_store_return_value)
(ia64_push_dummy_call): Use gdb_byte.
* m32c-tdep.c (m32c_return_value): Remove cast.
* m68hc11-tdep.c (m68hc11_pseudo_register_write)
(m68hc11_push_dummy_call, m68hc11_store_return_value): Use
gdb_byte.
* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use gdb_byte.
* mn10300-tdep.c (mn10300_store_return_value)
(mn10300_breakpoint_from_pc, mn10300_push_dummy_call): Use
gdb_byte.
* moxie-tdep.c (moxie_process_readu): Use gdb_byte.
(moxie_process_record): Remove casts.
* ppc-ravenscar-thread.c (supply_register_at_address)
(ppc_ravenscar_generic_store_registers): Use gdb_byte.
* ravenscar-thread.c (get_running_thread_id): Use gdb_byte.
* remote-m32r-sdi.c (m32r_fetch_register): Use gdb_byte.
* remote-mips.c (mips_xfer_memory): Use gdb_byte.
* remote.c (compare_sections_command): Use gdb_byte.
* score-tdep.c (score7_free_memblock): Change type of parameter to
gdb_byte *.
* sh-tdep.c (sh_justify_value_in_reg): Change return type to
gdb_byte *. Use gdb_byte.
(sh_push_dummy_call_fpu): Use gdb_byte.
(sh_extract_return_value_nofpu, sh_extract_return_value_fpu)
(sh_store_return_value_nofpu, sh_store_return_value_fpu)
(sh_register_convert_to_virtual, sh_register_convert_to_raw):
Change parameter type to 'gdb_byte *'. Use gdb_byte.
(sh_pseudo_register_read, sh_pseudo_register_write): Use gdb_byte.
* sh64-tdep.c (sh64_push_dummy_call): Use gdb_byte.
(sh64_store_return_value, sh64_register_convert_to_virtual):
Change parameter type to 'gdb_byte *'. Use gdb_byte.
(sh64_pseudo_register_write): Use gdb_byte.
* solib-darwin.c (darwin_current_sos): Add casts to 'gdb_byte *'.
* solib-irix.c (fetch_lm_info): Likewise. Use gdb_byte for byte
buffer.
(irix_current_sos): Use gdb_byte.
* solib-som.c (som_current_sos): Use gdb_byte.
* sparc-ravenscar-thread.c (supply_register_at_address)
(sparc_ravenscar_generic_store_registers): Use gdb_byte.
* spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'.
* spu-tdep.c (spu_get_overlay_table): Use gdb_byte.
* tic6x-tdep.c (tic6x_breakpoint_from_pc): Change return type to
'gdb_byte *'.
* tic6x-tdep.h (struct gdbarch_tdep) <breakpoint>: Change type to
'gdb_byte *'.
* tracepoint.c (tfile_fetch_registers): Use gdb_byte.
* xstormy16-tdep.c (xstormy16_extract_return_value)
(xstormy16_store_return_value): Change parameter type to
'gdb_byte *'. Adjust.
(xstormy16_push_dummy_call): Use gdb_byte.
* xtensa-tdep.c (xtensa_scan_prologue, call0_ret)
(call0_analyze_prologue, execute_code): Use gdb_byte.
40 files changed, 269 insertions, 174 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 80fb6de..0c97a68 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,105 @@ +2013-04-19 Pedro Alves <palves@redhat.com> + + * aarch64-tdep.c (aarch64_default_breakpoint): Change type to + gdb_byte[]. + (aarch64_breakpoint_from_pc): Change return type to gdb_byte *. + * ada-lang.c (ada_value_assign): Use gdb_byte. + * alphanbsd-tdep.c (sigtramp_retcode): Change type to gdb_byte[]. + (alphanbsd_sigtramp_offset): Use gdb_byte. + * arm-linux-tdep.c (arm_linux_arm_le_breakpoint) + (arm_linux_arm_be_breakpoint, eabi_linux_arm_le_breakpoint) + (eabi_linux_arm_be_breakpoint, arm_linux_thumb_be_breakpoint) + (arm_linux_thumb_le_breakpoint, arm_linux_thumb2_be_breakpoint) + (arm_linux_thumb2_le_breakpoint): Change type to gdb_byte[]. + * arm-tdep.c (arm_stub_unwind_sniffer) + (arm_displaced_init_closure): Use gdb_byte. + (arm_default_arm_le_breakpoint, arm_default_arm_be_breakpoint) + (arm_default_thumb_le_breakpoint) + (arm_default_thumb_be_breakpoint): Change type to gdb_byte[]. + * arm-tdep.h (struct gdbarch_tdep) <arm_breakpoint, + thumb_breakpoint, thumb2_breakpoint>: Change type to gdb_byte *. + * arm-wince-tdep.c (arm_wince_le_breakpoint) + (arm_wince_thumb_le_breakpoint): Change type to gdb_byte[]. + * armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint) + (arm_nbsd_arm_be_breakpoint, arm_nbsd_thumb_le_breakpoint) + (arm_nbsd_thumb_be_breakpoint): Change type to gdb_byte[]. + * armobsd-tdep.c (arm_obsd_thumb_le_breakpoint) + (arm_obsd_thumb_be_breakpoint): Change type to gdb_byte[]. + * cris-tdep.c (push_stack_item, cris_push_dummy_call) + (cris_store_return_value, cris_extract_return_value): Use + gdb_byte. + (constraint): Change type of parameter to char * from signed + char*. Use gdb_byte. + * dwarf2loc.c (read_pieced_value, write_pieced_value): Change type + of local buffer to gdb_byte *. + * dwarf2read.c (read_index_from_section): Use gdb_byte. + (create_dwp_hash_table): Change type of locals to gdb_byte *. + (add_address_entry): Change type of local buffer to gdb_byte[]. + * frv-tdep.c (frv_adjust_breakpoint_address, find_func_descr) + (frv_push_dummy_call): Use gdb_byte. + * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code) + (hppa_hpux_supply_ss_fpblock, hppa_hpux_supply_ss_wide) + (hppa_hpux_supply_save_state): Use gdb_byte. + * hppa-tdep.c (hppa32_push_dummy_call) + (hppa64_convert_code_addr_to_fptr): Use gdb_byte. + * ia64-tdep.c (extract_bit_field, replace_bit_field) + (slotN_contents, replace_slotN_contents): Change type of parameter + to gdb_byte *. + (fetch_instruction, ia64_pseudo_register_write) + (ia64_register_to_value, ia64_value_to_register) + (ia64_extract_return_value, ia64_store_return_value) + (ia64_push_dummy_call): Use gdb_byte. + * m32c-tdep.c (m32c_return_value): Remove cast. + * m68hc11-tdep.c (m68hc11_pseudo_register_write) + (m68hc11_push_dummy_call, m68hc11_store_return_value): Use + gdb_byte. + * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use gdb_byte. + * mn10300-tdep.c (mn10300_store_return_value) + (mn10300_breakpoint_from_pc, mn10300_push_dummy_call): Use + gdb_byte. + * moxie-tdep.c (moxie_process_readu): Use gdb_byte. + (moxie_process_record): Remove casts. + * ppc-ravenscar-thread.c (supply_register_at_address) + (ppc_ravenscar_generic_store_registers): Use gdb_byte. + * ravenscar-thread.c (get_running_thread_id): Use gdb_byte. + * remote-m32r-sdi.c (m32r_fetch_register): Use gdb_byte. + * remote-mips.c (mips_xfer_memory): Use gdb_byte. + * remote.c (compare_sections_command): Use gdb_byte. + * score-tdep.c (score7_free_memblock): Change type of parameter to + gdb_byte *. + * sh-tdep.c (sh_justify_value_in_reg): Change return type to + gdb_byte *. Use gdb_byte. + (sh_push_dummy_call_fpu): Use gdb_byte. + (sh_extract_return_value_nofpu, sh_extract_return_value_fpu) + (sh_store_return_value_nofpu, sh_store_return_value_fpu) + (sh_register_convert_to_virtual, sh_register_convert_to_raw): + Change parameter type to 'gdb_byte *'. Use gdb_byte. + (sh_pseudo_register_read, sh_pseudo_register_write): Use gdb_byte. + * sh64-tdep.c (sh64_push_dummy_call): Use gdb_byte. + (sh64_store_return_value, sh64_register_convert_to_virtual): + Change parameter type to 'gdb_byte *'. Use gdb_byte. + (sh64_pseudo_register_write): Use gdb_byte. + * solib-darwin.c (darwin_current_sos): Add casts to 'gdb_byte *'. + * solib-irix.c (fetch_lm_info): Likewise. Use gdb_byte for byte + buffer. + (irix_current_sos): Use gdb_byte. + * solib-som.c (som_current_sos): Use gdb_byte. + * sparc-ravenscar-thread.c (supply_register_at_address) + (sparc_ravenscar_generic_store_registers): Use gdb_byte. + * spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'. + * spu-tdep.c (spu_get_overlay_table): Use gdb_byte. + * tic6x-tdep.c (tic6x_breakpoint_from_pc): Change return type to + 'gdb_byte *'. + * tic6x-tdep.h (struct gdbarch_tdep) <breakpoint>: Change type to + 'gdb_byte *'. + * tracepoint.c (tfile_fetch_registers): Use gdb_byte. + * xstormy16-tdep.c (xstormy16_extract_return_value) + (xstormy16_store_return_value): Change parameter type to + 'gdb_byte *'. Adjust. + (xstormy16_push_dummy_call): Use gdb_byte. + * xtensa-tdep.c (xtensa_scan_prologue, call0_ret) + (call0_analyze_prologue, execute_code): Use gdb_byte. + 2013-04-19 Vladimir Kargov <kargov@gmail.com> Pedro Alves <palves@redhat.com> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 2b03106..b151f9d 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -1897,11 +1897,11 @@ aarch64_gdb_print_insn (bfd_vma memaddr, disassemble_info *info) /* AArch64 BRK software debug mode instruction. Note that AArch64 code is always little-endian. 1101.0100.0010.0000.0000.0000.0000.0000 = 0xd4200000. */ -static const char aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4}; +static const gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4}; /* Implement the "breakpoint_from_pc" gdbarch method. */ -static const unsigned char * +static const gdb_byte * aarch64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 0329dd9..4d07d4d 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2518,7 +2518,7 @@ ada_value_assign (struct value *toval, struct value *fromval) int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; int from_size; - char *buffer = (char *) alloca (len); + gdb_byte *buffer = alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c index dd76bea..757bc46 100644 --- a/gdb/alphanbsd-tdep.c +++ b/gdb/alphanbsd-tdep.c @@ -199,7 +199,7 @@ alphanbsd_regset_from_core_section (struct gdbarch *gdbarch, sequence and can then check whether we really are executing in the signal trampoline. If not, -1 is returned, otherwise the offset from the start of the return sequence is returned. */ -static const unsigned char sigtramp_retcode[] = +static const gdb_byte sigtramp_retcode[] = { 0x00, 0x00, 0x1e, 0xa6, /* ldq a0, 0(sp) */ 0x10, 0x00, 0xde, 0x23, /* lda sp, 16(sp) */ @@ -212,11 +212,11 @@ static const unsigned char sigtramp_retcode[] = static LONGEST alphanbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc) { - unsigned char ret[RETCODE_SIZE], w[4]; + gdb_byte ret[RETCODE_SIZE], w[4]; LONGEST off; int i; - if (target_read_memory (pc, (char *) w, 4) != 0) + if (target_read_memory (pc, w, 4) != 0) return -1; for (i = 0; i < RETCODE_NWORDS; i++) @@ -230,7 +230,7 @@ alphanbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc) off = i * 4; pc -= off; - if (target_read_memory (pc, (char *) ret, sizeof (ret)) != 0) + if (target_read_memory (pc, ret, sizeof (ret)) != 0) return -1; if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0) diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 953e525..1502bdc 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -62,9 +62,9 @@ extern int arm_apcs_32; of the software interrupt the kernel stops the inferior with a SIGTRAP, and wakes the debugger. */ -static const char arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef }; +static const gdb_byte arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef }; -static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 }; +static const gdb_byte arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 }; /* However, the EABI syscall interface (new in Nov. 2005) does not look at the operand of the swi if old-ABI compatibility is disabled. Therefore, @@ -72,24 +72,24 @@ static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 }; version 2.5.70 (May 2003), so should be a safe assumption for EABI binaries. */ -static const char eabi_linux_arm_le_breakpoint[] = { 0xf0, 0x01, 0xf0, 0xe7 }; +static const gdb_byte eabi_linux_arm_le_breakpoint[] = { 0xf0, 0x01, 0xf0, 0xe7 }; -static const char eabi_linux_arm_be_breakpoint[] = { 0xe7, 0xf0, 0x01, 0xf0 }; +static const gdb_byte eabi_linux_arm_be_breakpoint[] = { 0xe7, 0xf0, 0x01, 0xf0 }; /* All the kernels which support Thumb support using a specific undefined instruction for the Thumb breakpoint. */ -static const char arm_linux_thumb_be_breakpoint[] = {0xde, 0x01}; +static const gdb_byte arm_linux_thumb_be_breakpoint[] = {0xde, 0x01}; -static const char arm_linux_thumb_le_breakpoint[] = {0x01, 0xde}; +static const gdb_byte arm_linux_thumb_le_breakpoint[] = {0x01, 0xde}; /* Because the 16-bit Thumb breakpoint is affected by Thumb-2 IT blocks, we must use a length-appropriate breakpoint for 32-bit Thumb instructions. See also thumb_get_next_pc. */ -static const char arm_linux_thumb2_be_breakpoint[] = { 0xf7, 0xf0, 0xa0, 0x00 }; +static const gdb_byte arm_linux_thumb2_be_breakpoint[] = { 0xf7, 0xf0, 0xa0, 0x00 }; -static const char arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa0 }; +static const gdb_byte arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa0 }; /* Description of the longjmp buffer. The buffer is treated as an array of elements of size ARM_LINUX_JB_ELEMENT_SIZE. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2a11890..e353717 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2904,7 +2904,7 @@ arm_stub_unwind_sniffer (const struct frame_unwind *self, void **this_prologue_cache) { CORE_ADDR addr_in_block; - char dummy[4]; + gdb_byte dummy[4]; addr_in_block = get_frame_address_in_block (this_frame); if (in_plt_section (addr_in_block, NULL) @@ -8616,7 +8616,7 @@ arm_displaced_init_closure (struct gdbarch *gdbarch, CORE_ADDR from, unsigned int i, len, offset; enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch); int size = dsc->is_thumb? 2 : 4; - const unsigned char *bkp_insn; + const gdb_byte *bkp_insn; offset = 0; /* Poke modified instruction(s). */ @@ -8775,10 +8775,10 @@ gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info) #define THUMB_LE_BREAKPOINT {0xbe,0xbe} #define THUMB_BE_BREAKPOINT {0xbe,0xbe} -static const char arm_default_arm_le_breakpoint[] = ARM_LE_BREAKPOINT; -static const char arm_default_arm_be_breakpoint[] = ARM_BE_BREAKPOINT; -static const char arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT; -static const char arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT; +static const gdb_byte arm_default_arm_le_breakpoint[] = ARM_LE_BREAKPOINT; +static const gdb_byte arm_default_arm_be_breakpoint[] = ARM_BE_BREAKPOINT; +static const gdb_byte arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT; +static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT; /* Determine the type and size of breakpoint to insert at PCPTR. Uses the program counter value to determine whether a 16-bit or 32-bit diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index 6a3fa9a..a1a2be5 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -173,16 +173,16 @@ struct gdbarch_tdep CORE_ADDR lowest_pc; /* Lowest address at which instructions will appear. */ - const char *arm_breakpoint; /* Breakpoint pattern for an ARM insn. */ + const gdb_byte *arm_breakpoint; /* Breakpoint pattern for an ARM insn. */ int arm_breakpoint_size; /* And its size. */ - const char *thumb_breakpoint; /* Breakpoint pattern for a Thumb insn. */ + const gdb_byte *thumb_breakpoint; /* Breakpoint pattern for a Thumb insn. */ int thumb_breakpoint_size; /* And its size. */ /* If the Thumb breakpoint is an undefined instruction (which is affected by IT blocks) rather than a BKPT instruction (which is not), then we need a 32-bit Thumb breakpoint to preserve the instruction count in IT blocks. */ - const char *thumb2_breakpoint; + const gdb_byte *thumb2_breakpoint; int thumb2_breakpoint_size; int jb_pc; /* Offset to PC value in jump buffer. diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c index e00640c..61569e3 100644 --- a/gdb/arm-wince-tdep.c +++ b/gdb/arm-wince-tdep.c @@ -30,8 +30,8 @@ #include "arm-tdep.h" -static const char arm_wince_le_breakpoint[] = { 0x10, 0x00, 0x00, 0xe6 }; -static const char arm_wince_thumb_le_breakpoint[] = { 0xfe, 0xdf }; +static const gdb_byte arm_wince_le_breakpoint[] = { 0x10, 0x00, 0x00, 0xe6 }; +static const gdb_byte arm_wince_thumb_le_breakpoint[] = { 0xfe, 0xdf }; /* Description of the longjmp buffer. */ #define ARM_WINCE_JB_ELEMENT_SIZE INT_REGISTER_SIZE diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c index ed00d22..abb7637 100644 --- a/gdb/armnbsd-tdep.c +++ b/gdb/armnbsd-tdep.c @@ -31,10 +31,10 @@ /* For compatibility with previous implemenations of GDB on arm/NetBSD, override the default little-endian breakpoint. */ -static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6}; -static const char arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11}; -static const char arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde}; -static const char arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe}; +static const gdb_byte arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6}; +static const gdb_byte arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11}; +static const gdb_byte arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde}; +static const gdb_byte arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe}; static void arm_netbsd_init_abi_common (struct gdbarch_info info, diff --git a/gdb/armobsd-tdep.c b/gdb/armobsd-tdep.c index 5611a2d..384ef87 100644 --- a/gdb/armobsd-tdep.c +++ b/gdb/armobsd-tdep.c @@ -71,8 +71,8 @@ static const struct tramp_frame armobsd_sigframe = /* Override default thumb breakpoints. */ -static const char arm_obsd_thumb_le_breakpoint[] = {0xfe, 0xdf}; -static const char arm_obsd_thumb_be_breakpoint[] = {0xdf, 0xfe}; +static const gdb_byte arm_obsd_thumb_le_breakpoint[] = {0xfe, 0xdf}; +static const gdb_byte arm_obsd_thumb_be_breakpoint[] = {0xdf, 0xfe}; static void armobsd_init_abi (struct gdbarch_info info, diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index c1f07bb..2662513 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -676,7 +676,7 @@ struct stack_item }; static struct stack_item * -push_stack_item (struct stack_item *prev, void *contents, int len) +push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len) { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); @@ -850,12 +850,12 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argnum = 0; argnum < nargs; argnum++) { int len; - char *val; + const gdb_byte *val; int reg_demand; int i; len = TYPE_LENGTH (value_type (args[argnum])); - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); @@ -1657,7 +1657,7 @@ crisv32_register_type (struct gdbarch *gdbarch, int regno) static void cris_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1675,7 +1675,7 @@ cris_store_return_value (struct type *type, struct regcache *regcache, /* Put the return value in R10 and R11. */ val = extract_unsigned_integer (valbuf, 4, byte_order); regcache_cooked_write_unsigned (regcache, ARG1_REGNUM, val); - val = extract_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order); + val = extract_unsigned_integer (valbuf + 4, len - 4, byte_order); regcache_cooked_write_unsigned (regcache, ARG2_REGNUM, val); } else @@ -1828,7 +1828,7 @@ cris_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, static void cris_extract_return_value (struct type *type, struct regcache *regcache, - void *valbuf) + gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1847,7 +1847,7 @@ cris_extract_return_value (struct type *type, struct regcache *regcache, regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &val); store_unsigned_integer (valbuf, 4, byte_order, val); regcache_cooked_read_unsigned (regcache, ARG2_REGNUM, &val); - store_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order, val); + store_unsigned_integer (valbuf + 4, len - 4, byte_order, val); } else error (_("cris_extract_return_value: type length too large")); @@ -1879,13 +1879,13 @@ cris_return_value (struct gdbarch *gdbarch, struct value *function, instruction. It stems from cris_constraint, found in cris-dis.c. */ static int -constraint (unsigned int insn, const signed char *inst_args, +constraint (unsigned int insn, const char *inst_args, inst_env_type *inst_env) { int retval = 0; int tmp, i; - const char *s = inst_args; + const gdb_byte *s = (const gdb_byte *) inst_args; for (; *s; s++) switch (*s) diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 71220c6..ab4ecee 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1594,7 +1594,7 @@ read_pieced_value (struct value *v) struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v)); size_t type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; int bits_big_endian = gdbarch_bits_big_endian (get_type_arch (value_type (v))); @@ -1777,7 +1777,7 @@ write_pieced_value (struct value *to, struct value *from) struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to)); size_t type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; int bits_big_endian = gdbarch_bits_big_endian (get_type_arch (value_type (to))); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2ea80d7..8490eb9 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2671,7 +2671,7 @@ read_index_from_section (struct objfile *objfile, const gdb_byte **types_list, offset_type *types_list_elements) { - const char *addr; + const gdb_byte *addr; offset_type version; offset_type *metadata; int i; @@ -8595,7 +8595,7 @@ create_dwp_hash_table (struct dwp_file *dwp_file, int is_debug_types) { struct objfile *objfile = dwarf2_per_objfile->objfile; bfd *dbfd = dwp_file->dbfd; - const char *index_ptr, *index_end; + const gdb_byte *index_ptr, *index_end; struct dwarf2_section_info *index; uint32_t version, nr_units, nr_slots; struct dwp_hash_table *htab; @@ -20421,7 +20421,7 @@ add_address_entry (struct objfile *objfile, struct obstack *obstack, CORE_ADDR start, CORE_ADDR end, unsigned int cu_index) { offset_type cu_index_to_write; - char addr[8]; + gdb_byte addr[8]; CORE_ADDR baseaddr; baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 3770667..4b725c3 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -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); @@ -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) diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index e964064..667904e 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1278,9 +1278,9 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, static void hppa_hpux_supply_ss_narrow (struct regcache *regcache, - int regnum, const char *save_state) + int regnum, const gdb_byte *save_state) { - const char *ss_narrow = save_state + HPPA_HPUX_SS_NARROW_OFFSET; + const gdb_byte *ss_narrow = save_state + HPPA_HPUX_SS_NARROW_OFFSET; int i, offset = 0; for (i = HPPA_R1_REGNUM; i < HPPA_FP0_REGNUM; i++) @@ -1294,9 +1294,9 @@ hppa_hpux_supply_ss_narrow (struct regcache *regcache, static void hppa_hpux_supply_ss_fpblock (struct regcache *regcache, - int regnum, const char *save_state) + int regnum, const gdb_byte *save_state) { - const char *ss_fpblock = save_state + HPPA_HPUX_SS_FPBLOCK_OFFSET; + const gdb_byte *ss_fpblock = save_state + HPPA_HPUX_SS_FPBLOCK_OFFSET; int i, offset = 0; /* FIXME: We view the floating-point state as 64 single-precision @@ -1329,9 +1329,9 @@ hppa_hpux_supply_ss_fpblock (struct regcache *regcache, static void hppa_hpux_supply_ss_wide (struct regcache *regcache, - int regnum, const char *save_state) + int regnum, const gdb_byte *save_state) { - const char *ss_wide = save_state + HPPA_HPUX_SS_WIDE_OFFSET; + const gdb_byte *ss_wide = save_state + HPPA_HPUX_SS_WIDE_OFFSET; int i, offset = 8; if (register_size (get_regcache_arch (regcache), HPPA_R1_REGNUM) == 4) @@ -1353,8 +1353,8 @@ hppa_hpux_supply_save_state (const struct regset *regset, { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - const char *proc_info = regs; - const char *save_state = proc_info + 8; + const gdb_byte *proc_info = regs; + const gdb_byte *save_state = proc_info + 8; ULONGEST flags; flags = extract_unsigned_integer (save_state + HPPA_HPUX_SS_FLAGS_OFFSET, diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index d09bf68..fe1b45b 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -725,7 +725,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct type *type = check_typedef (value_type (arg)); /* The corresponding parameter that is pushed onto the stack, and [possibly] passed in a register. */ - char param_val[8]; + gdb_byte param_val[8]; int param_len; memset (param_val, 0, sizeof param_val); if (TYPE_LENGTH (type) > 8) @@ -928,7 +928,7 @@ hppa64_convert_code_addr_to_fptr (struct gdbarch *gdbarch, CORE_ADDR code) addr += 2 * 8) { ULONGEST opdaddr; - char tmp[8]; + gdb_byte tmp[8]; if (target_read_memory (addr, tmp, sizeof (tmp))) break; diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 9797217..7d440e4 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -370,7 +370,7 @@ ia64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) bit ``from''. */ static long long -extract_bit_field (const char *bundle, int from, int len) +extract_bit_field (const gdb_byte *bundle, int from, int len) { long long result = 0LL; int to = from + len; @@ -406,7 +406,7 @@ extract_bit_field (const char *bundle, int from, int len) /* Replace the specified bits in an instruction bundle. */ static void -replace_bit_field (char *bundle, long long val, int from, int len) +replace_bit_field (gdb_byte *bundle, long long val, int from, int len) { int to = from + len; int from_byte = from / 8; @@ -456,7 +456,7 @@ replace_bit_field (char *bundle, long long val, int from, int len) and instruction bundle. */ static long long -slotN_contents (char *bundle, int slotnum) +slotN_contents (gdb_byte *bundle, int slotnum) { return extract_bit_field (bundle, 5+41*slotnum, 41); } @@ -464,7 +464,7 @@ slotN_contents (char *bundle, int slotnum) /* Store an instruction in an instruction bundle. */ static void -replace_slotN_contents (char *bundle, long long instr, int slotnum) +replace_slotN_contents (gdb_byte *bundle, long long instr, int slotnum) { replace_bit_field (bundle, instr, 5+41*slotnum, 41); } @@ -511,7 +511,7 @@ static const enum instruction_type template_encoding_table[32][3] = static CORE_ADDR fetch_instruction (CORE_ADDR addr, instruction_type *it, long long *instr) { - char bundle[BUNDLE_LEN]; + gdb_byte bundle[BUNDLE_LEN]; int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER; long long template; int val; @@ -1165,7 +1165,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, } else { - char nat_buf[8]; + gdb_byte nat_buf[8]; nat_collection = read_memory_integer (nat_addr, 8, byte_order); if (natN_val) nat_collection |= natN_mask; @@ -1224,7 +1224,7 @@ ia64_register_to_value (struct frame_info *frame, int regnum, int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); - char in[MAX_REGISTER_SIZE]; + gdb_byte in[MAX_REGISTER_SIZE]; /* Convert to TYPE. */ if (!get_frame_register_bytes (frame, regnum, 0, @@ -1242,7 +1242,7 @@ ia64_value_to_register (struct frame_info *frame, int regnum, struct type *valtype, const gdb_byte *in) { struct gdbarch *gdbarch = get_frame_arch (frame); - char out[MAX_REGISTER_SIZE]; + gdb_byte out[MAX_REGISTER_SIZE]; convert_typed_floating (in, valtype, out, ia64_ext_type (gdbarch)); put_frame_register (frame, regnum, out); } @@ -3228,7 +3228,7 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache, float_elt_type = is_float_or_hfa_type (type); if (float_elt_type != NULL) { - char from[MAX_REGISTER_SIZE]; + gdb_byte from[MAX_REGISTER_SIZE]; int offset = 0; int regnum = IA64_FR8_REGNUM; int n = TYPE_LENGTH (type) / TYPE_LENGTH (float_elt_type); @@ -3293,7 +3293,7 @@ ia64_store_return_value (struct type *type, struct regcache *regcache, float_elt_type = is_float_or_hfa_type (type); if (float_elt_type != NULL) { - char to[MAX_REGISTER_SIZE]; + gdb_byte to[MAX_REGISTER_SIZE]; int offset = 0; int regnum = IA64_FR8_REGNUM; int n = TYPE_LENGTH (type) / TYPE_LENGTH (float_elt_type); @@ -3783,7 +3783,7 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, && TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC) { - char val_buf[8]; + gdb_byte val_buf[8]; ULONGEST faddr = extract_unsigned_integer (value_contents (arg), 8, byte_order); store_unsigned_integer (val_buf, 8, byte_order, @@ -3807,7 +3807,7 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, argoffset = 0; while (len > 0) { - char val_buf[8]; + gdb_byte val_buf[8]; memset (val_buf, 0, 8); if (!ia64_struct_type_p (type) && len < 8) diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 3a0267b..a147c94 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -2282,8 +2282,7 @@ m32c_return_value (struct gdbarch *gdbarch, error (_("The return value is stored in memory at 'mem0', " "but GDB cannot find\n" " its address.")); - write_memory (SYMBOL_VALUE_ADDRESS (mem0), - (char *) writebuf, valtype_len); + write_memory (SYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len); } } diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 078be70..b3023ad 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -338,7 +338,7 @@ m68hc11_pseudo_register_write (struct gdbarch *gdbarch, if (regno == M68HC12_HARD_PC_REGNUM) { const int regsize = 4; - char *tmp = alloca (regsize); + gdb_byte *tmp = alloca (regsize); CORE_ADDR pc; memcpy (tmp, buf, regsize); @@ -363,7 +363,7 @@ m68hc11_pseudo_register_write (struct gdbarch *gdbarch, if (soft_regs[regno].name) { const int regsize = 2; - char *tmp = alloca (regsize); + gdb_byte *tmp = alloca (regsize); memcpy (tmp, buf, regsize); target_write_memory (soft_regs[regno].addr, tmp, regsize); } @@ -1173,7 +1173,7 @@ m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argnum; int first_stack_argnum; struct type *type; - char *val; + const gdb_byte *val; gdb_byte buf[2]; first_stack_argnum = 0; @@ -1209,12 +1209,12 @@ m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (TYPE_LENGTH (type) & 1) { - static char zero = 0; + static gdb_byte zero = 0; sp--; write_memory (sp, &zero, 1); } - val = (char*) value_contents (args[argnum]); + val = value_contents (args[argnum]); sp -= TYPE_LENGTH (type); write_memory (sp, val, TYPE_LENGTH (type)); } @@ -1261,7 +1261,7 @@ m68hc11_register_type (struct gdbarch *gdbarch, int reg_nr) static void m68hc11_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { int len; @@ -1274,7 +1274,7 @@ m68hc11_store_return_value (struct type *type, struct regcache *regcache, { regcache_raw_write_part (regcache, HARD_X_REGNUM, 4 - len, len - 2, valbuf); - regcache_raw_write (regcache, HARD_D_REGNUM, (char*) valbuf + (len - 2)); + regcache_raw_write (regcache, HARD_D_REGNUM, valbuf + (len - 2)); } else error (_("return of value > 4 is not supported.")); diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index 699e317..e9f36fd 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -262,7 +262,7 @@ mipsnbsd_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; + gdb_byte *buf; buf = alloca (NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch)); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 0609242..c31af8d 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -168,7 +168,7 @@ mn10300_use_struct_convention (struct type *type) static void mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, - struct regcache *regcache, const void *valbuf) + struct regcache *regcache, const gdb_byte *valbuf) { int len = TYPE_LENGTH (type); int reg, regsz; @@ -187,7 +187,7 @@ mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, regcache_raw_write (regcache, reg, valbuf); gdb_assert (regsz == register_size (gdbarch, reg + 1)); regcache_raw_write_part (regcache, reg+1, 0, - len - regsz, (char *) valbuf + regsz); + len - regsz, valbuf + regsz); } else internal_error (__FILE__, __LINE__, @@ -330,7 +330,7 @@ const static unsigned char * mn10300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, int *bp_size) { - static char breakpoint[] = {0xff}; + static gdb_byte breakpoint[] = {0xff}; *bp_size = 1; return breakpoint; } @@ -1231,7 +1231,8 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch, int len, arg_len; int stack_offset = 0; int argnum; - char *val, valbuf[MAX_REGISTER_SIZE]; + const gdb_byte *val; + gdb_byte valbuf[MAX_REGISTER_SIZE]; /* This should be a nop, but align the stack just in case something went wrong. Stacks are four byte aligned on the mn10300. */ @@ -1280,7 +1281,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch, else { arg_len = TYPE_LENGTH (value_type (*args)); - val = (char *) value_contents (*args); + val = value_contents (*args); } while (regs_used < 2 && arg_len > 0) diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index 1676a9b..79d160b 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -498,7 +498,7 @@ moxie_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) /* Read an unsigned integer from the inferior, and adjust endianess. */ static ULONGEST -moxie_process_readu (CORE_ADDR addr, char *buf, +moxie_process_readu (CORE_ADDR addr, gdb_byte *buf, int length, enum bfd_endian byte_order) { if (target_read_memory (addr, buf, length)) @@ -766,8 +766,7 @@ moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, break; case 0x1f: /* sta.b */ { - tmpu32 = moxie_process_readu (addr+2, (char *) buf, - 4, byte_order); + tmpu32 = moxie_process_readu (addr+2, buf, 4, byte_order); if (record_full_arch_list_add_mem (tmpu32, 1)) return -1; } @@ -793,8 +792,7 @@ moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, break; case 0x24: /* sta.s */ { - tmpu32 = moxie_process_readu (addr+2, (char *) buf, - 4, byte_order); + tmpu32 = moxie_process_readu (addr+2, buf, 4, byte_order); if (record_full_arch_list_add_mem (tmpu32, 2)) return -1; } @@ -825,8 +823,7 @@ moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, /* We currently implement support for libgloss' system calls. */ - int inum = moxie_process_readu (addr+2, (char *) buf, - 4, byte_order); + int inum = moxie_process_readu (addr+2, buf, 4, byte_order); switch (inum) { @@ -855,8 +852,7 @@ moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, MOXIE_FP_REGNUM, (gdb_byte *) & tmpu32); tmpu32 = extract_unsigned_integer ((gdb_byte *) & tmpu32, 4, byte_order); - length = moxie_process_readu (tmpu32+20, (char *) buf, - 4, byte_order); + length = moxie_process_readu (tmpu32+20, buf, 4, byte_order); if (record_full_arch_list_add_mem (ptr, length)) return -1; diff --git a/gdb/ppc-ravenscar-thread.c b/gdb/ppc-ravenscar-thread.c index 1993fce..790d970 100644 --- a/gdb/ppc-ravenscar-thread.c +++ b/gdb/ppc-ravenscar-thread.c @@ -121,9 +121,9 @@ supply_register_at_address (struct regcache *regcache, int regnum, { struct gdbarch *gdbarch = get_regcache_arch (regcache); int buf_size = register_size (gdbarch, regnum); - char *buf; + gdb_byte *buf; - buf = (char *) alloca (buf_size); + buf = alloca (buf_size); read_memory (register_addr, buf, buf_size); regcache_raw_supply (regcache, regnum, buf); } @@ -189,7 +189,7 @@ ppc_ravenscar_generic_store_registers { struct gdbarch *gdbarch = get_regcache_arch (regcache); int buf_size = register_size (gdbarch, regnum); - char buf [buf_size]; + gdb_byte buf[buf_size]; ULONGEST register_address; if (register_in_thread_descriptor_p (reg_info, regnum)) diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index ae01760..0a3100d 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -155,7 +155,7 @@ get_running_thread_id (void) const struct minimal_symbol *object_msym = get_running_thread_msymbol (); int object_size; int buf_size; - char *buf; + gdb_byte *buf; CORE_ADDR object_addr; struct type *builtin_type_void_data_ptr = builtin_type (target_gdbarch ())->builtin_data_ptr; diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 7ac6322..2f910e6 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -933,7 +933,7 @@ m32r_fetch_register (struct target_ops *ops, } else { - char buffer[MAX_REGISTER_SIZE]; + gdb_byte buffer[MAX_REGISTER_SIZE]; regid = get_reg_id (regno); send_one_arg_cmd (SDI_READ_CPU_REG, regid); diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index bc36a00..85002ec 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -2151,7 +2151,7 @@ mips_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, int i; CORE_ADDR addr; int count; - char *buffer; + gdb_byte *buffer; int status; /* PMON targets do not cope well with 64 bit addresses. Mask the diff --git a/gdb/remote.c b/gdb/remote.c index 96abc5d..9f447ba 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -8490,7 +8490,7 @@ compare_sections_command (char *args, int from_tty) { asection *s; struct cleanup *old_chain; - char *sectdata; + gdb_byte *sectdata; const char *sectname; bfd_size_type size; bfd_vma lma; diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index 46257ba..784b912 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -835,7 +835,7 @@ score7_malloc_and_get_memblock (CORE_ADDR addr, CORE_ADDR size) } static void -score7_free_memblock (char *memblock) +score7_free_memblock (gdb_byte *memblock) { xfree (memblock); } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 0bd0179..53de7a2 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -908,22 +908,22 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) to R7. */ /* Helper function to justify value in register according to endianess. */ -static char * +static const gdb_byte * sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len) { - static char valbuf[4]; + static gdb_byte valbuf[4]; memset (valbuf, 0, sizeof (valbuf)); if (len < 4) { /* value gets right-justified in the register or stack word. */ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) - memcpy (valbuf + (4 - len), (char *) value_contents (val), len); + memcpy (valbuf + (4 - len), value_contents (val), len); else - memcpy (valbuf, (char *) value_contents (val), len); + memcpy (valbuf, value_contents (val), len); return valbuf; } - return (char *) value_contents (val); + return value_contents (val); } /* Helper function to eval number of bytes to allocate on stack. */ @@ -1068,7 +1068,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, struct type *func_type = value_type (function); struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; int len, reg_size = 0; int pass_on_stack = 0; int treat_as_flt; @@ -1209,7 +1209,7 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, struct type *func_type = value_type (function); struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; int len, reg_size = 0; int pass_on_stack = 0; int last_reg_arg = INT_MAX; @@ -1302,7 +1302,7 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, TYPE, and copy that, in virtual format, into VALBUF. */ static void sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, - void *valbuf) + gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1321,7 +1321,7 @@ sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, { int i, regnum = R0_REGNUM; for (i = 0; i < len; i += 4) - regcache_raw_read (regcache, regnum++, (char *) valbuf + i); + regcache_raw_read (regcache, regnum++, valbuf + i); } else error (_("bad size for return value")); @@ -1329,7 +1329,7 @@ sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, static void sh_extract_return_value_fpu (struct type *type, struct regcache *regcache, - void *valbuf) + gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); if (sh_treat_as_flt_p (type)) @@ -1339,9 +1339,9 @@ sh_extract_return_value_fpu (struct type *type, struct regcache *regcache, for (i = 0; i < len; i += 4) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) regcache_raw_read (regcache, regnum++, - (char *) valbuf + len - 4 - i); + valbuf + len - 4 - i); else - regcache_raw_read (regcache, regnum++, (char *) valbuf + i); + regcache_raw_read (regcache, regnum++, valbuf + i); } else sh_extract_return_value_nofpu (type, regcache, valbuf); @@ -1355,7 +1355,7 @@ sh_extract_return_value_fpu (struct type *type, struct regcache *regcache, the result is stored in r0, left-justified. */ static void sh_store_return_value_nofpu (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1371,13 +1371,13 @@ sh_store_return_value_nofpu (struct type *type, struct regcache *regcache, { int i, regnum = R0_REGNUM; for (i = 0; i < len; i += 4) - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + regcache_raw_write (regcache, regnum++, valbuf + i); } } static void sh_store_return_value_fpu (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); if (sh_treat_as_flt_p (type)) @@ -1387,9 +1387,9 @@ sh_store_return_value_fpu (struct type *type, struct regcache *regcache, for (i = 0; i < len; i += 4) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) regcache_raw_write (regcache, regnum++, - (char *) valbuf + len - 4 - i); + valbuf + len - 4 - i); else - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + regcache_raw_write (regcache, regnum++, valbuf + i); } else sh_store_return_value_nofpu (type, regcache, valbuf); @@ -1549,7 +1549,7 @@ sh_register_reggroup_p (struct gdbarch *gdbarch, int regnum, static void sh_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, - struct type *type, char *from, char *to) + struct type *type, gdb_byte *from, gdb_byte *to) { if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE) { @@ -1572,7 +1572,7 @@ sh_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, static void sh_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, - int regnum, const void *from, void *to) + int regnum, const gdb_byte *from, gdb_byte *to) { if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE) { @@ -1643,7 +1643,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, gdb_byte *buffer) { int base_regnum; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; enum register_status status; if (reg_nr == PSEUDO_BANK_REGNUM) @@ -1682,7 +1682,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, const gdb_byte *buffer) { int base_regnum, portion; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; if (reg_nr == PSEUDO_BANK_REGNUM) { @@ -1718,7 +1718,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 4; portion++) regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer + (buffer + register_size (gdbarch, base_regnum) * portion)); } diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index 8a81fcb..b640b1d 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -1067,8 +1067,8 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, int argnum; struct type *type; CORE_ADDR regval; - char *val; - char valbuf[8]; + const gdb_byte *val; + gdb_byte valbuf[8]; int len; int argreg_size; int fp_args[12]; @@ -1113,22 +1113,21 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, /* value gets right-justified in the register or stack word. */ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) memcpy (valbuf + argreg_size - len, - (char *) value_contents (args[argnum]), len); + value_contents (args[argnum]), len); else - memcpy (valbuf, (char *) value_contents (args[argnum]), len); + memcpy (valbuf, value_contents (args[argnum]), len); val = valbuf; } else - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); while (len > 0) { if (int_argreg > ARGLAST_REGNUM) { /* Must go on the stack. */ - write_memory (sp + stack_offset, (const bfd_byte *) val, - argreg_size); + write_memory (sp + stack_offset, val, argreg_size); stack_offset += 8;/*argreg_size;*/ } /* NOTE WELL!!!!! This is not an "else if" clause!!! @@ -1153,7 +1152,7 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, } else { - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); if (len == 4) { /* Where is it going to be stored? */ @@ -1287,7 +1286,7 @@ sh64_extract_return_value (struct type *type, struct regcache *regcache, static void sh64_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); gdb_byte buf[64]; /* more than enough... */ @@ -1299,9 +1298,9 @@ sh64_store_return_value (struct type *type, struct regcache *regcache, for (i = 0; i < len; i += 4) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) regcache_raw_write (regcache, regnum++, - (char *) valbuf + len - 4 - i); + valbuf + len - 4 - i); else - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + regcache_raw_write (regcache, regnum++, valbuf + i); } else { @@ -1449,7 +1448,7 @@ sh64_register_type (struct gdbarch *gdbarch, int reg_nr) static void sh64_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, - struct type *type, char *from, char *to) + struct type *type, gdb_byte *from, gdb_byte *to) { if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE) { @@ -1530,7 +1529,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int base_regnum; int offset = 0; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; enum register_status status; if (reg_nr >= DR0_REGNUM @@ -1706,7 +1705,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int base_regnum, portion; int offset; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM) @@ -1721,7 +1720,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, for (portion = 0; portion < 2; portion++) regcache_raw_write (regcache, base_regnum + portion, (temp_buffer - + register_size (gdbarch, + + register_size (gdbarch, base_regnum) * portion)); } @@ -1733,9 +1732,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 2; portion++) regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer - + register_size (gdbarch, - base_regnum) * portion)); + (buffer + register_size (gdbarch, + base_regnum) * portion)); } else if (reg_nr >= FV0_REGNUM @@ -1746,9 +1744,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 4; portion++) regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer - + register_size (gdbarch, - base_regnum) * portion)); + (buffer + register_size (gdbarch, + base_regnum) * portion)); } /* sh compact general pseudo registers. 1-to-1 with a shmedia @@ -1807,7 +1804,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, for (portion = 0; portion < 4; portion++) { regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer + (buffer + register_size (gdbarch, base_regnum) * portion)); } diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index b9a4be1..8c2307e 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -288,7 +288,7 @@ darwin_current_sos (void) path_addr = extract_typed_address (buf + ptr_len, ptr_type); /* Read Mach-O header from memory. */ - if (target_read_memory (load_addr, (char *) &hdr, sizeof (hdr) - 4)) + if (target_read_memory (load_addr, (gdb_byte *) &hdr, sizeof (hdr) - 4)) break; /* Discard wrong magic numbers. Shouldn't happen. */ hdr_val = extract_unsigned_integer @@ -359,7 +359,7 @@ darwin_read_exec_load_addr (struct darwin_info *info) load_addr = extract_typed_address (buf, ptr_type); /* Read Mach-O header from memory. */ - if (target_read_memory (load_addr, (char *) &hdr, sizeof (hdr) - 4)) + if (target_read_memory (load_addr, (gdb_byte *) &hdr, sizeof (hdr) - 4)) break; /* Discard wrong magic numbers. Shouldn't happen. */ hdr_val = extract_unsigned_integer diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c index af3e7d6..0dbbb1b 100644 --- a/gdb/solib-irix.c +++ b/gdb/solib-irix.c @@ -152,13 +152,13 @@ fetch_lm_info (CORE_ADDR addr) with one of the other cases. (We don't want to incur a memory error if we were to read a larger region that generates an error due to being at the end of a page or the like.) */ - read_memory (addr, (char *) &buf, sizeof (buf.ol32)); + read_memory (addr, (gdb_byte *) &buf, sizeof (buf.ol32)); if (extract_unsigned_integer (buf.magic.b, sizeof (buf.magic), byte_order) != 0xffffffff) { /* Use buf.ol32... */ - char obj_buf[432]; + gdb_byte obj_buf[432]; CORE_ADDR obj_addr = extract_mips_address (&buf.ol32.data, sizeof (buf.ol32.data), byte_order); @@ -182,7 +182,7 @@ fetch_lm_info (CORE_ADDR addr) /* Read rest of buffer. */ read_memory (addr + sizeof (buf.ol32), - ((char *) &buf) + sizeof (buf.ol32), + ((gdb_byte *) &buf) + sizeof (buf.ol32), sizeof (buf.oi32) - sizeof (buf.ol32)); /* Fill in fields using buffer contents. */ @@ -209,7 +209,7 @@ fetch_lm_info (CORE_ADDR addr) /* Read rest of buffer. */ read_memory (addr + sizeof (buf.ol32), - ((char *) &buf) + sizeof (buf.ol32), + ((gdb_byte *) &buf) + sizeof (buf.ol32), sizeof (buf.oi64) - sizeof (buf.ol32)); /* Fill in fields using buffer contents. */ @@ -455,7 +455,7 @@ irix_current_sos (void) enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ()); int addr_size = gdbarch_addr_bit (target_gdbarch ()) / TARGET_CHAR_BIT; CORE_ADDR lma; - char addr_buf[8]; + gdb_byte addr_buf[8]; struct so_list *head = 0; struct so_list **link_ptr = &head; int is_first = 1; @@ -547,7 +547,7 @@ irix_open_symbol_file_object (void *from_ttyp) enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ()); int addr_size = gdbarch_addr_bit (target_gdbarch ()) / TARGET_CHAR_BIT; CORE_ADDR lma; - char addr_buf[8]; + gdb_byte addr_buf[8]; struct lm_info lm; struct cleanup *cleanups; int errcode; diff --git a/gdb/solib-som.c b/gdb/solib-som.c index 650e3df..f88b539 100644 --- a/gdb/solib-som.c +++ b/gdb/solib-som.c @@ -588,7 +588,7 @@ som_current_sos (void) struct cleanup *old_chain; int errcode; struct dld_list dbuf; - char tsdbuf[4]; + gdb_byte tsdbuf[4]; new = (struct so_list *) xmalloc (sizeof (struct so_list)); old_chain = make_cleanup (xfree, new); diff --git a/gdb/sparc-ravenscar-thread.c b/gdb/sparc-ravenscar-thread.c index 43a2069..d27514f 100644 --- a/gdb/sparc-ravenscar-thread.c +++ b/gdb/sparc-ravenscar-thread.c @@ -64,9 +64,9 @@ supply_register_at_address (struct regcache *regcache, int regnum, { struct gdbarch *gdbarch = get_regcache_arch (regcache); int buf_size = register_size (gdbarch, regnum); - char *buf; + gdb_byte *buf; - buf = (char *) alloca (buf_size); + buf = alloca (buf_size); read_memory (register_addr, buf, buf_size); regcache_raw_supply (regcache, regnum, buf); } @@ -157,7 +157,7 @@ sparc_ravenscar_store_registers (struct regcache *regcache, int regnum) { struct gdbarch *gdbarch = get_regcache_arch (regcache); int buf_size = register_size (gdbarch, regnum); - char buf [buf_size]; + gdb_byte buf[buf_size]; ULONGEST register_address; if (register_in_thread_descriptor_p (regnum)) diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 2e1bb4a..e7dda8d 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1749,7 +1749,7 @@ spu_get_overlay_table (struct objfile *objfile) unsigned ovly_table_size, ovly_buf_table_size; struct spu_overlay_table *tbl; struct obj_section *osect; - char *ovly_table; + gdb_byte *ovly_table; int i; tbl = objfile_data (objfile, spu_overlay_data); diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index 4c44fb9..045fc73 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -323,7 +323,7 @@ tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) /* This is the implementation of gdbarch method breakpiont_from_pc. */ -static const unsigned char* +static const gdb_byte * tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, int *bp_size) { diff --git a/gdb/tic6x-tdep.h b/gdb/tic6x-tdep.h index a168403..5fe26ae 100644 --- a/gdb/tic6x-tdep.h +++ b/gdb/tic6x-tdep.h @@ -47,7 +47,7 @@ struct gdbarch_tdep instruction. */ CORE_ADDR (*syscall_next_pc) (struct frame_info *frame); - const char *breakpoint; /* Breakpoint instruction. */ + const gdb_byte *breakpoint; /* Breakpoint instruction. */ int has_gp; /* Has general purpose registers A16 - A31 and B16 - B31. */ }; diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 4113999..b89ca22 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -4921,7 +4921,7 @@ tfile_fetch_registers (struct target_ops *ops, { struct gdbarch *gdbarch = get_regcache_arch (regcache); int offset, regn, regsize, pc_regno; - char *regs; + gdb_byte *regs; /* An uninitialized reg size says we're not going to be successful at getting register blocks. */ diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 1a2ba1d..cb551ff 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -160,13 +160,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,7 +176,7 @@ 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) { @@ -192,7 +192,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); } } @@ -278,7 +278,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]); diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 3cdb27a..1eedee7 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1154,7 +1154,7 @@ xtensa_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR current_pc) CORE_ADDR start_addr; xtensa_isa isa; xtensa_insnbuf ins, slot; - char ibuf[XTENSA_ISA_BSZ]; + gdb_byte ibuf[XTENSA_ISA_BSZ]; CORE_ADDR ia, bt, ba; xtensa_format ifmt; int ilen, islots, is; @@ -2032,7 +2032,7 @@ call0_ret (CORE_ADDR start_pc, CORE_ADDR finish_pc) #define RETURN_RET goto done xtensa_isa isa; xtensa_insnbuf ins, slot; - char ibuf[XTENSA_ISA_BSZ]; + gdb_byte ibuf[XTENSA_ISA_BSZ]; CORE_ADDR ia, bt, ba; xtensa_format ifmt; int ilen, islots, is; @@ -2390,7 +2390,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR ia; /* Current insn address in prologue. */ CORE_ADDR ba = 0; /* Current address at base of insn buffer. */ CORE_ADDR bt; /* Current address at top+1 of insn buffer. */ - char ibuf[XTENSA_ISA_BSZ];/* Instruction buffer for decoding prologue. */ + gdb_byte ibuf[XTENSA_ISA_BSZ];/* Instruction buffer for decoding prologue. */ xtensa_isa isa; /* libisa ISA handle. */ xtensa_insnbuf ins, slot; /* libisa handle to decoded insn, slot. */ xtensa_format ifmt; /* libisa instruction format. */ @@ -2805,7 +2805,7 @@ execute_code (struct gdbarch *gdbarch, CORE_ADDR current_pc, CORE_ADDR wb) { xtensa_isa isa; xtensa_insnbuf ins, slot; - char ibuf[XTENSA_ISA_BSZ]; + gdb_byte ibuf[XTENSA_ISA_BSZ]; CORE_ADDR ia, bt, ba; xtensa_format ifmt; int ilen, islots, is; |