libdragon
exception_internal.h
1#ifndef __LIBDRAGON_EXCEPTION_INTERNAL_H
2#define __LIBDRAGON_EXCEPTION_INTERNAL_H
3
4#include <stdio.h>
5#include <stdbool.h>
6#include <stdarg.h>
7#include "exception.h"
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13extern const char *__mips_gpr[34];
14extern const char *__mips_fpreg[32];
15
16void __exception_dump_header(FILE *out, exception_t* ex);
17void __exception_dump_gpr(exception_t* ex, void (*cb)(void *arg, const char *regname, char* value), void *arg);
18void __exception_dump_fpr(exception_t* ex, void (*cb)(void *arg, const char *regname, char* hexvalue, char *singlevalue, char *doublevalue), void *arg);
19
20__attribute__((noreturn))
21void __inspector_exception(exception_t* ex);
22
23__attribute__((noreturn))
24void __inspector_assertion(const char *failedexpr, const char *msg, va_list args);
25
26__attribute__((noreturn))
27void __inspector_cppexception(const char *exctype, const char *what);
28
29#ifdef __cplusplus
30}
31#endif
32
33#endif
Exception Handler.
void __exception_dump_gpr(exception_t *ex, void(*cb)(void *arg, const char *regname, char *value), void *arg)
Helper to dump the GPRs of an exception.
Definition: exception.c:152
void __exception_dump_header(FILE *out, exception_t *ex)
Dump a brief recap of the exception.
Definition: exception.c:98
void __exception_dump_fpr(exception_t *ex, void(*cb)(void *arg, const char *regname, char *hexvalue, char *singlevalue, char *doublevalue), void *arg)
Helper to dump the FPRs of an exception.
Definition: exception.c:175
Structure representing an exception.
Definition: exception.h:94