2005-05-14 Mark Kettenis <kettenis@gnu.org>
+ * m68k-tdep.c (m68k_local_breakpoint_from_pc): Change return type
+ to `const gdb_byte *'. Use gdb_byte for break_insn.
+ (m68k_register_to_value): Change type of last argument to
+ `gdb_byte *'. Use gdb_byte for from.
+ (m68k_value_to_register): Change type of last argument to
+ `gdb_byte *'. Use gdb_byte for to.
+ (m68k_extract_return_value): Change type of last argument to
+ `gdb_byte *'. Use gdb_byte for buf. Remove unnecessary cast.
+ (m68k_svr4_extract_return_value): Change type of last argument to
+ `gdb_byte *'. Use gdb_byte for buf.
+ (m68k_store_return_value): Change type of last argument to
+ `gdb_byte *'. Remove unnecessary cast.
+ (m68k_svr4_store_return_value): Change type of last argument to
+ `gdb_byte *'. Use gdb_byte for buf.
+ (m68k_return_value, m68k_svr4_return_value): Change type of
+ readbuf and writebuf arguments to `gdb_byte *'.
+ (m68k_push_dummy_call, m68k_unwind_pc, m68k_frame_cache)
+ (m68k_unwind_dummy_id): Use gdb_byte for buf.
+ (m68k_get_longjmp_target): Use `gdb_byte *' for buf.
+ * m68kbsd-tdep.c (m68kbsd_supply_fpregset)
+ (m68kbsd_supply_gregset): Use `gdb_byte *' for regs.
+
* m88k-tdep.c (m88k_breakpoint_from_pc): Change return type to
`const gdb_byte *'. Use gdb_byte for break_insn.
(m88k_return_value): Change type of readbuf and
#define BPT_VECTOR 0xf
#endif
-static const unsigned char *
+static const gdb_byte *
m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
- static unsigned char break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
+ static gdb_byte break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
*lenptr = sizeof (break_insn);
return break_insn;
}
static void
m68k_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to)
+ struct type *type, gdb_byte *to)
{
- char from[M68K_MAX_REGISTER_SIZE];
+ gdb_byte from[M68K_MAX_REGISTER_SIZE];
/* We only support floating-point values. */
if (TYPE_CODE (type) != TYPE_CODE_FLT)
static void
m68k_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from)
+ struct type *type, const gdb_byte *from)
{
- char to[M68K_MAX_REGISTER_SIZE];
+ gdb_byte to[M68K_MAX_REGISTER_SIZE];
/* We only support floating-point values. */
if (TYPE_CODE (type) != TYPE_CODE_FLT)
static void
m68k_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
+ gdb_byte *valbuf)
{
int len = TYPE_LENGTH (type);
- char buf[M68K_MAX_REGISTER_SIZE];
+ gdb_byte buf[M68K_MAX_REGISTER_SIZE];
if (len <= 4)
{
{
regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
memcpy (valbuf, buf + (8 - len), len - 4);
- regcache_raw_read (regcache, M68K_D1_REGNUM,
- (char *) valbuf + (len - 4));
+ regcache_raw_read (regcache, M68K_D1_REGNUM, valbuf + (len - 4));
}
else
internal_error (__FILE__, __LINE__,
static void
m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
+ gdb_byte *valbuf)
{
int len = TYPE_LENGTH (type);
- char buf[M68K_MAX_REGISTER_SIZE];
+ gdb_byte buf[M68K_MAX_REGISTER_SIZE];
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
static void
m68k_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+ const gdb_byte *valbuf)
{
int len = TYPE_LENGTH (type);
{
regcache_raw_write_part (regcache, M68K_D0_REGNUM, 8 - len,
len - 4, valbuf);
- regcache_raw_write (regcache, M68K_D1_REGNUM,
- (char *) valbuf + (len - 4));
+ regcache_raw_write (regcache, M68K_D1_REGNUM, valbuf + (len - 4));
}
else
internal_error (__FILE__, __LINE__,
static void
m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+ const gdb_byte *valbuf)
{
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- char buf[M68K_MAX_REGISTER_SIZE];
+ gdb_byte buf[M68K_MAX_REGISTER_SIZE];
convert_typed_floating (valbuf, type, buf, builtin_type_m68881_ext);
regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
}
static enum return_value_convention
m68k_return_value (struct gdbarch *gdbarch, struct type *type,
- struct regcache *regcache, void *readbuf,
- const void *writebuf)
+ struct regcache *regcache, gdb_byte *readbuf,
+ const gdb_byte *writebuf)
{
enum type_code code = TYPE_CODE (type);
static enum return_value_convention
m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type,
- struct regcache *regcache, void *readbuf,
- const void *writebuf)
+ struct regcache *regcache, gdb_byte *readbuf,
+ const gdb_byte *writebuf)
{
enum type_code code = TYPE_CODE (type);
CORE_ADDR struct_addr)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
int i;
/* Push arguments in reverse order. */
static CORE_ADDR
m68k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- char buf[8];
+ gdb_byte buf[8];
frame_unwind_register (next_frame, PC_REGNUM, buf);
return extract_typed_address (buf, builtin_type_void_func_ptr);
m68k_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct m68k_frame_cache *cache;
- char buf[4];
+ gdb_byte buf[4];
int i;
if (*this_cache)
static struct frame_id
m68k_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- char buf[4];
+ gdb_byte buf[4];
CORE_ADDR fp;
frame_unwind_register (next_frame, M68K_FP_REGNUM, buf);
static int
m68k_get_longjmp_target (CORE_ADDR *pc)
{
- char *buf;
+ gdb_byte *buf;
CORE_ADDR sp, jb_addr;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);