-Wpointer-sign: char -> gdb_byte.
authorPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:09:46 +0000 (15:09 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:09:46 +0000 (15:09 +0000)
-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:
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/ada-lang.c
gdb/alphanbsd-tdep.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/arm-tdep.h
gdb/arm-wince-tdep.c
gdb/armnbsd-tdep.c
gdb/armobsd-tdep.c
gdb/cris-tdep.c
gdb/dwarf2loc.c
gdb/dwarf2read.c
gdb/frv-tdep.c
gdb/hppa-hpux-tdep.c
gdb/hppa-tdep.c
gdb/ia64-tdep.c
gdb/m32c-tdep.c
gdb/m68hc11-tdep.c
gdb/mipsnbsd-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/ppc-ravenscar-thread.c
gdb/ravenscar-thread.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote.c
gdb/score-tdep.c
gdb/sh-tdep.c
gdb/sh64-tdep.c
gdb/solib-darwin.c
gdb/solib-irix.c
gdb/solib-som.c
gdb/sparc-ravenscar-thread.c
gdb/spu-tdep.c
gdb/tic6x-tdep.c
gdb/tic6x-tdep.h
gdb/tracepoint.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c

index 80fb6de1cbc8e67fad0e8a6c5c1de7e51058939a..0c97a683e48ce2f07c2f90347a5ab57dad1f4ce0 100644 (file)
@@ -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>
 
index 2b0310649849274b3c45b753dec344d1ece7001c..b151f9d02dc1e4684d0e254850bc05f8dac14d0d 100644 (file)
@@ -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)
 {
index 0329dd9eb87abc15c2d6d7b66cbd59be0791e8cf..4d07d4ded90c489a1143bb8df98efd89a848a64c 100644 (file)
@@ -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);
 
index dd76bea2aa7c472dfa6f256c5bfb2643bf8e3d74..757bc46a8f442bb70ee7d892f10c5bf4d4e04f3c 100644 (file)
@@ -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)
index 953e52542e90d1449a92daa60ef83e303e3c66ec..1502bdcfe639172b1c5b60c3c370fb0bd4658a53 100644 (file)
@@ -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.
index 2a11890abfb15c516cf7843afc5414e7732d53c3..e3537179cc52069cf5c9f0b11b4b7598012d33b1 100644 (file)
@@ -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
index 6a3fa9ae974a686703a3da3ce55c11739e141e4d..a1a2be5cb87c8e6e6d5a3c3dfc0fd1c84ef05c42 100644 (file)
@@ -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.
index e00640cc03a67e03399ea62b9b4d2393292cd116..61569e397f5f2ba5af4673b3b4c51cd37521fb38 100644 (file)
@@ -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
index ed00d2272fea4d009caf33cd034348c76a8349ff..abb7637f131720bf69a5cda342c022fc0b9ca222 100644 (file)
 
 /* 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,
index 5611a2df50d6ff6e6fe56e4b2ca796a3020ddc11..384ef87e7053152b7f55d8b9fb2cc963a6bf4c0b 100644 (file)
@@ -71,8 +71,8 @@ static const struct tramp_frame armobsd_sigframe =
 \f
 
 /* 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,
index c1f07bb50c82c5c2ff60a0fc3ac13c2f86779888..2662513dafd1ad046d9c19525b895baa1c08b50c 100644 (file)
@@ -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) 
index 71220c6251389607eae0c821b32b813f1f9d8d50..ab4ecee8244edbb9e0b48bd625d612d9e2cf75d1 100644 (file)
@@ -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)));
index 2ea80d7aed8099ca26a069b09659bddfefda0918..8490eb97e269dcf167d4b2628540adaa144701ca 100644 (file)
@@ -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));
index 3770667dcf20240bbbdb20dfeb26ac06090c227c..4b725c3488e35796ff96c577428427a528570fa9 100644 (file)
@@ -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)
index e964064d8dee7e2526d4a366348d527384ce7187..667904e7a5ccda2f27c84bc0b711c4effa20832d 100644 (file)
@@ -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,
index d09bf68b9dce73025c4b42c6e5736bd667a9ad58..fe1b45bcba9a094116afe02902a8a8dd426415cd 100644 (file)
@@ -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;
index 97972172e6eb5a1a736c8d52ffdea2320db120b6..7d440e4f0ad36979485e7c2cf9ab93643774da0a 100644 (file)
@@ -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)
index 3a0267b66e0307cd827a53bc877b433e10d3ade7..a147c94f1684bdaa4d900eab02ff5ab45963dcfc 100644 (file)
@@ -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);
        }
     }
 
index 078be7014740e0f4171b46f157b1a4e3e1459f73..b3023ad51779b909aae9d2f1ba707eabc727a555 100644 (file)
@@ -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."));
index 699e317a80ad12483702601e96d142ce4d2d9162..e9f36fde5fc1f6f7cc668840456b0fb47c91007c 100644 (file)
@@ -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));
 
index 06092420c077c6068f794f2d8cb3106f0cf4c12e..c31af8d79da2d0b3b05808808437faca24f89441 100644 (file)
@@ -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)
index 1676a9bb71d45fca9ec603435d9c1b757b2b6281..79d160b21c491846e6e5a8e998b7ccac0cf2c013 100644 (file)
@@ -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;
index 1993fceda7bf2ac218728b967d1a18e2dd1fbebd..790d970765c0a66de5b8b6c2dea2cd8b42497379 100644 (file)
@@ -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))
index ae01760b93ecc2ef645f3371beb4e335da391d9b..0a3100da4ca633e6ec0d070d7d293fb26980434d 100644 (file)
@@ -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;
index 7ac63224ea135ee1200cb6059e1076027a90d1a3..2f910e609aa2d615bacea160203f4a0acab3f37c 100644 (file)
@@ -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);
index bc36a00bd8593a6559399591629107bdc571d575..85002ecc7d7b5cba8c57dcc39d81b88565a1529f 100644 (file)
@@ -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
index 96abc5d09bfbc5b27c5e6c77aed0cc2fb34bea79..9f447ba20e9445f4eb59fb8b2548c6f2e8c5bf98 100644 (file)
@@ -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;
index 46257ba87fe59b66cdd6a504165fe8027848eea9..784b912e13b072be0008be701ab6a815c3fa80da 100644 (file)
@@ -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);
 }
index 0bd017952778d08730cc450df01ba99b8d9668ae..53de7a2b2f3a5ad5549653ca26e0343670206c95 100644 (file)
@@ -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));
     }
index 8a81fcb8d25e12f1f5568065f82d4215792e5f9b..b640b1d2aad51d571b931e250c292cdf5bf8e394 100644 (file)
@@ -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));
        }
index b9a4be1c600ebd19552cd130f90bab420b4943a3..8c2307e0ade8784e9c17ef4c38cd9155820a2317 100644 (file)
@@ -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
index af3e7d69d9eb821a84537c073163051cea2f1aab..0dbbb1bd1b1b2a95659bbcf0870b57f24cdd9f1c 100644 (file)
@@ -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;
index 650e3dfead4c53448d791bf8f791e25be339843d..f88b53912593752f358913a7307b0696e1779e91 100644 (file)
@@ -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);
index 43a20690daef65a958e0cd5a24c78cf778c298eb..d27514fc7f5259f90782ec83afa2c3be183ba109 100644 (file)
@@ -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))
index 2e1bb4ab1bbac02d520ca5bb665d1e554c39fe3c..e7dda8d9fda3de58cea21a649d25d3fb9bc70848 100644 (file)
@@ -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);
index 4c44fb9a95a699fb6774dacb1b1506b018858304..045fc73ecbf7dafce55126cd4eaec377a3b3841a 100644 (file)
@@ -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)
 {
index a168403c61d4b00ea2643aab407e390623d42252..5fe26ae0bb2172d0d6aa0536c6d226e071ecb9e7 100644 (file)
@@ -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.  */
 };
index 4113999d2483a887692111e04291c11261ebb208..b89ca22b4bf89786ee75460ac2dc849bf7c42f3a 100644 (file)
@@ -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.  */
index 1a2ba1dc051d2a0d5e8c5fe47907aa30395de651..cb551ff2209c03c6cd8ad57782730d0dc6c383b7 100644 (file)
@@ -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]);
 
index 3cdb27a2672022c55870896a3b65ba220993b2cd..1eedee7f306e7ee344a7a498fb654a268fedb20f 100644 (file)
@@ -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;
This page took 0.082777 seconds and 4 git commands to generate.