Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-09 Thread Michael Zimmermann
> In any case, unless you have any information that suggests that GCC in > Thumb2 mode can be coerced into managing the frame pointer in a way > that allows us to do something similar in EDK2, I am going to stick > with my assertion that this is not currently possible on ARM. I think it's not

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-09 Thread Andrew Fish
> On Sep 7, 2016, at 1:21 AM, Ard Biesheuvel wrote: > > When dumping the CPU state after an unhandled fault, walk the stack > frames and decode the return addresses so we can show a minimal > backtrace. Unfortunately, we do not have sufficient information to > show

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-09 Thread Ard Biesheuvel
On 7 September 2016 at 12:32, Ard Biesheuvel wrote: > On 7 September 2016 at 12:25, Michael Zimmermann > wrote: >>> However, looking at this >>> code, this is still not sufficient to find the *next* frame pointer on >>> the stack. >> are you

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-07 Thread Ard Biesheuvel
On 7 September 2016 at 12:25, Michael Zimmermann wrote: >> However, looking at this >> code, this is still not sufficient to find the *next* frame pointer on >> the stack. > are you sure about that? this code looks like it does just that: >

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-07 Thread Michael Zimmermann
> However, looking at this > code, this is still not sufficient to find the *next* frame pointer on > the stack. are you sure about that? this code looks like it does just that: https://github.com/torvalds/linux/blob/master/arch/arm/kernel/stacktrace.c On Wed, Sep 7, 2016 at 1:03 PM, Ard

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-07 Thread Ard Biesheuvel
On 7 September 2016 at 10:48, Michael Zimmermann wrote: > nice, can we do this for ARM too? I usually need to add DEBUG((...))'s all > over the place for hours until I found the reason for a fault. > This is going to be tricky. Unlike AARCH64, which unambiguously

Re: [edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-07 Thread Michael Zimmermann
nice, can we do this for ARM too? I usually need to add DEBUG((...))'s all over the place for hours until I found the reason for a fault. Thanks Michael On Wed, Sep 7, 2016 at 10:21 AM, Ard Biesheuvel wrote: > When dumping the CPU state after an unhandled fault, walk

[edk2] [PATCH 2/2] ArmPkg/DefaultExceptionHandlerLib AARCH64: add minimal backtrace to crash dump

2016-09-07 Thread Ard Biesheuvel
When dumping the CPU state after an unhandled fault, walk the stack frames and decode the return addresses so we can show a minimal backtrace. Unfortunately, we do not have sufficient information to show the function names, but at least we can see the modules and the return addresses inside the