+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
(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.
(_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.
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;
/* 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);
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);
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
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;
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
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;
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. */
}
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;
void
get_frame_register (struct frame_info *frame,
- int regnum, void *buf)
+ int regnum, gdb_byte *buf)
{
frame_unwind_register (frame->next, regnum, buf);
}
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));
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));
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),
}
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;
{
/* 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;
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;
/* 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);
}
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);
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
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);
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
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,
/* 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. */
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);
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(). */
/* 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. */
{
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++)
{
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;
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;
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
&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);
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;
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
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
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))
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,
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
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
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);
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);
*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
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))
{
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;
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;