Fix source debugging issues (#776)

- fix data race issue between debug control thread and main thread
- fix possible memory leaks in breakpoints list
- fix memory uninitialized issues
- remove unused data structures
- add more checks when handling packet and args
- fix mini-loader issues
- fix config_common.cmake fast interp prompt issue
This commit is contained in:
Xu Jun
2021-10-09 15:56:58 +08:00
committed by GitHub
parent 52b6c73d9c
commit 0be1f687af
8 changed files with 205 additions and 97 deletions

View File

@ -15,24 +15,20 @@ typedef enum WASMDebugControlThreadStatus {
STOPPED,
} WASMDebugControlThreadStatus;
struct WASMDebugObject;
struct WASMDebugEngine;
struct WASMDebugInstance;
typedef struct WASMDebugControlThread {
WASMGDBServer *server;
korp_tid tid;
korp_mutex wait_lock;
korp_cond wait_cond;
char ip_addr[128];
int port;
WASMDebugControlThreadStatus status;
struct WASMDebugObject *debug_engine;
struct WASMDebugObject *debug_instance;
struct WASMDebugEngine *debug_engine;
struct WASMDebugInstance *debug_instance;
} WASMDebugControlThread;
typedef struct WASMDebugObject {
struct WASMDebugObject *next;
WASMDebugControlThread *control_thread;
} WASMDebugObject;
typedef struct WASMDebugBreakPoint {
struct WASMDebugBreakPoint *next;
uint64 addr;