Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2011 19:48:04 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228091 - head/sys/mips/mips
Message-ID:  <201111281948.pASJm4tc006149@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Mon Nov 28 19:48:04 2011
New Revision: 228091
URL: http://svn.freebsd.org/changeset/base/228091

Log:
  - Fix backtrace for MIPS64 platform

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

Modified: head/sys/mips/mips/db_trace.c
==============================================================================
--- head/sys/mips/mips/db_trace.c	Mon Nov 28 19:45:47 2011	(r228090)
+++ head/sys/mips/mips/db_trace.c	Mon Nov 28 19:48:04 2011	(r228091)
@@ -30,7 +30,7 @@ extern char edata[];
 
 /*
  * A function using a stack frame has the following instruction as the first
- * one: addiu sp,sp,-<frame_size>
+ * one: [d]addiu sp,sp,-<frame_size>
  *
  * We make use of this to detect starting address of a function. This works
  * better than using 'j ra' instruction to signify end of the previous
@@ -39,7 +39,8 @@ extern char edata[];
  *
  * XXX the abi does not require that the addiu instruction be the first one.
  */
-#define	MIPS_START_OF_FUNCTION(ins)	(((ins) & 0xffff8000) == 0x27bd8000)
+#define	MIPS_START_OF_FUNCTION(ins)	((((ins) & 0xffff8000) == 0x27bd8000) \
+	|| (((ins) & 0xffff8000) == 0x67bd8000))
 
 /*
  * MIPS ABI 3.0 requires that all functions return using the 'j ra' instruction
@@ -329,6 +330,8 @@ loop:
 
 		case OP_ADDI:
 		case OP_ADDIU:
+		case OP_DADDI:
+		case OP_DADDIU:
 			/* look for stack pointer adjustment */
 			if (i.IType.rs != 29 || i.IType.rt != 29)
 				break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111281948.pASJm4tc006149>