2005-05-23 Andrew Cagney <cagney@gnu.org>
* target.h (child_xfer_memory): Use gdb_byte for byte buffer parameters. * inftarg.c (child_xfer_partial): Update. * wince.c (child_xfer_memory): Update. * win32-nat.c (child_xfer_memory): Update. * rs6000-nat.c (child_xfer_memory): Update. * infptrace.c (child_xfer_memory): Update. * dcache.c (struct dcache_block): Use gdb_byte for the byte buffers. (dcache_read_line, dcache_xfer_memory, dcache_poke_byte) (dcache_peek_byte, dcache_write_line): Ditto.
This commit is contained in:
parent
36aa5e41a2
commit
6c932e5455
9 changed files with 26 additions and 18 deletions
|
@ -1,5 +1,17 @@
|
||||||
2005-05-23 Andrew Cagney <cagney@gnu.org>
|
2005-05-23 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* target.h (child_xfer_memory): Use gdb_byte for byte buffer
|
||||||
|
parameters.
|
||||||
|
* inftarg.c (child_xfer_partial): Update.
|
||||||
|
* wince.c (child_xfer_memory): Update.
|
||||||
|
* win32-nat.c (child_xfer_memory): Update.
|
||||||
|
* rs6000-nat.c (child_xfer_memory): Update.
|
||||||
|
* infptrace.c (child_xfer_memory): Update.
|
||||||
|
* dcache.c (struct dcache_block): Use gdb_byte for the byte
|
||||||
|
buffers.
|
||||||
|
(dcache_read_line, dcache_xfer_memory, dcache_poke_byte)
|
||||||
|
(dcache_peek_byte, dcache_write_line): Ditto.
|
||||||
|
|
||||||
* auxv.h (target_auxv_read, procfs_xfer_auxv)
|
* auxv.h (target_auxv_read, procfs_xfer_auxv)
|
||||||
(target_auxv_parse): Use gdb_byte for byte buffer parameters.
|
(target_auxv_parse): Use gdb_byte for byte buffer parameters.
|
||||||
* auxv.c (target_auxv_read, procfs_xfer_auxv, target_auxv_parse)
|
* auxv.c (target_auxv_read, procfs_xfer_auxv, target_auxv_parse)
|
||||||
|
|
16
gdb/dcache.c
16
gdb/dcache.c
|
@ -124,7 +124,7 @@ struct dcache_block
|
||||||
{
|
{
|
||||||
struct dcache_block *p; /* next in list */
|
struct dcache_block *p; /* next in list */
|
||||||
CORE_ADDR addr; /* Address for which data is recorded. */
|
CORE_ADDR addr; /* Address for which data is recorded. */
|
||||||
char data[LINE_SIZE]; /* bytes at given address */
|
gdb_byte data[LINE_SIZE]; /* bytes at given address */
|
||||||
unsigned char state[LINE_SIZE]; /* what state the data is in */
|
unsigned char state[LINE_SIZE]; /* what state the data is in */
|
||||||
|
|
||||||
/* whether anything in state is dirty - used to speed up the
|
/* whether anything in state is dirty - used to speed up the
|
||||||
|
@ -162,10 +162,6 @@ struct dcache_struct
|
||||||
struct dcache_block *the_cache;
|
struct dcache_block *the_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr);
|
|
||||||
|
|
||||||
static int dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr);
|
|
||||||
|
|
||||||
static struct dcache_block *dcache_hit (DCACHE *dcache, CORE_ADDR addr);
|
static struct dcache_block *dcache_hit (DCACHE *dcache, CORE_ADDR addr);
|
||||||
|
|
||||||
static int dcache_write_line (DCACHE *dcache, struct dcache_block *db);
|
static int dcache_write_line (DCACHE *dcache, struct dcache_block *db);
|
||||||
|
@ -250,7 +246,7 @@ static int
|
||||||
dcache_write_line (DCACHE *dcache, struct dcache_block *db)
|
dcache_write_line (DCACHE *dcache, struct dcache_block *db)
|
||||||
{
|
{
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
char *myaddr;
|
gdb_byte *myaddr;
|
||||||
int len;
|
int len;
|
||||||
int res;
|
int res;
|
||||||
int reg_len;
|
int reg_len;
|
||||||
|
@ -331,7 +327,7 @@ static int
|
||||||
dcache_read_line (DCACHE *dcache, struct dcache_block *db)
|
dcache_read_line (DCACHE *dcache, struct dcache_block *db)
|
||||||
{
|
{
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
char *myaddr;
|
gdb_byte *myaddr;
|
||||||
int len;
|
int len;
|
||||||
int res;
|
int res;
|
||||||
int reg_len;
|
int reg_len;
|
||||||
|
@ -450,7 +446,7 @@ dcache_writeback (DCACHE *dcache)
|
||||||
Returns 0 on error. */
|
Returns 0 on error. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
|
dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr)
|
||||||
{
|
{
|
||||||
struct dcache_block *db = dcache_hit (dcache, addr);
|
struct dcache_block *db = dcache_hit (dcache, addr);
|
||||||
|
|
||||||
|
@ -477,7 +473,7 @@ dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
|
dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr)
|
||||||
{
|
{
|
||||||
struct dcache_block *db = dcache_hit (dcache, addr);
|
struct dcache_block *db = dcache_hit (dcache, addr);
|
||||||
|
|
||||||
|
@ -536,7 +532,7 @@ dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
|
||||||
int len, int should_write)
|
int len, int should_write)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, char *ptr);
|
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
|
||||||
xfunc = should_write ? dcache_poke_byte : dcache_peek_byte;
|
xfunc = should_write ? dcache_poke_byte : dcache_peek_byte;
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
|
|
|
@ -332,7 +332,7 @@ store_inferior_registers (int regnum)
|
||||||
us in the target stack anyway. */
|
us in the target stack anyway. */
|
||||||
|
|
||||||
int
|
int
|
||||||
child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
child_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
|
||||||
struct mem_attrib *attrib, struct target_ops *target)
|
struct mem_attrib *attrib, struct target_ops *target)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -531,8 +531,8 @@ child_core_file_to_sym_file (char *core)
|
||||||
|
|
||||||
static LONGEST
|
static LONGEST
|
||||||
child_xfer_partial (struct target_ops *ops, enum target_object object,
|
child_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||||
const char *annex, void *readbuf,
|
const char *annex, gdb_byte *readbuf,
|
||||||
const void *writebuf, ULONGEST offset, LONGEST len)
|
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||||
{
|
{
|
||||||
switch (object)
|
switch (object)
|
||||||
{
|
{
|
||||||
|
|
|
@ -449,7 +449,7 @@ read_word (CORE_ADDR from, int *to, int arch64)
|
||||||
us in the target stack anyway. */
|
us in the target stack anyway. */
|
||||||
|
|
||||||
int
|
int
|
||||||
child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
|
child_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
|
||||||
int write, struct mem_attrib *attrib,
|
int write, struct mem_attrib *attrib,
|
||||||
struct target_ops *target)
|
struct target_ops *target)
|
||||||
{
|
{
|
||||||
|
|
|
@ -545,7 +545,7 @@ extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
|
||||||
extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
|
extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
|
||||||
struct mem_attrib *, struct target_ops *);
|
struct mem_attrib *, struct target_ops *);
|
||||||
|
|
||||||
extern int child_xfer_memory (CORE_ADDR, char *, int, int,
|
extern int child_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
|
||||||
struct mem_attrib *, struct target_ops *);
|
struct mem_attrib *, struct target_ops *);
|
||||||
|
|
||||||
/* Make a single attempt at transfering LEN bytes. On a successful
|
/* Make a single attempt at transfering LEN bytes. On a successful
|
||||||
|
|
|
@ -1931,7 +1931,7 @@ child_stop (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
child_xfer_memory (CORE_ADDR memaddr, char *our, int len,
|
child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
|
||||||
int write, struct mem_attrib *mem,
|
int write, struct mem_attrib *mem,
|
||||||
struct target_ops *target)
|
struct target_ops *target)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1839,7 +1839,7 @@ child_mourn_inferior (void)
|
||||||
|
|
||||||
/* Move memory from child to/from gdb. */
|
/* Move memory from child to/from gdb. */
|
||||||
int
|
int
|
||||||
child_xfer_memory (CORE_ADDR memaddr, char *our,
|
child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our,
|
||||||
int len, int write,
|
int len, int write,
|
||||||
struct mem_attrib *attrib,
|
struct mem_attrib *attrib,
|
||||||
struct target_ops *target)
|
struct target_ops *target)
|
||||||
|
|
|
@ -1931,7 +1931,7 @@ child_stop (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
child_xfer_memory (CORE_ADDR memaddr, char *our, int len,
|
child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
|
||||||
int write, struct mem_attrib *mem,
|
int write, struct mem_attrib *mem,
|
||||||
struct target_ops *target)
|
struct target_ops *target)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue