svn commit: r235908 - head/sys/arm/arm

Grzegorz Bernacki gber at FreeBSD.org
Thu May 24 12:41:57 UTC 2012


Author: gber
Date: Thu May 24 12:41:57 2012
New Revision: 235908
URL: http://svn.freebsd.org/changeset/base/235908

Log:
  Return Supervisor SP and LR registers instead of User ones while in KDB thread.
  
  Obtained from: Semihalf

Modified:
  head/sys/arm/arm/gdb_machdep.c

Modified: head/sys/arm/arm/gdb_machdep.c
==============================================================================
--- head/sys/arm/arm/gdb_machdep.c	Thu May 24 12:38:24 2012	(r235907)
+++ head/sys/arm/arm/gdb_machdep.c	Thu May 24 12:41:57 2012	(r235908)
@@ -54,8 +54,12 @@ gdb_cpu_getreg(int regnum, size_t *regsz
 	*regsz = gdb_cpu_regsz(regnum);
 
 	if (kdb_thread == curthread) {
-		if (regnum < 15)
+		if (regnum < 13)
 			return (&kdb_frame->tf_r0 + regnum);
+		if (regnum == 13)
+			return (&kdb_frame->tf_svc_sp);
+		if (regnum == 14)
+			return (&kdb_frame->tf_svc_lr);
 		if (regnum == 15)
 			return (&kdb_frame->tf_pc);
 		if (regnum == 25)


More information about the svn-src-head mailing list