This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] gdb_byte fallouts for CRIS
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 27 May 2005 15:51:40 +0200
- Subject: [commit] gdb_byte fallouts for CRIS
Committed the following.
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.
--
Orjan Friberg
Axis Communications
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.130
diff -u -p -r1.130 cris-tdep.c
--- cris-tdep.c 23 May 2005 10:43:18 -0000 1.130
+++ cris-tdep.c 27 May 2005 13:42:16 -0000
@@ -219,14 +219,14 @@ static CORE_ADDR
cris_sigtramp_start (struct frame_info *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))
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;
pc -= SIGTRAMP_OFFSET1;
@@ -247,14 +247,14 @@ static CORE_ADDR
cris_rt_sigtramp_start (struct frame_info *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))
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;
pc -= SIGTRAMP_OFFSET1;
@@ -435,13 +435,13 @@ static void cris_frame_prev_register (st
void **this_prologue_cache,
int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *bufferp);
+ int *realnump, gdb_byte *bufferp);
static void
cris_sigtramp_frame_prev_register (struct frame_info *next_frame,
void **this_cache,
int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *valuep)
+ int *realnump, gdb_byte *valuep)
{
/* Make sure we've initialized the cache. */
cris_sigtramp_frame_unwind_cache (next_frame, this_cache);
@@ -834,7 +834,7 @@ cris_frame_prev_register (struct frame_i
void **this_prologue_cache,
int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *bufferp)
+ int *realnump, gdb_byte *bufferp)
{
struct cris_unwind_cache *info
= cris_frame_unwind_cache (next_frame, this_prologue_cache);
@@ -989,7 +989,8 @@ cris_push_dummy_call (struct gdbarch *gd
return sp;
}
-static const struct frame_unwind cris_frame_unwind = {
+static const struct frame_unwind cris_frame_unwind =
+{
NORMAL_FRAME,
cris_frame_this_id,
cris_frame_prev_register
@@ -1009,7 +1010,8 @@ cris_frame_base_address (struct frame_in
return info->base;
}
-static const struct frame_base cris_frame_base = {
+static const struct frame_base cris_frame_base =
+{
&cris_frame_unwind,
cris_frame_base_address,
cris_frame_base_address,
@@ -1848,8 +1850,8 @@ cris_extract_return_value (struct type *
static enum return_value_convention
cris_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)
{
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION