aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-11 19:32:21 +0000
committeredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-11 19:32:21 +0000
commitd7b6967af41493e2072a0c73016a61fc8e5b8bc5 (patch)
tree73387597afdc5ef2cce5af55e7c439ad73c2fa40
parentb2cd75b00349ad0cc7eb47209d2a2b7b1d4b0bfc (diff)
CRIS: Handle GDB writes to pregs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5461 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--gdbstub.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 0ff632509d..15a0af2cae 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -977,11 +977,15 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n)
env->regs[n] = tmp;
}
- /* FIXME: Should other regs be writable? */
+ if (n >= 21 && n < 32) {
+ env->pregs[n - 16] = tmp;
+ }
+
+ /* FIXME: Should support function regs be writable? */
switch (n) {
case 16: return 1;
case 17: return 1;
- case 18: return 4;
+ case 18: env->pregs[PR_PID] = tmp; break;
case 19: return 1;
case 20: return 2;
case 32: env->pc = tmp; break;