2014-02-24 16:13:06 +01:00
|
|
|
/*
|
2015-05-09 18:12:18 +02:00
|
|
|
* Copyright (C) 2014, 2015 Freie Universitaet Berlin (FUB) and INRIA
|
2014-02-24 16:13:06 +01:00
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-02-24 16:13:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-06-01 12:17:51 +02:00
|
|
|
* @ingroup cpu_native
|
2014-02-24 16:13:06 +01:00
|
|
|
* @{
|
|
|
|
*
|
2015-05-09 18:12:18 +02:00
|
|
|
* @file
|
2014-02-24 16:13:06 +01:00
|
|
|
* @brief Crash handling functions implementation for 'native' port
|
|
|
|
*
|
2015-09-27 18:58:30 +02:00
|
|
|
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2014-02-24 16:13:06 +01:00
|
|
|
* @author Kévin Roussel <Kevin.Roussel@inria.fr>
|
2015-05-09 18:12:18 +02:00
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
2014-02-24 16:13:06 +01:00
|
|
|
*/
|
|
|
|
|
2024-02-22 16:06:32 +01:00
|
|
|
#include <errno.h>
|
2014-02-24 16:13:06 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <signal.h>
|
|
|
|
|
2014-05-16 17:24:45 +02:00
|
|
|
#include "native_internal.h"
|
2014-02-24 16:13:06 +01:00
|
|
|
|
2015-05-09 18:12:18 +02:00
|
|
|
void panic_arch(void)
|
2014-02-24 16:13:06 +01:00
|
|
|
{
|
2024-02-22 16:06:32 +01:00
|
|
|
extern unsigned _native_retval;
|
|
|
|
_native_retval = EINVAL;
|
|
|
|
|
2015-09-12 12:43:15 +02:00
|
|
|
#ifdef DEVELHELP
|
2014-02-24 16:13:06 +01:00
|
|
|
/* since we're atop an Unix-like platform,
|
|
|
|
just use the (developer-)friendly core-dump feature */
|
2014-05-13 16:53:36 +02:00
|
|
|
kill(_native_pid, SIGTRAP);
|
2014-02-26 16:48:44 +01:00
|
|
|
#endif
|
2014-02-24 16:13:06 +01:00
|
|
|
}
|