From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 11 Nov 2020 16:11:05 -0700 Subject: [PATCH 1/3] sandbox: add handler for exceptions In-Reply-To: References: <20201110230940.6522-1-xypron.glpk@gmx.de> <20201110230940.6522-2-xypron.glpk@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heinrich, On Wed, 11 Nov 2020 at 13:47, Heinrich Schuchardt wrote: > > On 11.11.20 15:32, Simon Glass wrote: > > Hi Heinrich, > > > > On Tue, 10 Nov 2020 at 16:09, Heinrich Schuchardt 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 > >> --- > >> 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. I'm not sure what you mean here, but what I am saying is that by default sandbox should crash. We don't really want the caller to have to kill it if a test fails, etc. Regards, Simon