PERFORCE change 66056 for review

Peter Wemm peter at FreeBSD.org
Mon Nov 29 12:59:11 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=66056

Change 66056 by peter at peter_daintree on 2004/11/29 20:58:09

	finish off gdb_machdep.c based on my understanding to date.
	We can only get the scratch registers from the trapframe since
	we do not save them in the pcb at context switch.
	Note to self: the register numbers are defined in gdb/amd64-tdep.c

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/gdb_machdep.c#5 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/gdb_machdep.c#5 (text+ko) ====

@@ -54,39 +54,28 @@
 	if (kdb_thread  == curthread) {
 		switch (regnum) {
 		case 0:	return (&kdb_frame->tf_rax);
-		case 1:	return (&kdb_frame->tf_rcx);
-		case 2:	return (&kdb_frame->tf_rdx);
+		case 2:	return (&kdb_frame->tf_rcx);
+		case 3:	return (&kdb_frame->tf_rdx);
+		case 4:	return (&kdb_frame->tf_rsi);
+		case 5:	return (&kdb_frame->tf_rdi);
+		case 8: return (&kdb_frame->tf_r8);
+		case 9: return (&kdb_frame->tf_r9);
+		case 10: return (&kdb_frame->tf_r10);
+		case 11: return (&kdb_frame->tf_r11);
+		case 18: return (&kdb_frame->tf_cs);
+		case 19: return (&kdb_frame->tf_ss);
 		}
 	}
 	switch (regnum) {
-#if 0
-	case 0:  return (&kdb_thrctx->pcb_rax);
-#endif
 	case 1:  return (&kdb_thrctx->pcb_rbx);
-#if 0
-	case 2:  return (&kdb_thrctx->pcb_rcx);
-	case 3:  return (&kdb_thrctx->pcb_rdx);
-	case 4:  return (&kdb_thrctx->pcb_rsi);
-	case 5:  return (&kdb_thrctx->pcb_rdi);
-#endif
 	case 6:  return (&kdb_thrctx->pcb_rbp);
 	case 7:  return (&kdb_thrctx->pcb_rsp);
-#if 0
-	case 8:  return (&kdb_thrctx->pcb_r8);
-	case 9:  return (&kdb_thrctx->pcb_r9);
-	case 10: return (&kdb_thrctx->pcb_r10);
-	case 11: return (&kdb_thrctx->pcb_r11);
-#endif
 	case 12: return (&kdb_thrctx->pcb_r12);
 	case 13: return (&kdb_thrctx->pcb_r13);
 	case 14: return (&kdb_thrctx->pcb_r14);
 	case 15: return (&kdb_thrctx->pcb_r15);
 	case 16: return (&kdb_thrctx->pcb_rip);
 	case 17: return (&kdb_thrctx->pcb_rflags);
-#if 0
-	case 18: return (&kdb_thrctx->pcb_cs);
-	case 19: return (&kdb_thrctx->pcb_ss);
-#endif
 	}
 	return (NULL);
 }


More information about the p4-projects mailing list