svn commit: r209935 - head/sys/mips/mips

Jayachandran C. jchandra at FreeBSD.org
Mon Jul 12 10:22:59 UTC 2010


Author: jchandra
Date: Mon Jul 12 10:22:58 2010
New Revision: 209935
URL: http://svn.freebsd.org/changeset/base/209935

Log:
  Merge jmallett@'s n64 work into HEAD
  
  Initial set of ddb changes to support n64
  
  Reviewed by:	imp
  Obtained from:	jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)

Modified:
  head/sys/mips/mips/db_interface.c
  head/sys/mips/mips/db_trace.c

Modified: head/sys/mips/mips/db_interface.c
==============================================================================
--- head/sys/mips/mips/db_interface.c	Mon Jul 12 10:18:10 2010	(r209934)
+++ head/sys/mips/mips/db_interface.c	Mon Jul 12 10:22:58 2010	(r209935)
@@ -115,12 +115,12 @@ int (*do_db_log_stack_trace_cmd)(char *)
 static int
 db_frame(struct db_variable *vp, db_expr_t *valuep, int op)
 {
-	int *reg;
+	register_t *reg;
 
 	if (kdb_frame == NULL)
 		return (0);
 
-	reg = (int *)((uintptr_t)kdb_frame + (db_expr_t)vp->valuep);
+	reg = (register_t *)((uintptr_t)kdb_frame + (size_t)(intptr_t)vp->valuep);
 	if (op == DB_VAR_GET)
 		*valuep = *reg;
 	else

Modified: head/sys/mips/mips/db_trace.c
==============================================================================
--- head/sys/mips/mips/db_trace.c	Mon Jul 12 10:18:10 2010	(r209934)
+++ head/sys/mips/mips/db_trace.c	Mon Jul 12 10:22:58 2010	(r209935)
@@ -140,7 +140,7 @@ loop:
 	}
 	/* check for bad SP: could foul up next frame */
 	/*XXX MIPS64 bad: this hard-coded SP is lame */
-	if (sp & 3 || sp < 0x80000000) {
+	if (sp & 3 || (uintptr_t)sp < 0x80000000u) {
 		(*printfn) ("SP 0x%x: not in kernel\n", sp);
 		ra = 0;
 		subr = 0;
@@ -377,7 +377,7 @@ db_md_set_watchpoint(db_expr_t addr, db_
 
 
 int
-db_md_clr_watchpoint( db_expr_t addr, db_expr_t size)
+db_md_clr_watchpoint(db_expr_t addr, db_expr_t size)
 {
 
 	return(0);
@@ -403,8 +403,8 @@ db_trace_thread(struct thread *thr, int 
 	struct pcb *ctx;
 
 	if (thr == curthread) {
-		sp = (register_t)__builtin_frame_address(0);
-		ra = (register_t)__builtin_return_address(0);
+		sp = (register_t)(intptr_t)__builtin_frame_address(0);
+		ra = (register_t)(intptr_t)__builtin_return_address(0);
 
         	__asm __volatile(
 			"jal 99f\n"


More information about the svn-src-head mailing list