From owner-svn-src-head@FreeBSD.ORG Thu Jun 27 22:26:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D9D5A641; Thu, 27 Jun 2013 22:26:56 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CC22D12CD; Thu, 27 Jun 2013 22:26:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5RMQuKi002528; Thu, 27 Jun 2013 22:26:56 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5RMQu4d002527; Thu, 27 Jun 2013 22:26:56 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201306272226.r5RMQu4d002527@svn.freebsd.org> From: Andrew Turner Date: Thu, 27 Jun 2013 22:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252320 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2013 22:26:56 -0000 Author: andrew Date: Thu Jun 27 22:26:56 2013 New Revision: 252320 URL: http://svnweb.freebsd.org/changeset/base/252320 Log: Support reading registers r0-r3 when unwinding. There is a seperate instruction to load these. We only hit it when unwinding past an trap frame as in C r0-r3 would never have been saved onto the stack. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Thu Jun 27 21:34:29 2013 (r252319) +++ head/sys/arm/arm/db_trace.c Thu Jun 27 22:26:56 2013 (r252320) @@ -108,6 +108,7 @@ extern int extab_start, extab_end, exidx #define INSN_VSP_REG 0x90 #define INSN_POP_COUNT 0xa0 #define INSN_FINISH 0xb0 +#define INSN_POP_REGS 0xb1 #define INSN_VSP_LARGE_INC 0xb2 /* An item in the exception index table */ @@ -268,6 +269,24 @@ db_unwind_exec_insn(struct unwind_state /* Stop processing */ state->entries = 0; + } else if ((insn == INSN_POP_REGS)) { + unsigned int mask, reg; + + mask = db_unwind_exec_read_byte(state); + if (mask == 0 || (mask & 0xf0) != 0) + return 1; + + /* Update SP */ + update_vsp = 1; + + /* Load the registers */ + for (reg = 0; mask && reg < 4; mask >>= 1, reg++) { + if (mask & 1) { + state->registers[reg] = *vsp++; + state->update_mask |= 1 << reg; + } + } + } else if ((insn & INSN_VSP_LARGE_INC_MASK) == INSN_VSP_LARGE_INC) { unsigned int uleb128;