From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) by mx.groups.io with SMTP id smtpd.web09.5549.1644971272616785925 for ; Tue, 15 Feb 2022 16:27:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=Xmf2lW98; spf=pass (domain: apple.com, ip: 17.171.2.60, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 21G0OVhB052764 for ; Tue, 15 Feb 2022 16:27:51 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : content-transfer-encoding : mime-version : subject : message-id : date : to; s=20180706; bh=J9b6s03woL5gbcQ/wV84Hyjef0GSx721QFAIcI9/L10=; b=Xmf2lW987ssDlo/2pszn8/9etUm1RQARUtsvDQd3j8V54rRB9tgpJSlg/v1axXGnx7iH lXg4P0Q3nKFmkVdcYc3vGI6eZmZs9syHJbk1FhrX/HHigfzs7D3rQ3ApyocVoRDP3Xa0 cB5ajJ3YODbL+SUUqr1MaN0iIdi67vuTL6T9131pkn5CsXl6xsRYw3cwGfva5x1Xv0Dm c8mCLiRG0dAeUlTWeWsWdRyFesuQHSUcOubE0HNKVV/3W53dIEWsxD88c8+tH/014MCg FZiU+UF4TWMoLSz7wCNbvaKKOW+DGWA99hSDTw7UYaLZoR93O1xR0kZuUG4auheiO0+z Hw== Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 3e8n5nh6nu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 15 Feb 2022 16:27:51 -0800 Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPS id <0R7D00BY8FYECZ10@rn-mailsvcp-mta-lapp04.rno.apple.com> for devel@edk2.groups.io; Tue, 15 Feb 2022 16:27:50 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R7D00900FMQP500@rn-mailsvcp-mmp-lapp04.rno.apple.com> for devel@edk2.groups.io; Tue, 15 Feb 2022 16:27:50 -0800 (PST) X-Va-A: X-Va-T-CD: 5975dd1eaec8696b379f33739df9e0a8 X-Va-E-CD: ff3064b16f134557d8607e28f8a82644 X-Va-R-CD: 227cbe1d4fa726162bcdc0d40ed31f1f X-Va-CD: 0 X-Va-ID: 2c9ad6da-379f-4a58-a7b5-00a78d6584ee X-V-A: X-V-T-CD: 5975dd1eaec8696b379f33739df9e0a8 X-V-E-CD: ff3064b16f134557d8607e28f8a82644 X-V-R-CD: 227cbe1d4fa726162bcdc0d40ed31f1f X-V-CD: 0 X-V-ID: c2cc9ef9-3908-469c-ba4a-6f95cee963c6 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-02-15_07:2022-02-14,2022-02-15 signatures=0 Received: from smtpclient.apple (unknown [17.235.31.29]) by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R7D00R38FYDUU00@rn-mailsvcp-mmp-lapp04.rno.apple.com> for devel@edk2.groups.io; Tue, 15 Feb 2022 16:27:50 -0800 (PST) From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: AArch64 CommonCExceptionHandler() and EFI_SYSTEM_CONTEXT Message-id: <5083EA7B-AC77-4085-BE5D-38EA6FF891CB@apple.com> Date: Tue, 15 Feb 2022 16:27:49 -0800 To: edk2-devel-groups-io X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-02-15_07:2022-02-14,2022-02-15 signatures=0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable So I=E2=80=99m messing about in a DefaultExceptionHandler() (like [1]) = that is called from CommonCExceptionHandler() [2]. What I notice is the = faulting address is special cased. So the stack walking code has to dump = the fault address and then walk the stack to get a stack trace of the = fault. That kind of makes sense, but then when I connect with a debugger = the stack trace I get is missing the faulting frame from the debugger.=20= My question is there something architectural that makes the debugger not = work from this location? Does the exception code need to do some magic = on the stack so a stack walk back would include the faulting are frame? = I=E2=80=99m not 100% sure about AArch64. I seem to remember we messed = with the X64 stack so the frame from the exception handler looked valid = and included the faulting code. [1] = https://github.com/tianocore/edk2/blob/master/ArmPkg/Library/DefaultExcept= ionHandlerLib/AArch64/DefaultExceptionHandler.c#L186 [2] = https://github.com/tianocore/edk2/blob/master/ArmPkg/Library/ArmExceptionL= ib/ArmExceptionLib.c#L296 Thanks, Andrew Fish