2005-05-27 Orjan Friberg <orjanf@axis.com>

* cris-tdep.c (cris_sigtramp_start, cris_rt_sigtramp_start)
	(cris_frame_prev_register, cris_sigtramp_frame_prev_register)
	(cris_return_value): Use gdb_byte for byte buffers.
	(struct cris_frame_unwind, struct cris_frame_base): Fix formatting.
This commit is contained in:
Orjan Friberg 2005-05-27 13:47:59 +00:00
parent adbaf9485a
commit e2a2a3e8b6
2 changed files with 22 additions and 13 deletions

View file

@ -1,3 +1,10 @@
2005-05-27 Orjan Friberg <orjanf@axis.com>
* cris-tdep.c (cris_sigtramp_start, cris_rt_sigtramp_start)
(cris_frame_prev_register, cris_sigtramp_frame_prev_register)
(cris_return_value): Use gdb_byte for byte buffers.
(struct cris_frame_unwind, struct cris_frame_base): Fix formatting.
2005-05-26 Chris Demetriou <cgd@netbsd.org> 2005-05-26 Chris Demetriou <cgd@netbsd.org>
* MAINTAINERS (Write After Approval): Remove myself. * MAINTAINERS (Write After Approval): Remove myself.

View file

@ -219,14 +219,14 @@ static CORE_ADDR
cris_sigtramp_start (struct frame_info *next_frame) cris_sigtramp_start (struct frame_info *next_frame)
{ {
CORE_ADDR pc = frame_pc_unwind (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned short buf[SIGTRAMP_LEN]; gdb_byte buf[SIGTRAMP_LEN];
if (!safe_frame_unwind_memory (next_frame, pc, buf, SIGTRAMP_LEN)) if (!safe_frame_unwind_memory (next_frame, pc, buf, SIGTRAMP_LEN))
return 0; return 0;
if (buf[0] != SIGTRAMP_INSN0) if (((buf[1] << 8) + buf[0]) != SIGTRAMP_INSN0)
{ {
if (buf[0] != SIGTRAMP_INSN1) if (((buf[1] << 8) + buf[0]) != SIGTRAMP_INSN1)
return 0; return 0;
pc -= SIGTRAMP_OFFSET1; pc -= SIGTRAMP_OFFSET1;
@ -247,14 +247,14 @@ static CORE_ADDR
cris_rt_sigtramp_start (struct frame_info *next_frame) cris_rt_sigtramp_start (struct frame_info *next_frame)
{ {
CORE_ADDR pc = frame_pc_unwind (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned short buf[SIGTRAMP_LEN]; gdb_byte buf[SIGTRAMP_LEN];
if (!safe_frame_unwind_memory (next_frame, pc, buf, SIGTRAMP_LEN)) if (!safe_frame_unwind_memory (next_frame, pc, buf, SIGTRAMP_LEN))
return 0; return 0;
if (buf[0] != SIGTRAMP_INSN0) if (((buf[1] << 8) + buf[0]) != SIGTRAMP_INSN0)
{ {
if (buf[0] != SIGTRAMP_INSN1) if (((buf[1] << 8) + buf[0]) != SIGTRAMP_INSN1)
return 0; return 0;
pc -= SIGTRAMP_OFFSET1; pc -= SIGTRAMP_OFFSET1;
@ -435,13 +435,13 @@ static void cris_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache, void **this_prologue_cache,
int regnum, int *optimizedp, int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp, enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, void *bufferp); int *realnump, gdb_byte *bufferp);
static void static void
cris_sigtramp_frame_prev_register (struct frame_info *next_frame, cris_sigtramp_frame_prev_register (struct frame_info *next_frame,
void **this_cache, void **this_cache,
int regnum, int *optimizedp, int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp, enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, void *valuep) int *realnump, gdb_byte *valuep)
{ {
/* Make sure we've initialized the cache. */ /* Make sure we've initialized the cache. */
cris_sigtramp_frame_unwind_cache (next_frame, this_cache); cris_sigtramp_frame_unwind_cache (next_frame, this_cache);
@ -834,7 +834,7 @@ cris_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache, void **this_prologue_cache,
int regnum, int *optimizedp, int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp, enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, void *bufferp) int *realnump, gdb_byte *bufferp)
{ {
struct cris_unwind_cache *info struct cris_unwind_cache *info
= cris_frame_unwind_cache (next_frame, this_prologue_cache); = cris_frame_unwind_cache (next_frame, this_prologue_cache);
@ -989,7 +989,8 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
return sp; return sp;
} }
static const struct frame_unwind cris_frame_unwind = { static const struct frame_unwind cris_frame_unwind =
{
NORMAL_FRAME, NORMAL_FRAME,
cris_frame_this_id, cris_frame_this_id,
cris_frame_prev_register cris_frame_prev_register
@ -1009,7 +1010,8 @@ cris_frame_base_address (struct frame_info *next_frame, void **this_cache)
return info->base; return info->base;
} }
static const struct frame_base cris_frame_base = { static const struct frame_base cris_frame_base =
{
&cris_frame_unwind, &cris_frame_unwind,
cris_frame_base_address, cris_frame_base_address,
cris_frame_base_address, cris_frame_base_address,
@ -1848,8 +1850,8 @@ cris_extract_return_value (struct type *type, struct regcache *regcache,
static enum return_value_convention static enum return_value_convention
cris_return_value (struct gdbarch *gdbarch, struct type *type, cris_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, void *readbuf, struct regcache *regcache, gdb_byte *readbuf,
const void *writebuf) const gdb_byte *writebuf)
{ {
if (TYPE_CODE (type) == TYPE_CODE_STRUCT if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION || TYPE_CODE (type) == TYPE_CODE_UNION