2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

artiq_personality: port to device.

This commit is contained in:
whitequark 2015-08-02 06:34:11 +03:00
parent aae2923c4c
commit 6db93b34e8
2 changed files with 11 additions and 1 deletions

View File

@ -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) {

View File

@ -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) \