Commit d7b6967af41493e2072a0c73016a61fc8e5b8bc5
1 parent
b2cd75b0
CRIS: Handle GDB writes to pregs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5461 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
2 deletions
gdbstub.c
... | ... | @@ -977,11 +977,15 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) |
977 | 977 | env->regs[n] = tmp; |
978 | 978 | } |
979 | 979 | |
980 | - /* FIXME: Should other regs be writable? */ | |
980 | + if (n >= 21 && n < 32) { | |
981 | + env->pregs[n - 16] = tmp; | |
982 | + } | |
983 | + | |
984 | + /* FIXME: Should support function regs be writable? */ | |
981 | 985 | switch (n) { |
982 | 986 | case 16: return 1; |
983 | 987 | case 17: return 1; |
984 | - case 18: return 4; | |
988 | + case 18: env->pregs[PR_PID] = tmp; break; | |
985 | 989 | case 19: return 1; |
986 | 990 | case 20: return 2; |
987 | 991 | case 32: env->pc = tmp; break; | ... | ... |