Date: Thu, 5 Nov 2009 06:31:50 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198944 - head/sys/arm/arm Message-ID: <200911050631.nA56VocI065092@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Thu Nov 5 06:31:50 2009 New Revision: 198944 URL: http://svn.freebsd.org/changeset/base/198944 Log: Fix gdb_cpu_getreg() to actually match GDB's register definition. Modified: head/sys/arm/arm/gdb_machdep.c Modified: head/sys/arm/arm/gdb_machdep.c ============================================================================== --- head/sys/arm/arm/gdb_machdep.c Thu Nov 5 06:27:46 2009 (r198943) +++ head/sys/arm/arm/gdb_machdep.c Thu Nov 5 06:31:50 2009 (r198944) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911050631.nA56VocI065092>