diff options
author | marcel <marcel@FreeBSD.org> | 2009-11-05 06:31:50 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-11-05 06:31:50 +0000 |
commit | 0dcaac6ff472c5df03e0d0ad92fbd67cff5a9b52 (patch) | |
tree | 31a76d9df4b478f18a8559ae289ddcbab660352b /sys | |
parent | 6c4039b0183b54edca5da8b42257c5849493212f (diff) | |
download | FreeBSD-src-0dcaac6ff472c5df03e0d0ad92fbd67cff5a9b52.zip FreeBSD-src-0dcaac6ff472c5df03e0d0ad92fbd67cff5a9b52.tar.gz |
Fix gdb_cpu_getreg() to actually match GDB's register
definition.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/arm/gdb_machdep.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arm/arm/gdb_machdep.c b/sys/arm/arm/gdb_machdep.c index a6fa767..eefb046 100644 --- a/sys/arm/arm/gdb_machdep.c +++ b/sys/arm/arm/gdb_machdep.c @@ -53,12 +53,15 @@ gdb_cpu_getreg(int regnum, size_t *regsz) *regsz = gdb_cpu_regsz(regnum); - if (kdb_thread == curthread) { - if (regnum < 16) - return (&kdb_frame->tf_r0 + 4 * regnum); + if (kdb_thread == curthread) { + if (regnum < 15) + return (&kdb_frame->tf_r0 + regnum); + if (regnum == 15) + return (&kdb_frame->tf_pc); if (regnum == 25) return (&kdb_frame->tf_spsr); } + switch (regnum) { case 8: return (&kdb_thrctx->un_32.pcb32_r8); case 9: return (&kdb_thrctx->un_32.pcb32_r9); @@ -78,6 +81,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz) return (&kdb_thrctx->un_32.pcb32_pc); } } + return (NULL); } |