forked from M-Labs/artiq
artiq_personality: port to device.
This commit is contained in:
parent
aae2923c4c
commit
6db93b34e8
|
@ -8,8 +8,14 @@
|
|||
/* Logging */
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if defined(__or1k__)
|
||||
#include "log.h"
|
||||
#define EH_LOG0(fmt) log("%s: " fmt, __func__)
|
||||
#define EH_LOG(fmt, ...) log("%s: " fmt, __func__, __VA_ARGS__)
|
||||
#else
|
||||
#define EH_LOG0(fmt) fprintf(stderr, "%s: " fmt "\n", __func__)
|
||||
#define EH_LOG(fmt, ...) fprintf(stderr, "%s: " fmt "\n", __func__, __VA_ARGS__)
|
||||
#endif
|
||||
#else
|
||||
#define EH_LOG0(fmt)
|
||||
#define EH_LOG(fmt, ...)
|
||||
|
@ -312,6 +318,9 @@ static _Unwind_Reason_Code __artiq_uncaught_exception(
|
|||
}
|
||||
}
|
||||
|
||||
_Unwind_Reason_Code __artiq_personality(
|
||||
int version, _Unwind_Action actions, uint64_t exceptionClass,
|
||||
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context);
|
||||
_Unwind_Reason_Code __artiq_personality(
|
||||
int version, _Unwind_Action actions, uint64_t exceptionClass,
|
||||
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __ARTIQ_PERSONALITY_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct artiq_exception {
|
||||
union {
|
||||
|
@ -27,7 +28,7 @@ extern "C" {
|
|||
/* Provided by the runtime */
|
||||
void __artiq_raise(struct artiq_exception *artiq_exn)
|
||||
__attribute__((noreturn));
|
||||
void __artiq_reraise()
|
||||
void __artiq_reraise(void)
|
||||
__attribute__((noreturn));
|
||||
|
||||
#define artiq_raise_from_c(exnname, exnmsg, exnparam0, exnparam1, exnparam2) \
|
||||
|
|
Loading…
Reference in New Issue