From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19537 invoked by alias); 24 May 2005 23:53:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19486 invoked by uid 22791); 24 May 2005 23:52:58 -0000 Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.131) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 24 May 2005 23:52:58 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j4ONqqmD408968 for ; Tue, 24 May 2005 19:52:52 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4ONqqGO126500 for ; Tue, 24 May 2005 17:52:52 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j4ONqq9O004541 for ; Tue, 24 May 2005 17:52:52 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j4ONqqPQ004529 for ; Tue, 24 May 2005 17:52:52 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j4ONqpUf095858 for ; Tue, 24 May 2005 18:52:51 -0500 Date: Wed, 25 May 2005 03:14:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: gdb-patches@sources.redhat.com Subject: [RFC] src/gdb/ ppc related files gdb_byteised. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00536.txt.bz2 2005-05-24 Manoj Iyer * ppc-bdm.c: Change type of buffer from char to gdb_byte. (bdm_ppc_fetch_registers): Change 'unsigned char *' to 'gdb_byte *'. * ppc-linux-nat.c : Change type of gdb_vrregset_t to gdb_byte. (right_fill_reg): Change type of last argument to 'gdb_byte *'. (fill_fpregset): change cast from 'void *' to 'gdb_byte *'. (fetch_register): Change type of buf to gdb_byte, and type of message to gdb_byte. (store_register): Change type of bug to gdb_byte, and message to gdb_byte. * ppc-linux-tdep.c (ppc_linux_in_sigtramp): Change type of 'buf' to gdb_byte. (ppc_linux_at_sigtramp_return_path): Likewise. (ppc_linux_skip_trampoline_code): Change type of buf to gdb_byte, and change type of symname buffer to gdb_byte. (ppc_linux_memory_remove_breakpoint): Change last argument to 'gdb_byte *', change type of 'bp' to 'gdb_byte *', and change type of old_contents to gdb_byte. (read_insn): Change type of buf to gdb_byte. (ppc_linux_return_value): Change type of readbuf and writebuf to 'gdb_byte *'. (ppc_linux_supply_gregset): Change type of gregs to 'gdb_byte *'. (ppc32_linux_supply_gregset): Change type of gregs to 'gdb_byte *'. (ppc64_linux_supply_gregset): Change type of gregs to 'gdb_byte *'. (ppc_linux_supply_fpregset): Change type of fpset to 'gdb_byte *'. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Change type of buffers regval, memval, and word to gdb_byte. (ppc64_sysv_abi_return_value): Change type of buffers regval to gdb_byte. Change type of readbuf and writebug to 'gdb_type *'. (do_ppc_sysv_return_value): Change buffer regval to gdb_byte, change types of readbuf and writebuf to 'gdb_byte *'. (ppc64_sysv_abi_push_dummy_call): Change type of buffer regval to gdb_byte. Change type of readbuf and writebuf to 'gdb_byte *' (ppc_sysv_abi_broken_return_value): Change type of readbuf and writebuf to 'gdb_byte *'. * ppc-tdep.h (ppc_liux_memory_remove_breakpoint): Change in function prototype, type of last argumet to 'gdb_byte *'. (ppc_sysv_abi_retur_value): Change in function prototype, type of readbuf ad writebuf to 'gdb_byte *'. (ppc_sysv_abi_broke_return_value): Change in function prototype, type of readbuf ad writebuf to 'gdb_byte *'. (ppc64_sysv_abi_retur_value): Change in function prototype, type of readbuf ad writebuf to 'gdb_byte *'. (ppc_linux_supply_gregset): Change in prototype type of gregs to 'gdb_byte *'. (ppc_linux_supply_fpregset): Change in prototype type of gregs to 'gdb_byte *'. (ppc_supply_gregset): Change in prototype type of gregs to 'gdb_byte *'. (ppc_supply_fpregset): Change in prototype type of fpregs to 'gdb_byte *'. (ppc_collect_gregset) Change in prototype type of gregs to 'gdb_byte *'. (ppc_collect_fpregset): Change in prototype type of fpregs to 'gdb_byte *'. * ppcbug-rom.c: Change type of ppcbug_regnames to 'gdb_byte *', and change type of ppcbug_inits to 'gdb_byte *'. (ppcbug_supply_register): Change type of val to 'gdb_byte *'. (init_ppc_cmds): Change type of LOAD_CMD to 'gdb_byte *'. (ppcbug_open0): Change type of args buffer to 'gdb_byte *'. (ppcbug_open1): Change type of args buffer to 'gdb_byte *'. * ppcnbsd-tdep.c (ppcnbsd_return_value): Change type of buffer readbuf and writebuf to 'gdb_byte *'. (ppcnbsd_supply_reg): Change type of regs to 'gdb_byte *'. (ppcnbsd_fill_reg): Change type of regs to 'gdb_byte *'. (ppcnbsd_supply_fpreg): Change type of fpregs to 'gdb_byte *'. (ppcnbsd_fill_fpreg): Change type of fpregs to 'gdb_byte *'. (fetch_core_registers): Change type of core_reg_sect, regs and fpregs to 'gdb_byte *'. (fetch_elfcore_registers): Change type of core_reg_sect to 'gdb_byte *'. * ppcnbsd-tdep.h (ppcnbsd_supply_reg): Change first argument in prototype to 'gdb_byte *'. (ppcnbsd_fill_reg): Change first argument in prototype to (ppcnbsd_supply_fpreg): Change first argument in prototype to (ppcnbsd_fill_fpreg): Change first argument in prototype to 'gdb_byte *'. * ppcobsd-tdep.c (ppcobsd_supply_gregset): Change type of gregs to 'gdb_byte *'. (ppcobsd_collect_gregset): Same * ppcobsd-tdep.h (ppcobsd_supply_gregset): Change type of gregs in prototype to 'gdb_byte *'. (ppcobsd_collect_gregset): Change type of gregs in prototype to 'gdb_byte *'. * rs6000-tdep.c (ppc_supply_reg): Change type of regs to 'gdb_byte *'. (ppc_collect_reg): Change type of regs to 'gdb_byte *'. (rs6000_breakpoint_from_pc): Change return type to 'gdb_byte *', and change type of breakp to 'gdb_byte *'. (rs6000_register_name): Change return type to 'gdb_byte *'. (e500_move_ev_register): Change type of byte_buffer and type of argument 'buf and buffer' to to 'gdb_byte *' (rs6000_info_powerpc_command): Change first arument type to 'gdb_byte *'. (ppc_supply_gregset): Change type of gregs to 'gdb_byte *'. (ppc_supply_fpregset): Change type of fpregs to 'gdb_byte *'. (ppc_collect_gregset): Change type of gregs to 'gdb_byte *'. (ppc_collect_fpregset): Change type of fpregs to 'gdb_byte *'. (rs6000_register_to_value): Change type of 'to' to 'gdb_byte *'. (rs6000_value_to_register): Change type of 'from' to 'gdb_byte *'. (e500_pseudo_register_read): Change type of last argument, buffer to 'gdb_byte *'. (e500_pseudo_register_write): Change type of last argument buffer to 'gdb_byte *', and change 'void *' argument to ''gdb_byte *'. (rs6000_store_return_value): Change type of valbug to ''gdb_byte *'. (rs6000_frame_cache): Change type of this_chache to ''gdb_byte *'. (rs6000_frame_this_id): Change type of this_chache to ''gdb_byte *'. (rs6000_frame_prev_register): Change type of this_chache and valup to ''gdb_byte *'. (rs6000_frame_base_address): Change 'void **' to 'gdb_byte *'. * rs6000-nat.c (objfile_symbol_add): Change type of argument to 'gdb_byte *'. (fetch_core_registers): Change argument in prototype to 'gdb_byte *'. (exec_one_dummy_insn): Change type shadow_contents to gdb_byte. (fetch_core_registers): Change argument type to 'gdb_byte *'. (xcoff_relocate_core): Change type of buffer to 'gdb_byte *'. ----------------------------------------------------------------- diff -Naurp old/src/gdb/ppc-bdm.c new/src/gdb/ppc-bdm.c --- old/src/gdb/ppc-bdm.c 2005-02-11 12:13:51.000000000 -0600 +++ new/src/gdb/ppc-bdm.c 2005-05-24 15:37:19.000000000 -0500 @@ -73,7 +73,7 @@ extern struct target_ops bdm_ppc_ops; /* 0, /* mq (SPR 0) */ -char nowatchdog[4] = +gdb_byte nowatchdog[4] = {0xff, 0xff, 0xff, 0x88}; /* Open a connection to a remote debugger. @@ -156,7 +156,7 @@ bdm_ppc_fetch_registers (int regno) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; - unsigned char *regs; + gdb_byte *regs; int first_regno, last_regno; int first_bdm_regno, last_bdm_regno; int reglen; diff -Naurp old/src/gdb/ppc-linux-nat.c new/src/gdb/ppc-linux-nat.c --- old/src/gdb/ppc-linux-nat.c 2005-02-11 12:13:51.000000000 -0600 +++ new/src/gdb/ppc-linux-nat.c 2005-05-24 16:34:06.000000000 -0500 @@ -109,7 +109,7 @@ #define SIZEOF_VRREGS 33*16+4 -typedef char gdb_vrregset_t[SIZEOF_VRREGS]; +typedef gdb_byte gdb_vrregset_t[SIZEOF_VRREGS]; /* On PPC processors that support the the Signal Processing Extension @@ -342,7 +342,7 @@ fetch_register (int tid, int regno) CORE_ADDR regaddr = ppc_register_u_addr (regno); int bytes_transferred; unsigned int offset; /* Offset of registers within the u area. */ - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; if (altivec_register_p (regno)) { @@ -385,7 +385,7 @@ fetch_register (int tid, int regno) regaddr += sizeof (PTRACE_XFER_TYPE); if (errno != 0) { - char message[128]; + gdb_byte message[128]; sprintf (message, "reading register %s (#%d)", REGISTER_NAME (regno), regno); perror_with_name (message); @@ -638,7 +638,7 @@ store_register (int tid, int regno) CORE_ADDR regaddr = ppc_register_u_addr (regno); int i; size_t bytes_to_transfer; - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; if (altivec_register_p (regno)) { @@ -689,7 +689,7 @@ store_register (int tid, int regno) if (errno != 0) { - char message[128]; + gdb_byte message[128]; sprintf (message, "writing register %s (#%d)", REGISTER_NAME (regno), regno); perror_with_name (message); @@ -802,7 +802,7 @@ supply_gregset (gdb_gregset_t *gregsetp) } static void -right_fill_reg (int regnum, void *reg) +right_fill_reg (int regnum, gdb_byte *reg) { /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace interface, and not the wordsize of the program's ABI. */ @@ -869,7 +869,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp { int regi; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - bfd_byte *fpp = (void *) fpregsetp; + bfd_byte *fpp = (gdb_byte *) fpregsetp; if (ppc_floating_point_unit_p (current_gdbarch)) { diff -Naurp old/src/gdb/ppc-linux-tdep.c new/src/gdb/ppc-linux-tdep.c --- old/src/gdb/ppc-linux-tdep.c 2005-03-31 13:58:25.000000000 -0600 +++ new/src/gdb/ppc-linux-tdep.c 2005-05-24 18:42:22.000000000 -0500 @@ -157,7 +157,7 @@ ppc_linux_in_sigtramp (CORE_ADDR pc, cha CORE_ADDR lr; CORE_ADDR sp; CORE_ADDR tramp_sp; - char buf[4]; + gdb_byte buf[4]; CORE_ADDR handler; lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); @@ -205,7 +205,7 @@ insn_is_sigreturn (unsigned long pcinsn) static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) { - char buf[12]; + gdb_byte buf[12]; unsigned long pcinsn; if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) return 0; @@ -224,7 +224,7 @@ ppc_linux_at_sigtramp_return_path (CORE_ static CORE_ADDR ppc_linux_skip_trampoline_code (CORE_ADDR pc) { - char buf[4]; + gdb_byte buf[4]; struct obj_section *sect; struct objfile *objfile; unsigned long insn; @@ -237,7 +237,7 @@ ppc_linux_skip_trampoline_code (CORE_ADD CORE_ADDR reloc; CORE_ADDR sym; long symidx; - char symname[1024]; + gdb_byte symname[1024]; struct minimal_symbol *msymbol; /* Find the section pc is in; return if not in .plt */ @@ -455,12 +455,12 @@ ppc_linux_skip_trampoline_code (CORE_ADD regard to removing breakpoints in some potentially self modifying code. */ int -ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, gdb_byte *contents_cache) { - const unsigned char *bp; + const gdb_byte *bp; int val; int bplen; - char old_contents[BREAKPOINT_MAX]; + gdb_byte old_contents[BREAKPOINT_MAX]; /* Determine appropriate breakpoint contents and size for this address. */ bp = BREAKPOINT_FROM_PC (&addr, &bplen); @@ -485,8 +485,8 @@ ppc_linux_memory_remove_breakpoint (CORE static enum return_value_convention ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, - struct regcache *regcache, void *readbuf, - const void *writebuf) + struct regcache *regcache, gdb_byte *readbuf, + const gdb_byte *writebuf) { if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT || TYPE_CODE (valtype) == TYPE_CODE_UNION) @@ -570,7 +570,7 @@ ppc_linux_svr4_fetch_link_map_offsets (v static unsigned int read_insn (CORE_ADDR pc) { - unsigned char buf[4]; + gdb_byte buf[4]; read_memory (pc, buf, 4); return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; @@ -815,7 +815,7 @@ right_supply_register (struct regcache * void ppc_linux_supply_gregset (struct regcache *regcache, - int regnum, const void *gregs, size_t size, + int regnum, const gdb_byte *gregs, size_t size, int wordsize) { int regi; @@ -848,7 +848,7 @@ ppc_linux_supply_gregset (struct regcach static void ppc32_linux_supply_gregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *gregs, size_t size) + int regnum, const gdb_byte *gregs, size_t size) { ppc_linux_supply_gregset (regcache, regnum, gregs, size, 4); } @@ -860,7 +860,7 @@ static struct regset ppc32_linux_gregset static void ppc64_linux_supply_gregset (const struct regset *regset, struct regcache * regcache, - int regnum, const void *gregs, size_t size) + int regnum, const gdb_byte *gregs, size_t size) { ppc_linux_supply_gregset (regcache, regnum, gregs, size, 8); } @@ -872,7 +872,7 @@ static struct regset ppc64_linux_gregset void ppc_linux_supply_fpregset (const struct regset *regset, struct regcache * regcache, - int regnum, const void *fpset, size_t size) + int regnum, const gdb_byte *fpset, size_t size) { int regi; struct gdbarch *regcache_arch = get_regcache_arch (regcache); diff -Naurp old/src/gdb/ppc-sysv-tdep.c new/src/gdb/ppc-sysv-tdep.c --- old/src/gdb/ppc-sysv-tdep.c 2005-02-11 12:13:52.000000000 -0600 +++ new/src/gdb/ppc-sysv-tdep.c 2005-05-24 16:02:46.000000000 -0500 @@ -114,7 +114,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb { /* Always store the floating point value using the register's floating-point format. */ - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum + freg); convert_typed_floating (val, type, regval, regtype); @@ -131,7 +131,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb argoffset = align_up (argoffset, 8); if (write_pass) { - char memval[8]; + gdb_byte memval[8]; struct type *memtype; switch (TARGET_BYTE_ORDER) { @@ -242,7 +242,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb { /* Reduce the parameter down to something that fits in a "word". */ - char word[MAX_REGISTER_SIZE]; + gdb_byte word[MAX_REGISTER_SIZE]; memset (word, 0, MAX_REGISTER_SIZE); if (len > tdep->wordsize || TYPE_CODE (type) == TYPE_CODE_STRUCT @@ -327,8 +327,8 @@ ppc_sysv_abi_push_dummy_call (struct gdb static enum return_value_convention do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type, - struct regcache *regcache, void *readbuf, - const void *writebuf, int broken_gcc) + struct regcache *regcache, gdb_byte *readbuf, + const gdb_byte *writebuf, int broken_gcc) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (tdep->wordsize == 4); @@ -340,7 +340,7 @@ do_ppc_sysv_return_value (struct gdbarch { /* Floats and doubles stored in "f1". Convert the value to the required type. */ - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum + 1); regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval); @@ -350,7 +350,7 @@ do_ppc_sysv_return_value (struct gdbarch { /* Floats and doubles stored in "f1". Convert the value to the register's "double" type. */ - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum); convert_typed_floating (writebuf, type, regval, regtype); regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval); @@ -488,7 +488,7 @@ do_ppc_sysv_return_value (struct gdbarch /* This matches SVr4 PPC, it does not match GCC. */ /* The value is right-padded to 8 bytes and then loaded, as two "words", into r3/r4. */ - char regvals[MAX_REGISTER_SIZE * 2]; + gdb_byte regvals[MAX_REGISTER_SIZE * 2]; regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, regvals + 0 * tdep->wordsize); if (TYPE_LENGTH (type) > tdep->wordsize) @@ -501,7 +501,7 @@ do_ppc_sysv_return_value (struct gdbarch /* This matches SVr4 PPC, it does not match GCC. */ /* The value is padded out to 8 bytes and then loaded, as two "words" into r3/r4. */ - char regvals[MAX_REGISTER_SIZE * 2]; + gdb_byte regvals[MAX_REGISTER_SIZE * 2]; memset (regvals, 0, sizeof regvals); memcpy (regvals, writebuf, TYPE_LENGTH (type)); regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3, @@ -517,8 +517,8 @@ do_ppc_sysv_return_value (struct gdbarch enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, - struct regcache *regcache, void *readbuf, - const void *writebuf) + struct regcache *regcache, gdb_byte *readbuf, + const gdb_byte *writebuf) { return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf, writebuf, 0); @@ -528,7 +528,7 @@ enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, - void *readbuf, const void *writebuf) + gdb_byte *readbuf, const gdb_byte *writebuf) { return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf, writebuf, 1); @@ -688,7 +688,7 @@ ppc64_sysv_abi_push_dummy_call (struct g if (ppc_floating_point_unit_p (current_gdbarch) && freg <= 13) { - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum); convert_typed_floating (val, type, regval, regtype); @@ -707,7 +707,7 @@ ppc64_sysv_abi_push_dummy_call (struct g This code interprets that to mean: store it, left aligned, in the general register. */ - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; memset (regval, 0, sizeof regval); memcpy (regval, val, TYPE_LENGTH (type)); regcache_cooked_write (regcache, @@ -782,7 +782,7 @@ ppc64_sysv_abi_push_dummy_call (struct g { if (write_pass && greg <= 10) { - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; int len = TYPE_LENGTH (type) - byte; if (len > tdep->wordsize) len = tdep->wordsize; @@ -880,8 +880,8 @@ ppc64_sysv_abi_push_dummy_call (struct g corresponding register return-value location. */ enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, - struct regcache *regcache, void *readbuf, - const void *writebuf) + struct regcache *regcache, gdb_byte *readbuf, + const gdb_byte *writebuf) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -893,7 +893,7 @@ ppc64_sysv_abi_return_value (struct gdba /* Floats and doubles in F1. */ if (TYPE_CODE (valtype) == TYPE_CODE_FLT && TYPE_LENGTH (valtype) <= 8) { - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum); if (writebuf != NULL) { @@ -984,7 +984,7 @@ ppc64_sysv_abi_return_value (struct gdba int i; for (i = 0; i < 2; i++) { - char regval[MAX_REGISTER_SIZE]; + gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (current_gdbarch, tdep->ppc_fp0_regnum); if (writebuf != NULL) diff -Naurp old/src/gdb/ppc-tdep.h new/src/gdb/ppc-tdep.h --- old/src/gdb/ppc-tdep.h 2004-08-04 12:17:55.000000000 -0500 +++ new/src/gdb/ppc-tdep.h 2005-05-24 17:55:38.000000000 -0500 @@ -33,13 +33,13 @@ struct type; enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, - void *readbuf, - const void *writebuf); + gdb_byte *readbuf, + const gdb_byte *writebuf); enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, - void *readbuf, - const void *writebuf); + gdb_byte *readbuf, + const gdb_byte *writebuf); CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, @@ -56,20 +56,20 @@ CORE_ADDR ppc64_sysv_abi_push_dummy_call CORE_ADDR struct_addr); CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr); -int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache); +int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, gdb_byte *contents_cache); struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void); void ppc_linux_supply_gregset (struct regcache *regcache, - int regnum, const void *gregs, size_t size, + int regnum, const gdb_byte *gregs, size_t size, int wordsize); void ppc_linux_supply_fpregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *gregs, size_t size); + int regnum, const gdb_byte *gregs, size_t size); enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, - void *readbuf, - const void *writebuf); + gdb_byte *readbuf, + const gdb_byte *writebuf); /* From rs6000-tdep.c... */ int altivec_register_p (int regno); @@ -109,7 +109,7 @@ struct ppc_reg_offsets extern void ppc_supply_gregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *gregs, size_t len); + int regnum, const gdb_byte *gregs, size_t len); /* Supply register REGNUM in the floating-point register set REGSET from the buffer specified by FPREGS and LEN to register cache @@ -117,7 +117,7 @@ extern void ppc_supply_gregset (const st extern void ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *fpregs, size_t len); + int regnum, const gdb_byte *fpregs, size_t len); /* Collect register REGNUM in the general-purpose register set REGSET. from register cache REGCACHE into the buffer specified by @@ -126,7 +126,7 @@ extern void ppc_supply_fpregset (const s extern void ppc_collect_gregset (const struct regset *regset, const struct regcache *regcache, - int regnum, void *gregs, size_t len); + int regnum, gdb_byte *gregs, size_t len); /* Collect register REGNUM in the floating-point register set REGSET. from register cache REGCACHE into the buffer specified by @@ -135,7 +135,7 @@ extern void ppc_collect_gregset (const s extern void ppc_collect_fpregset (const struct regset *regset, const struct regcache *regcache, - int regnum, void *fpregs, size_t len); + int regnum, gdb_byte *fpregs, size_t len); /* Private data that this module attaches to struct gdbarch. */ diff -Naurp old/src/gdb/ppcbug-rom.c new/src/gdb/ppcbug-rom.c --- old/src/gdb/ppcbug-rom.c 2004-07-21 20:31:49.000000000 -0500 +++ new/src/gdb/ppcbug-rom.c 2005-05-24 17:56:13.000000000 -0500 @@ -29,7 +29,7 @@ #include "regcache.h" static void -ppcbug_supply_register (char *regname, int regnamelen, char *val, int vallen) +ppcbug_supply_register (char *regname, int regnamelen, gdb_byte *val, int vallen) { int regno = 0; @@ -101,7 +101,7 @@ ppcbug_supply_register (char *regname, i * registers either. So, typing "info reg sp" becomes an "A7". */ -static char *ppcbug_regnames[] = +static gdb_byte *ppcbug_regnames[] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", @@ -126,11 +126,11 @@ static char *ppcbug_regnames[] = static struct target_ops ppcbug_ops0; static struct target_ops ppcbug_ops1; -static char *ppcbug_inits[] = +static gdb_byte *ppcbug_inits[] = {"\r", NULL}; static void -init_ppc_cmds (char *LOAD_CMD, +init_ppc_cmds (gdb_byte *LOAD_CMD, struct monitor_ops *OPS, struct target_ops *targops) { @@ -185,13 +185,13 @@ static struct monitor_ops ppcbug_cmds0; static struct monitor_ops ppcbug_cmds1; static void -ppcbug_open0 (char *args, int from_tty) +ppcbug_open0 (gdb_byte *args, int from_tty) { monitor_open (args, &ppcbug_cmds0, from_tty); } static void -ppcbug_open1 (char *args, int from_tty) +ppcbug_open1 (gdb_byte *args, int from_tty) { monitor_open (args, &ppcbug_cmds1, from_tty); } diff -Naurp old/src/gdb/ppcnbsd-tdep.c new/src/gdb/ppcnbsd-tdep.c --- old/src/gdb/ppcnbsd-tdep.c 2005-02-10 22:06:01.000000000 -0600 +++ new/src/gdb/ppcnbsd-tdep.c 2005-05-24 16:25:11.000000000 -0500 @@ -50,7 +50,7 @@ #define SIZEOF_STRUCT_FPREG (33 * 8) void -ppcnbsd_supply_reg (char *regs, int regno) +ppcnbsd_supply_reg (gdb_byte *regs, int regno) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; @@ -84,7 +84,7 @@ ppcnbsd_supply_reg (char *regs, int regn } void -ppcnbsd_fill_reg (char *regs, int regno) +ppcnbsd_fill_reg (gdb_byte *regs, int regno) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; @@ -117,7 +117,7 @@ ppcnbsd_fill_reg (char *regs, int regno) } void -ppcnbsd_supply_fpreg (char *fpregs, int regno) +ppcnbsd_supply_fpreg (gdb_byte *fpregs, int regno) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; @@ -147,7 +147,7 @@ ppcnbsd_supply_fpreg (char *fpregs, int } void -ppcnbsd_fill_fpreg (char *fpregs, int regno) +ppcnbsd_fill_fpreg (gdb_byte *fpregs, int regno) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; @@ -177,10 +177,10 @@ ppcnbsd_fill_fpreg (char *fpregs, int re } static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, +fetch_core_registers (gdb_byte *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR ignore) { - char *regs, *fpregs; + gdb_byte *regs, *fpregs; /* We get everything from one section. */ if (which != 0) @@ -197,7 +197,7 @@ fetch_core_registers (char *core_reg_sec } static void -fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, int which, +fetch_elfcore_registers (gdb_byte *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR ignore) { switch (which) @@ -246,8 +246,8 @@ static struct core_fns ppcnbsd_elfcore_f static enum return_value_convention ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype, - struct regcache *regcache, void *readbuf, - const void *writebuf) + struct regcache *regcache, gdb_byte *readbuf, + const gdb_byte *writebuf) { if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT || TYPE_CODE (valtype) == TYPE_CODE_UNION) diff -Naurp old/src/gdb/ppcnbsd-tdep.h new/src/gdb/ppcnbsd-tdep.h --- old/src/gdb/ppcnbsd-tdep.h 2002-05-28 13:43:07.000000000 -0500 +++ new/src/gdb/ppcnbsd-tdep.h 2005-05-24 16:27:24.000000000 -0500 @@ -21,10 +21,10 @@ #ifndef PPCNBSD_TDEP_H #define PPCNBSD_TDEP_H -void ppcnbsd_supply_reg (char *, int); -void ppcnbsd_fill_reg (char *, int); +void ppcnbsd_supply_reg (gdb_byte *, int); +void ppcnbsd_fill_reg (gdb_byte *, int); -void ppcnbsd_supply_fpreg (char *, int); -void ppcnbsd_fill_fpreg (char *, int); +void ppcnbsd_supply_fpreg (gdb_byte *, int); +void ppcnbsd_fill_fpreg (gdb_byte *, int); #endif /* PPCNBSD_TDEP_H */ diff -Naurp old/src/gdb/ppcobsd-tdep.c new/src/gdb/ppcobsd-tdep.c --- old/src/gdb/ppcobsd-tdep.c 2005-04-22 15:29:14.000000000 -0500 +++ new/src/gdb/ppcobsd-tdep.c 2005-05-24 17:58:17.000000000 -0500 @@ -48,7 +48,7 @@ struct ppc_reg_offsets ppcobsd_reg_offse void ppcobsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, - const void *gregs, size_t len) + const gdb_byte *gregs, size_t len) { /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating point registers. Traditionally, GDB's register set has still @@ -74,7 +74,7 @@ ppcobsd_supply_gregset (const struct reg void ppcobsd_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, - void *gregs, size_t len) + gdb_byte *gregs, size_t len) { /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating point registers. Traditionally, GDB's register set has still diff -Naurp old/src/gdb/ppcobsd-tdep.h new/src/gdb/ppcobsd-tdep.h --- old/src/gdb/ppcobsd-tdep.h 2004-04-22 16:13:06.000000000 -0500 +++ new/src/gdb/ppcobsd-tdep.h 2005-05-24 16:31:02.000000000 -0500 @@ -40,7 +40,7 @@ extern struct regset ppcobsd_gregset; extern void ppcobsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, - const void *gregs, size_t len); + const gdb_byte *gregs, size_t len); /* Collect register REGNUM in the general-purpose register set REGSET. from register cache REGCACHE into the buffer specified by @@ -49,6 +49,6 @@ extern void ppcobsd_supply_gregset (cons extern void ppcobsd_collect_gregset (const struct regset *regset, const struct regcache *regcache, - int regnum, void *gregs, size_t len); + int regnum, gdb_byte *gregs, size_t len); #endif /* ppcobsd-tdep.h */ diff -Naurp old/src/gdb/rs6000-nat.c new/src/gdb/rs6000-nat.c --- old/src/gdb/rs6000-nat.c 2005-05-23 14:32:27.000000000 -0500 +++ new/src/gdb/rs6000-nat.c 2005-05-24 18:37:05.000000000 -0500 @@ -135,11 +135,11 @@ static void vmap_ldinfo (LdInfo *); static struct vmap *add_vmap (LdInfo *); -static int objfile_symbol_add (void *); +static int objfile_symbol_add (gdb_byte *); static void vmap_symtab (struct vmap *); -static void fetch_core_registers (char *, unsigned int, int, CORE_ADDR); +static void fetch_core_registers (gdb_byte *, unsigned int, int, CORE_ADDR); static void exec_one_dummy_insn (void); @@ -527,7 +527,7 @@ exec_one_dummy_insn (void) { #define DUMMY_INSN_ADDR (TEXT_SEGMENT_BASE)+0x200 - char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */ + gdb_byte shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */ int ret, status, pid; CORE_ADDR prev_pc; @@ -565,7 +565,7 @@ exec_one_dummy_insn (void) /* Fetch registers from the register section in core bfd. */ static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, +fetch_core_registers (gdb_byte *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR reg_addr) { CoreRegs *regs; @@ -714,7 +714,7 @@ vmap_symtab (struct vmap *vp) /* Add symbols for an objfile. */ static int -objfile_symbol_add (void *arg) +objfile_symbol_add (gdb_byte *arg) { struct objfile *obj = (struct objfile *) arg; @@ -1108,7 +1108,7 @@ xcoff_relocate_core (struct target_ops * /* Allocated size of buffer. */ int buffer_size = nonfilesz; - char *buffer = xmalloc (buffer_size); + gdb_byte *buffer = xmalloc (buffer_size); struct cleanup *old = make_cleanup (free_current_contents, &buffer); ldinfo_sec = bfd_get_section_by_name (core_bfd, ".ldinfo"); diff -Naurp old/src/gdb/rs6000-tdep.c new/src/gdb/rs6000-tdep.c --- old/src/gdb/rs6000-tdep.c 2005-05-01 14:58:55.000000000 -0500 +++ new/src/gdb/rs6000-tdep.c 2005-05-24 18:31:41.000000000 -0500 @@ -319,7 +319,7 @@ rs6000_register_sim_regno (int reg) static void ppc_supply_reg (struct regcache *regcache, int regnum, - const char *regs, size_t offset) + const gdb_byte *regs, size_t offset) { if (regnum != -1 && offset != -1) regcache_raw_supply (regcache, regnum, regs + offset); @@ -327,7 +327,7 @@ ppc_supply_reg (struct regcache *regcach static void ppc_collect_reg (const struct regcache *regcache, int regnum, - char *regs, size_t offset) + gdb_byte *regs, size_t offset) { if (regnum != -1 && offset != -1) regcache_raw_collect (regcache, regnum, regs + offset); @@ -339,7 +339,7 @@ ppc_collect_reg (const struct regcache * void ppc_supply_gregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *gregs, size_t len) + int regnum, const gdb_byte *gregs, size_t len) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -382,7 +382,7 @@ ppc_supply_gregset (const struct regset void ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache, - int regnum, const void *fpregs, size_t len) + int regnum, const gdb_byte *fpregs, size_t len) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -414,7 +414,7 @@ ppc_supply_fpregset (const struct regset void ppc_collect_gregset (const struct regset *regset, const struct regcache *regcache, - int regnum, void *gregs, size_t len) + int regnum, gdb_byte *gregs, size_t len) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -461,7 +461,7 @@ ppc_collect_gregset (const struct regset void ppc_collect_fpregset (const struct regset *regset, const struct regcache *regcache, - int regnum, void *fpregs, size_t len) + int regnum, gdb_byte *fpregs, size_t len) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -600,7 +600,7 @@ branch_dest (int opcode, int instr, CORE /* Sequence of bytes for breakpoint instruction. */ -const static unsigned char * +const static gdb_byte * rs6000_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) { static unsigned char big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 }; @@ -621,7 +621,7 @@ rs6000_software_single_step (enum target { CORE_ADDR dummy; int breakp_sz; - const char *breakp = rs6000_breakpoint_from_pc (&dummy, &breakp_sz); + const gdb_byte *breakp = rs6000_breakpoint_from_pc (&dummy, &breakp_sz); int ii, insn; CORE_ADDR loc; CORE_ADDR breaks[2]; @@ -1817,7 +1817,7 @@ regsize (const struct reg *reg, int word /* Return the name of register number N, or null if no such register exists in the current architecture. */ -static const char * +static const gdb_byte * rs6000_register_name (int n) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); @@ -1933,7 +1933,7 @@ static void rs6000_register_to_value (struct frame_info *frame, int regnum, struct type *type, - void *to) + gdb_byte *to) { const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + regnum; char from[MAX_REGISTER_SIZE]; @@ -1949,7 +1949,7 @@ static void rs6000_value_to_register (struct frame_info *frame, int regnum, struct type *type, - const void *from) + const gdb_byte *from) { const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + regnum; char to[MAX_REGISTER_SIZE]; @@ -1986,14 +1986,14 @@ rs6000_value_to_register (struct frame_i co-variant type qualifiers, ... */ static void e500_move_ev_register (void (*move) (struct regcache *regcache, - int regnum, void *buf), + int regnum, gdb_byte *buf), struct regcache *regcache, int ev_reg, - void *buffer) + gdb_byte *buffer) { struct gdbarch *arch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (arch); int reg_index; - char *byte_buffer = buffer; + gdb_byte *byte_buffer = buffer; gdb_assert (tdep->ppc_ev0_regnum <= ev_reg && ev_reg < tdep->ppc_ev0_regnum + ppc_num_gprs); @@ -2014,7 +2014,7 @@ e500_move_ev_register (void (*move) (str static void e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, void *buffer) + int reg_nr, gdb_byte *buffer) { struct gdbarch *regcache_arch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2033,7 +2033,7 @@ e500_pseudo_register_read (struct gdbarc static void e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, const void *buffer) + int reg_nr, const gdb_byte *buffer) { struct gdbarch *regcache_arch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2042,7 +2042,7 @@ e500_pseudo_register_write (struct gdbar if (tdep->ppc_ev0_regnum <= reg_nr && reg_nr < tdep->ppc_ev0_regnum + ppc_num_gprs) - e500_move_ev_register ((void (*) (struct regcache *, int, void *)) + e500_move_ev_register ((void (*) (struct regcache *, int, gdb_byte *)) regcache_raw_write, regcache, reg_nr, (void *) buffer); else @@ -2161,7 +2161,7 @@ rs6000_dwarf2_reg_to_regnum (int num) static void rs6000_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2847,7 +2847,7 @@ struct rs6000_frame_cache }; static struct rs6000_frame_cache * -rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) +rs6000_frame_cache (struct frame_info *next_frame, gdb_byte **this_cache) { struct rs6000_frame_cache *cache; struct gdbarch *gdbarch = get_frame_arch (next_frame); @@ -2988,7 +2988,7 @@ rs6000_frame_cache (struct frame_info *n } static void -rs6000_frame_this_id (struct frame_info *next_frame, void **this_cache, +rs6000_frame_this_id (struct frame_info *next_frame, gdb_byte **this_cache, struct frame_id *this_id) { struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, @@ -2998,10 +2998,10 @@ rs6000_frame_this_id (struct frame_info static void rs6000_frame_prev_register (struct frame_info *next_frame, - void **this_cache, + gdb_byte **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realnump, void *valuep) + int *realnump, gdb_byte *valuep) { struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, this_cache); @@ -3026,7 +3026,7 @@ rs6000_frame_sniffer (struct frame_info static CORE_ADDR rs6000_frame_base_address (struct frame_info *next_frame, - void **this_cache) + gdb_byte **this_cache) { struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, this_cache); @@ -3403,7 +3403,7 @@ rs6000_dump_tdep (struct gdbarch *curren static struct cmd_list_element *info_powerpc_cmdlist = NULL; static void -rs6000_info_powerpc_command (char *args, int from_tty) +rs6000_info_powerpc_command (gdb_byte *args, int from_tty) { help_list (info_powerpc_cmdlist, "info powerpc ", class_info, gdb_stdout); } ------------------------------------------------------------------ Thanks ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cogito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++