From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:38:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1FDE816; Sun, 21 Dec 2014 21:38:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D07932FA; Sun, 21 Dec 2014 21:38:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLcDqL078600; Sun, 21 Dec 2014 21:38:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLcD9g078599; Sun, 21 Dec 2014 21:38:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412212138.sBLLcD9g078599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 21:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276033 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:38:13 -0000 Author: andrew Date: Sun Dec 21 21:38:12 2014 New Revision: 276033 URL: https://svnweb.freebsd.org/changeset/base/276033 Log: Fix the unwinder to get past functions with no stack but may cause an exception. In this case no registers will be updated but the link register will be copied to the program counter to be used to find the calling function. In this case the program counter may be updated and we should continue with the trace. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sun Dec 21 21:27:12 2014 (r276032) +++ head/sys/arm/arm/db_trace.c Sun Dec 21 21:38:12 2014 (r276033) @@ -345,9 +345,16 @@ db_unwind_tab(struct unwind_state *state /* * The program counter was not updated, load it from the link register. */ - if (state->registers[PC] == 0) + if (state->registers[PC] == 0) { state->registers[PC] = state->registers[LR]; + /* + * If the program counter changed, flag it in the update mask. + */ + if (state->start_pc != state->registers[PC]) + state->update_mask |= 1 << PC; + } + return 0; }