2020-03-24 10:52:35 +00:00
|
|
|
#ifndef __qwaq_debug_h
|
|
|
|
#define __qwaq_debug_h
|
|
|
|
|
|
|
|
#include "event.h"
|
|
|
|
|
2020-03-24 11:15:35 +00:00
|
|
|
typedef enum {
|
2020-03-24 10:52:35 +00:00
|
|
|
qe_debug_event = 0x0100,
|
|
|
|
} qwaq_debug_messages;
|
|
|
|
|
|
|
|
#ifdef __QFCC__
|
|
|
|
|
|
|
|
//FIXME add unsigned to qfcc
|
|
|
|
#ifndef unsigned
|
|
|
|
#define unsigned int
|
|
|
|
#define umax 0x7fffffff
|
|
|
|
#endif
|
|
|
|
|
2020-03-24 16:07:58 +00:00
|
|
|
typedef string string_t;
|
|
|
|
|
2020-03-24 10:52:35 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct qdb_state_s {
|
|
|
|
unsigned staddr;
|
|
|
|
unsigned func;
|
2020-03-24 16:07:58 +00:00
|
|
|
string_t file;
|
2020-03-24 10:52:35 +00:00
|
|
|
unsigned line;
|
|
|
|
} qdb_state_t;
|
|
|
|
|
2020-03-24 16:07:58 +00:00
|
|
|
#ifdef __QFCC__
|
|
|
|
|
|
|
|
typedef struct qdb_target_s { int handle; } qdb_target_t;
|
|
|
|
|
|
|
|
@extern void qdb_set_trace (qdb_target_t target, int state);
|
|
|
|
@extern int qdb_set_breakpoint (qdb_target_t target, unsigned staddr);
|
|
|
|
@extern int qdb_clear_breakpoint (qdb_target_t target, unsigned staddr);
|
|
|
|
@extern int qdb_set_watchpoint (qdb_target_t target, unsigned offset);
|
|
|
|
@extern int qdb_clear_watchpoint (qdb_target_t target);
|
|
|
|
@extern int qdb_continue (qdb_target_t target);
|
|
|
|
@extern qdb_state_t qdb_get_state (qdb_target_t target);
|
|
|
|
|
|
|
|
#else//GCC
|
|
|
|
|
2020-03-24 10:52:35 +00:00
|
|
|
void QWAQ_Debug_Init (progs_t *pr);
|
|
|
|
void QWAQ_DebugTarget_Init (progs_t *pr);
|
|
|
|
|
2020-03-24 16:07:58 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-24 10:52:35 +00:00
|
|
|
#endif//__qwaq_debug_h
|