From patchwork Wed Mar 23 15:55:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 759 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:32 -0000 Delivered-To: patches@linaro.org Received: by 10.220.180.8 with SMTP id bs8cs11688vcb; Wed, 23 Mar 2011 08:55:14 -0700 (PDT) Received: by 10.14.122.133 with SMTP id t5mr2523167eeh.184.1300895711835; Wed, 23 Mar 2011 08:55:11 -0700 (PDT) Received: from mtagate3.uk.ibm.com (mtagate3.uk.ibm.com [194.196.100.163]) by mx.google.com with ESMTPS id v17si12045219eeh.70.2011.03.23.08.55.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 08:55:11 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.163; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.163 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2NFtAhM018547 for ; Wed, 23 Mar 2011 15:55:11 GMT Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2NFtcZc1532072 for ; Wed, 23 Mar 2011 15:55:38 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2NFtA8n022550 for ; Wed, 23 Mar 2011 09:55:10 -0600 Received: from localhost.localdomain (dyn-9-152-224-51.boeblingen.de.ibm.com [9.152.224.51]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p2NFt7U0022296; Wed, 23 Mar 2011 09:55:10 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Subject: [PATCH 7/8] ARM: Return the dwarf.cfa in case the user requests SP/R13. Date: Wed, 23 Mar 2011 15:55:05 +0000 Message-Id: <1300895706-5424-8-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300895706-5424-1-git-send-email-ken.werner@linaro.org> References: <1300895706-5424-1-git-send-email-ken.werner@linaro.org> Usually we don't have a valid location for the SP but we keep calculating the value of the CFA. The ARM backend should return this value instead. Signed-off-by: Ken Werner --- src/arm/Gregs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/arm/Gregs.c b/src/arm/Gregs.c index 1546f58..03693a2 100644 --- a/src/arm/Gregs.c +++ b/src/arm/Gregs.c @@ -45,12 +45,12 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, case UNW_ARM_R10: case UNW_ARM_R11: case UNW_ARM_R12: - case UNW_ARM_R13: case UNW_ARM_R14: case UNW_ARM_R15: loc = c->dwarf.loc[reg - UNW_ARM_R0]; break; + case UNW_ARM_R13: case UNW_ARM_CFA: if (write) return -UNW_EREADONLYREG;