try catch 不处理动态内存,拆分riscv_rest
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
#define exception_h__
|
||||
|
||||
#include "setjmp.h"
|
||||
#include "mystdlib.h"
|
||||
#include "stdlib.h"
|
||||
// #include "mystdlib.h"
|
||||
|
||||
#define THROW_LOG__MAX_SIZE 1024
|
||||
|
||||
@@ -12,7 +13,7 @@
|
||||
typedef struct _jmp_fram{
|
||||
struct _jmp_fram *next;
|
||||
struct _jmp_fram *last;
|
||||
map_def *mem;
|
||||
// map_def *mem;
|
||||
jmp_buf fram;
|
||||
}jmp_fram;
|
||||
|
||||
@@ -41,9 +42,9 @@ typedef struct{
|
||||
#define jmp_last(j) {\
|
||||
if((*j)){\
|
||||
jmp_fram *l=(*j)->last;\
|
||||
if(l){\
|
||||
/*if(l){\
|
||||
__mem_mov(&(l)->mem,&(*j)->mem);\
|
||||
}\
|
||||
}*/\
|
||||
free(*j);\
|
||||
(*j)=l;\
|
||||
if(*j){\
|
||||
@@ -56,7 +57,7 @@ typedef struct{
|
||||
#define jmp_clear(j) {\
|
||||
if((*j)){\
|
||||
jmp_fram *l=(*j)->last;\
|
||||
__mem_clear(&(*j)->mem);\
|
||||
/*__mem_clear(&(*j)->mem);*/\
|
||||
free(*j);\
|
||||
(*j)=l;\
|
||||
if(*j){\
|
||||
|
Reference in New Issue
Block a user