2005-05-08 Mark Kettenis <kettenis@gnu.org>
+ * amd64-tdep.c (amd64_return_value): Use `gdb_byte *' in casts.
+ (amd64_push_arguments): Use gdb_byte instead of bfd_byte. Use
+ gdb_byte for buf.
+ (amd64_push_dummy_call): Use gdb_byte for buf.
+ (amd64_analyze_prologue): Use gdb_byte for proto, buf and op.
+ (amd64_frame_cache, amd64_sigtramp_frame_cache)
+ (amd64_unwind_dummy_id): Use gdb_byte for buf.
+ (amd64_supply_fxsave, amd64_collect_fxsave): Use `gdb_byte *' for
+ regs.
+ * amd64obsd-tdep.c (amd64obsd_supply_regset): Use `gdb_byte *' in
+ casts.
+ (amd64obsd_sigtramp_p): Use gdb_byte for sigreturn and `gdb_byte
+ *' for buf,
+
* i386-tdep.c (i386_breakpoint_from_pc): Change return type to
`const gdb_byte *'. Use gdb_byte for break_insn.
(i386_follow_jump): Use gdb_byte for op.
if (readbuf)
regcache_raw_read_part (regcache, regnum, offset, min (len, 8),
- (char *) readbuf + i * 8);
+ ((gdb_byte *)readbuf) + i * 8);
if (writebuf)
regcache_raw_write_part (regcache, regnum, offset, min (len, 8),
- (const char *) writebuf + i * 8);
+ ((const gdb_byte *)writebuf) + i * 8);
}
return RETURN_VALUE_REGISTER_CONVENTION;
else
{
/* The argument will be passed in registers. */
- const bfd_byte *valbuf = value_contents (args[i]);
- char buf[8];
+ const gdb_byte *valbuf = value_contents (args[i]);
+ gdb_byte buf[8];
gdb_assert (len <= 16);
for (i = 0; i < num_stack_args; i++)
{
struct type *type = value_type (stack_args[i]);
- const bfd_byte *valbuf = value_contents (stack_args[i]);
+ const gdb_byte *valbuf = value_contents (stack_args[i]);
int len = TYPE_LENGTH (type);
write_memory (sp + element * 8, valbuf, len);
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- char buf[8];
+ gdb_byte buf[8];
/* Pass arguments. */
sp = amd64_push_arguments (regcache, nargs, args, sp, struct_return);
amd64_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
struct amd64_frame_cache *cache)
{
- static unsigned char proto[3] = { 0x48, 0x89, 0xe5 };
- unsigned char buf[3];
- unsigned char op;
+ static gdb_byte proto[3] = { 0x48, 0x89, 0xe5 }; /* movq %rsp, %rbp */
+ gdb_byte buf[3];
+ gdb_byte op;
if (current_pc <= pc)
return current_pc;
amd64_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct amd64_frame_cache *cache;
- char buf[8];
+ gdb_byte buf[8];
int i;
if (*this_cache)
struct amd64_frame_cache *cache;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
CORE_ADDR addr;
- char buf[8];
+ gdb_byte buf[8];
int i;
if (*this_cache)
static struct frame_id
amd64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR fp;
frame_unwind_register (next_frame, AMD64_RBP_REGNUM, buf);
if (fxsave && gdbarch_ptr_bit (get_regcache_arch (regcache)) == 64)
{
- const char *regs = fxsave;
+ const gdb_byte *regs = fxsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM)
regcache_raw_supply (regcache, I387_FISEG_REGNUM, regs + 12);
amd64_collect_fxsave (const struct regcache *regcache, int regnum,
void *fxsave)
{
- char *regs = fxsave;
+ gdb_byte *regs = fxsave;
i387_collect_fxsave (regcache, regnum, fxsave);
/* Target-dependent code for OpenBSD/amd64.
- Copyright 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE);
i386_supply_gregset (regset, regcache, regnum, regs, tdep->sizeof_gregset);
- amd64_supply_fxsave (regcache, regnum, (char *)regs + tdep->sizeof_gregset);
+ amd64_supply_fxsave (regcache, regnum,
+ ((const gdb_byte *)regs) + tdep->sizeof_gregset);
}
static const struct regset *
{
CORE_ADDR pc = frame_pc_unwind (next_frame);
CORE_ADDR start_pc = (pc & ~(amd64obsd_page_size - 1));
- const char sigreturn[] =
+ const gdb_byte sigreturn[] =
{
0x48, 0xc7, 0xc0,
0x67, 0x00, 0x00, 0x00, /* movq $SYS_sigreturn, %rax */
0xcd, 0x80 /* int $0x80 */
};
size_t buflen = (sizeof sigreturn) + 1;
- char *name, *buf;
+ gdb_byte *buf;
+ char *name;
/* If the function has a valid symbol name, it isn't a
trampoline. */