public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* AArch64 CommonCExceptionHandler() and EFI_SYSTEM_CONTEXT
@ 2022-02-16  0:27 Andrew Fish
  0 siblings, 0 replies; only message in thread
From: Andrew Fish @ 2022-02-16  0:27 UTC (permalink / raw)
  To: edk2-devel-groups-io

So I’m 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. 

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’m 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/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c#L186
[2] https://github.com/tianocore/edk2/blob/master/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c#L296

Thanks,

Andrew Fish


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-16  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-16  0:27 AArch64 CommonCExceptionHandler() and EFI_SYSTEM_CONTEXT Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox