aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2012-09-04 23:54:41 +0000
committerHans-Peter Nilsson <hp@axis.com>2012-09-04 23:54:41 +0000
commit07c04788ea2cbdee96b8843e812684f69ca5d0bd (patch)
tree019fa84d4c7aa143c3e5001e09c9829974d299f5 /gdb
parent87c8644f8bcb28ee5fc5752382063b0d15f4b29e (diff)
downloadfsf-binutils-gdb-07c04788ea2cbdee96b8843e812684f69ca5d0bd.zip
fsf-binutils-gdb-07c04788ea2cbdee96b8843e812684f69ca5d0bd.tar.gz
fsf-binutils-gdb-07c04788ea2cbdee96b8843e812684f69ca5d0bd.tar.bz2
* linux-crisv32-low.c: Fix compile errors.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/linux-crisv32-low.c23
2 files changed, 15 insertions, 12 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index fb89abb..672a87d 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-05 Michael Brandt <michael.brandt@axis.com>
+
+ * linux-crisv32-low.c: Fix compile errors.
+
2012-09-04 Yao Qi <yao@codesourcery.com>
* tracepoint.c (cmd_qtsv): Adjust debug message.
diff --git a/gdb/gdbserver/linux-crisv32-low.c b/gdb/gdbserver/linux-crisv32-low.c
index 1cc4cd1..d0e2f56 100644
--- a/gdb/gdbserver/linux-crisv32-low.c
+++ b/gdb/gdbserver/linux-crisv32-low.c
@@ -231,6 +231,7 @@ cris_remove_point (char type, CORE_ADDR addr, int len)
unsigned long bp_ctrl;
unsigned long start, end;
struct regcache *regcache;
+ unsigned long bp_d_regs[12];
/* Breakpoint/watchpoint types:
0 = memory breakpoint for instructions
@@ -259,8 +260,6 @@ cris_remove_point (char type, CORE_ADDR addr, int len)
single switch (addr) as there may be several watchpoints with
the same start address for example. */
- unsigned long bp_d_regs[12];
-
/* Get all range registers to simplify search. */
collect_register_by_name (regcache, "s3", &bp_d_regs[0]);
collect_register_by_name (regcache, "s4", &bp_d_regs[1]);
@@ -321,8 +320,9 @@ static int
cris_stopped_by_watchpoint (void)
{
unsigned long exs;
+ struct regcache *regcache = get_thread_regcache (current_inferior, 1);
- collect_register_by_name ("exs", &exs);
+ collect_register_by_name (regcache, "exs", &exs);
return (((exs & 0xff00) >> 8) == 0xc);
}
@@ -331,47 +331,46 @@ static CORE_ADDR
cris_stopped_data_address (void)
{
unsigned long eda;
+ struct regcache *regcache = get_thread_regcache (current_inferior, 1);
- collect_register_by_name ("eda", &eda);
+ collect_register_by_name (regcache, "eda", &eda);
/* FIXME: Possibly adjust to match watched range. */
return eda;
}
static void
-cris_fill_gregset (void *buf)
+cris_fill_gregset (struct regcache *regcache, void *buf)
{
int i;
for (i = 0; i < cris_num_regs; i++)
{
if (cris_regmap[i] != -1)
- collect_register (i, ((char *) buf) + cris_regmap[i]);
+ collect_register (regcache, i, ((char *) buf) + cris_regmap[i]);
}
}
static void
-cris_store_gregset (const void *buf)
+cris_store_gregset (struct regcache *regcache, const void *buf)
{
int i;
for (i = 0; i < cris_num_regs; i++)
{
if (cris_regmap[i] != -1)
- supply_register (i, ((char *) buf) + cris_regmap[i]);
+ supply_register (regcache, i, ((char *) buf) + cris_regmap[i]);
}
}
-typedef unsigned long elf_gregset_t[cris_num_regs];
-
struct regset_info target_regsets[] = {
- { PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t),
+ { PTRACE_GETREGS, PTRACE_SETREGS, 0, cris_num_regs * 4,
GENERAL_REGS, cris_fill_gregset, cris_store_gregset },
{ 0, 0, 0, -1, -1, NULL, NULL }
};
struct linux_target_ops the_low_target = {
- init_register_crisv32,
+ init_registers_crisv32,
-1,
NULL,
NULL,