diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 31 | ||||
-rw-r--r-- | gdb/breakpoint.c | 3 | ||||
-rw-r--r-- | gdb/corefile.c | 2 | ||||
-rw-r--r-- | gdb/dummy-frame.c | 2 | ||||
-rw-r--r-- | gdb/findvar.c | 4 | ||||
-rw-r--r-- | gdb/frame-unwind.h | 2 | ||||
-rw-r--r-- | gdb/frame.c | 28 | ||||
-rw-r--r-- | gdb/frame.h | 16 | ||||
-rw-r--r-- | gdb/gdbcore.h | 4 | ||||
-rw-r--r-- | gdb/infcmd.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 4 | ||||
-rw-r--r-- | gdb/sentinel-frame.c | 2 | ||||
-rw-r--r-- | gdb/stack.c | 2 | ||||
-rw-r--r-- | gdb/std-regs.c | 6 | ||||
-rw-r--r-- | gdb/trad-frame.c | 4 | ||||
-rw-r--r-- | gdb/trad-frame.h | 4 | ||||
-rw-r--r-- | gdb/tramp-frame.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 4 | ||||
-rw-r--r-- | gdb/valops.c | 6 |
19 files changed, 79 insertions, 49 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dcbb38c..b586518 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,32 @@ +2005-05-22 Andrew Cagney <cagney@gnu.org> + + * frame.h (frame_register_unwind, frame_unwind_register) + (get_frame_register, frame_register, put_frame_register) + (get_frame_memory, safe_frame_unwind_memory) + (frame_register_read): Use gdb_byte for byte buffer parameters. + * trad-frame.h (trad_frame_get_register) + (frame_get_prev_register): Ditto. + * frame-unwind.h (frame_prev_register_ftype): Ditto. + * frame.c (frame_pop, frame_register, frame_unwind_register) + (get_frame_register, frame_unwind_register_signed) + (frame_unwind_register_unsigned, frame_unwind_unsigned_register) + (frame_register_read, get_frame_memory): Update. + * trad-frame.c (trad_frame_get_prev_register): Update. + (trad_frame_get_register): Update. + * gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto. + * breakpoint.c (deprecated_read_memory_nobpt): Update. + * corefile.c (read_memory): Update. + * tramp-frame.c (tramp_frame_prev_register): Update. + * valops.c (value_assign): Update. + * sentinel-frame.c (sentinel_frame_prev_register): Update. + * std-regs.c (value_of_builtin_frame_fp_reg) + (value_of_builtin_frame_pc_reg): Update. + * infcmd.c (default_print_registers_info): Update + * dummy-frame.c (dummy_frame_prev_register): Update. + * findvar.c (value_of_register, value_from_register): Update. + * tui/tui-regs.c (tui_register_format, tui_get_register): Update. + * mi/mi-main.c (register_changed_p, get_register): Update. + 2005-05-20 Eli Zaretskii <eliz@gnu.org> * configure.ac: Add snprintf and vsnprintf to AC_CHECK_DECLS. Fix @@ -47,7 +76,6 @@ (regcache_raw_write_part, regcache_cooked_read_part) (regcache_cooked_write_part, read_register, regcache_raw_supply): ->>>>>>> 1.7166 2005-05-17 Corinna Vinschen <vinschen@redhat.com> * MAINTAINERS: Undelete v850. @@ -195,7 +223,6 @@ (_initialize_linux_nat, lin_thread_get_thread_signals): Use SA_RESTART. ->>>>>>> 1.7163 2005-05-14 Mark Kettenis <kettenis@gnu.org> * configure.tgt (vax-*-openbsd*): Set gdb_target to obsd. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 21f47ba..7e32943 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -638,7 +638,8 @@ commands_command (char *arg, int from_tty) shadow contents, not the breakpoints themselves. From breakpoint.c. */ int -deprecated_read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) +deprecated_read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, + unsigned len) { int status; struct bp_location *b; diff --git a/gdb/corefile.c b/gdb/corefile.c index 21a9139..591bb7e 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -233,7 +233,7 @@ memory_error (int status, CORE_ADDR memaddr) /* Same as target_read_memory, but report an error if can't read. */ void -read_memory (CORE_ADDR memaddr, char *myaddr, int len) +read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len) { int status; status = target_read_memory (memaddr, myaddr, len); diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index a1f2592..57dbb76 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -175,7 +175,7 @@ dummy_frame_prev_register (struct frame_info *next_frame, void **this_prologue_cache, int regnum, int *optimized, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realnum, void *bufferp) + int *realnum, gdb_byte *bufferp) { /* The dummy-frame sniffer always fills in the cache. */ struct dummy_frame_cache *cache = (*this_prologue_cache); diff --git a/gdb/findvar.c b/gdb/findvar.c index 181302c..fd6ca59c 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -262,7 +262,7 @@ value_of_register (int regnum, struct frame_info *frame) int optim; struct value *reg_val; int realnum; - char raw_buffer[MAX_REGISTER_SIZE]; + gdb_byte raw_buffer[MAX_REGISTER_SIZE]; enum lval_type lval; /* User registers lie completely outside of the range of normal @@ -662,7 +662,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) int len = TYPE_LENGTH (type); int value_bytes_copied; int optimized = 0; - char *value_bytes = (char *) alloca (len + MAX_REGISTER_SIZE); + gdb_byte *value_bytes = alloca (len + MAX_REGISTER_SIZE); /* Copy all of the data out, whereever it may be. */ for (local_regnum = regnum, value_bytes_copied = 0; diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index 74c0a4a..d51f8b0 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -116,7 +116,7 @@ typedef void (frame_prev_register_ftype) (struct frame_info *next_frame, int *optimized, enum lval_type * lvalp, CORE_ADDR *addrp, - int *realnump, void *valuep); + int *realnump, gdb_byte *valuep); /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); use the NEXT frame, and its register unwind method, to return the PREV diff --git a/gdb/frame.c b/gdb/frame.c index 91cded1..d692f33 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -539,7 +539,7 @@ frame_pop (struct frame_info *this_frame) void frame_register_unwind (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, - CORE_ADDR *addrp, int *realnump, void *bufferp) + CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp) { struct frame_unwind_cache *cache; @@ -601,7 +601,7 @@ frame_register_unwind (struct frame_info *frame, int regnum, void frame_register (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, - CORE_ADDR *addrp, int *realnump, void *bufferp) + CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp) { /* Require all but BUFFERP to be valid. A NULL BUFFERP indicates that the value proper does not need to be fetched. */ @@ -619,7 +619,7 @@ frame_register (struct frame_info *frame, int regnum, } void -frame_unwind_register (struct frame_info *frame, int regnum, void *buf) +frame_unwind_register (struct frame_info *frame, int regnum, gdb_byte *buf) { int optimized; CORE_ADDR addr; @@ -631,7 +631,7 @@ frame_unwind_register (struct frame_info *frame, int regnum, void *buf) void get_frame_register (struct frame_info *frame, - int regnum, void *buf) + int regnum, gdb_byte *buf) { frame_unwind_register (frame->next, regnum, buf); } @@ -639,7 +639,7 @@ get_frame_register (struct frame_info *frame, LONGEST frame_unwind_register_signed (struct frame_info *frame, int regnum) { - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; frame_unwind_register (frame, regnum, buf); return extract_signed_integer (buf, register_size (get_frame_arch (frame), regnum)); @@ -654,7 +654,7 @@ get_frame_register_signed (struct frame_info *frame, int regnum) ULONGEST frame_unwind_register_unsigned (struct frame_info *frame, int regnum) { - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; frame_unwind_register (frame, regnum, buf); return extract_unsigned_integer (buf, register_size (get_frame_arch (frame), regnum)); @@ -670,7 +670,7 @@ void frame_unwind_unsigned_register (struct frame_info *frame, int regnum, ULONGEST *val) { - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; frame_unwind_register (frame, regnum, buf); (*val) = extract_unsigned_integer (buf, register_size (get_frame_arch (frame), @@ -678,7 +678,8 @@ frame_unwind_unsigned_register (struct frame_info *frame, int regnum, } void -put_frame_register (struct frame_info *frame, int regnum, const void *buf) +put_frame_register (struct frame_info *frame, int regnum, + const gdb_byte *buf) { struct gdbarch *gdbarch = get_frame_arch (frame); int realnum; @@ -694,7 +695,7 @@ put_frame_register (struct frame_info *frame, int regnum, const void *buf) { /* FIXME: write_memory doesn't yet take constant buffers. Arrrg! */ - char tmp[MAX_REGISTER_SIZE]; + gdb_byte tmp[MAX_REGISTER_SIZE]; memcpy (tmp, buf, register_size (gdbarch, regnum)); write_memory (addr, tmp, register_size (gdbarch, regnum)); break; @@ -715,7 +716,8 @@ put_frame_register (struct frame_info *frame, int regnum, const void *buf) Returns 0 if the register value could not be found. */ int -frame_register_read (struct frame_info *frame, int regnum, void *myaddr) +frame_register_read (struct frame_info *frame, int regnum, + gdb_byte *myaddr) { int optimized; enum lval_type lval; @@ -1481,8 +1483,8 @@ deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base) /* Memory access methods. */ void -get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, void *buf, - int len) +get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, + gdb_byte *buf, int len) { read_memory (addr, buf, len); } @@ -1503,7 +1505,7 @@ get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr, int safe_frame_unwind_memory (struct frame_info *this_frame, - CORE_ADDR addr, void *buf, int len) + CORE_ADDR addr, gdb_byte *buf, int len) { /* NOTE: deprecated_read_memory_nobpt returns zero on success! */ return !deprecated_read_memory_nobpt (addr, buf, len); diff --git a/gdb/frame.h b/gdb/frame.h index d49192f..45eb058 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -395,7 +395,7 @@ extern enum frame_type get_frame_type (struct frame_info *); extern void frame_register_unwind (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, - void *valuep); + gdb_byte *valuep); /* Fetch a register from this, or unwind a register from the next frame. Note that the get_frame methods are wrappers to @@ -403,9 +403,9 @@ extern void frame_register_unwind (struct frame_info *frame, int regnum, fetch fails. */ extern void frame_unwind_register (struct frame_info *frame, - int regnum, void *buf); + int regnum, gdb_byte *buf); extern void get_frame_register (struct frame_info *frame, - int regnum, void *buf); + int regnum, gdb_byte *buf); extern LONGEST frame_unwind_register_signed (struct frame_info *frame, int regnum); @@ -429,13 +429,13 @@ extern void frame_unwind_unsigned_register (struct frame_info *frame, extern void frame_register (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, - void *valuep); + gdb_byte *valuep); /* The reverse. Store a register value relative to the specified frame. Note: this call makes the frame's state undefined. The register and frame caches must be flushed. */ extern void put_frame_register (struct frame_info *frame, int regnum, - const void *buf); + const gdb_byte *buf); /* Map between a frame register number and its name. A frame register space is a superset of the cooked register space --- it also @@ -471,7 +471,7 @@ extern void frame_pop (struct frame_info *frame); adaptor frames this should be ok. */ extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, - void *buf, int len); + gdb_byte *buf, int len); extern LONGEST get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR memaddr, int len); extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame, @@ -480,7 +480,7 @@ extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame, /* Same as above, but return non-zero when the entire memory read succeeds, zero otherwize. */ extern int safe_frame_unwind_memory (struct frame_info *this_frame, - CORE_ADDR addr, void *buf, int len); + CORE_ADDR addr, gdb_byte *buf, int len); /* Return this frame's architecture. */ @@ -586,7 +586,7 @@ extern int deprecated_pc_in_call_dummy (CORE_ADDR pc); isn't available (it could have been fetched from memory). */ extern int frame_register_read (struct frame_info *frame, int regnum, - void *buf); + gdb_byte *buf); /* From stack.c. */ extern void args_info (char *, int); diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h index 7b25e65..8e03990 100644 --- a/gdb/gdbcore.h +++ b/gdb/gdbcore.h @@ -49,7 +49,7 @@ extern int have_core_file_p (void); the get_frame_memory methods, code reading from an exec can use the target methods. */ -extern int deprecated_read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, +extern int deprecated_read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, unsigned len); /* Report a memory error with error(). */ @@ -58,7 +58,7 @@ extern void memory_error (int status, CORE_ADDR memaddr); /* Like target_read_memory, but report an error if can't read. */ -extern void read_memory (CORE_ADDR memaddr, char *myaddr, int len); +extern void read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len); /* Read an integer from debugged memory, given address and number of bytes. */ diff --git a/gdb/infcmd.c b/gdb/infcmd.c index b7ef75d..86e8d9d 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1524,7 +1524,7 @@ default_print_registers_info (struct gdbarch *gdbarch, { int i; const int numregs = NUM_REGS + NUM_PSEUDO_REGS; - char buffer[MAX_REGISTER_SIZE]; + gdb_byte buffer[MAX_REGISTER_SIZE]; for (i = 0; i < numregs; i++) { diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 036c19b..1fa79ce 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -386,7 +386,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc) static int register_changed_p (int regnum) { - char raw_buffer[MAX_REGISTER_SIZE]; + gdb_byte raw_buffer[MAX_REGISTER_SIZE]; if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer)) return -1; @@ -497,7 +497,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc) static int get_register (int regnum, int format) { - char buffer[MAX_REGISTER_SIZE]; + gdb_byte buffer[MAX_REGISTER_SIZE]; int optim; int realnum; CORE_ADDR addr; diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c index 136dad8..4fdd4c9 100644 --- a/gdb/sentinel-frame.c +++ b/gdb/sentinel-frame.c @@ -49,7 +49,7 @@ sentinel_frame_prev_register (struct frame_info *next_frame, void **this_prologue_cache, int regnum, int *optimized, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realnum, void *bufferp) + int *realnum, gdb_byte *bufferp) { struct frame_unwind_cache *cache = *this_prologue_cache; /* Describe the register's location. A reg-frame maps all registers diff --git a/gdb/stack.c b/gdb/stack.c index 14b1fcd..6bbfb82 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1069,7 +1069,7 @@ frame_info (char *addr_exp, int from_tty) &realnum, NULL); if (!optimized && lval == not_lval) { - char value[MAX_REGISTER_SIZE]; + gdb_byte value[MAX_REGISTER_SIZE]; CORE_ADDR sp; frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr, &realnum, value); diff --git a/gdb/std-regs.c b/gdb/std-regs.c index 5cb38b7..287f55e 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -56,7 +56,7 @@ static struct value * value_of_builtin_frame_reg (struct frame_info *frame) { struct value *val; - char *buf; + gdb_byte *buf; build_builtin_type_frame_reg (); val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; @@ -85,7 +85,7 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame) else { struct value *val = allocate_value (builtin_type_void_data_ptr); - char *buf = value_contents_raw (val); + gdb_byte *buf = value_contents_raw (val); if (frame == NULL) memset (buf, 0, TYPE_LENGTH (value_type (val))); else @@ -103,7 +103,7 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame) else { struct value *val = allocate_value (builtin_type_void_data_ptr); - char *buf = value_contents_raw (val); + gdb_byte *buf = value_contents_raw (val); if (frame == NULL) memset (buf, 0, TYPE_LENGTH (value_type (val))); else diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index 339ee34..ff2765c 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -135,7 +135,7 @@ trad_frame_get_prev_register (struct frame_info *next_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realregp, void *bufferp) + int *realregp, gdb_byte *bufferp) { struct gdbarch *gdbarch = get_frame_arch (next_frame); if (trad_frame_addr_p (this_saved_regs, regnum)) @@ -185,7 +185,7 @@ trad_frame_get_register (struct trad_frame_cache *this_trad_cache, struct frame_info *next_frame, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realregp, void *bufferp) + int *realregp, gdb_byte *bufferp) { trad_frame_get_prev_register (next_frame, this_trad_cache->prev_regs, regnum, optimizedp, lvalp, addrp, realregp, diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h index 713417b..348dc2e 100644 --- a/gdb/trad-frame.h +++ b/gdb/trad-frame.h @@ -56,7 +56,7 @@ void trad_frame_get_register (struct trad_frame_cache *this_trad_cache, struct frame_info *next_frame, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realregp, void *bufferp); + int *realregp, gdb_byte *bufferp); /* A traditional saved regs table, indexed by REGNUM, encoding where the value of REGNUM for the previous frame can be found in this @@ -117,6 +117,6 @@ void trad_frame_get_prev_register (struct frame_info *next_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, - int *realregp, void *bufferp); + int *realregp, gdb_byte *bufferp); #endif diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c index 8d808d3..693029b 100644 --- a/gdb/tramp-frame.c +++ b/gdb/tramp-frame.c @@ -76,7 +76,7 @@ tramp_frame_prev_register (struct frame_info *next_frame, int *optimizedp, enum lval_type * lvalp, CORE_ADDR *addrp, - int *realnump, void *valuep) + int *realnump, gdb_byte *valuep) { struct trad_frame_cache *trad_cache = tramp_frame_cache (next_frame, this_cache); diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index f105d05..3c18c83 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -669,7 +669,7 @@ tui_register_format (struct gdbarch *gdbarch, struct frame_info *frame, cleanups = make_cleanup (tui_restore_gdbout, (void*) old_stdout); if (TYPE_VECTOR (type) != 0 && 0) { - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; int len; len = register_size (current_gdbarch, regnum); @@ -709,7 +709,7 @@ tui_get_register (struct gdbarch *gdbarch, struct frame_info *frame, *changedp = FALSE; if (target_has_registers) { - char buf[MAX_REGISTER_SIZE]; + gdb_byte buf[MAX_REGISTER_SIZE]; get_frame_register (frame, regnum, buf); /* NOTE: cagney/2003-03-13: This is bogus. It is refering to diff --git a/gdb/valops.c b/gdb/valops.c index 37e9f01..57c8b78 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -569,7 +569,7 @@ value_assign (struct value *toval, struct value *fromval) const gdb_byte *dest_buffer; CORE_ADDR changed_addr; int changed_len; - char buffer[sizeof (LONGEST)]; + gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) { @@ -631,7 +631,7 @@ value_assign (struct value *toval, struct value *fromval) modify it, and copy it back in. */ int amount_copied; int amount_to_copy; - char *buffer; + gdb_byte *buffer; int reg_offset; int byte_offset; int regno; @@ -655,7 +655,7 @@ value_assign (struct value *toval, struct value *fromval) amount_to_copy = byte_offset + TYPE_LENGTH (type); /* And a bounce buffer. Be slightly over generous. */ - buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE); + buffer = alloca (amount_to_copy + MAX_REGISTER_SIZE); /* Copy it in. */ for (regno = reg_offset, amount_copied = 0; |