[PATCH 1/3] sandbox: add handler for exceptions

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Nov 11 21:47:31 CET 2020


On 11.11.20 15:32, Simon Glass wrote:
> Hi Heinrich,
>
> On Tue, 10 Nov 2020 at 16:09, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>
>> Add a handler for SIGILL, SIGBUS, SIGSEGV.
>>
>> When an exception occurs print the program counter and the loaded
>> UEFI binaries and reset the system.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>>  arch/sandbox/cpu/os.c         | 31 +++++++++++++++++++++++++++++++
>>  arch/sandbox/cpu/start.c      |  4 ++++
>>  arch/sandbox/lib/interrupts.c | 30 ++++++++++++++++++++++++++++++
>>  include/os.h                  | 17 +++++++++++++++++
>>  4 files changed, 82 insertions(+)
>
> Generally we want to stop execution, because it indicates a bug. Then
> we might want to run it again with gdb to debug it.
>
> So I think this feature should be enabled by a flag.
>
> Regards,
> Simon
>

I understand that if I call os_launch should be customizable.

Providing the output should be helpful in any case.

Best regards

Heinrich




More information about the U-Boot mailing list