forked from n00b87/RCBasic-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrc_debugger_dialog.h
executable file
·86 lines (68 loc) · 1.89 KB
/
rc_debugger_dialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __rc_debugger_dialog__
#define __rc_debugger_dialog__
/**
@file
Subclass of rc_debugger, which is generated by wxFormBuilder.
*/
#include "rcbasic_edit.h"
#include <wx/process.h>
#include <vector>
#include <stdint.h>
//// end generated include
#define RC_DBG_VAR_TYPE_NUM 0
#define RC_DBG_VAR_TYPE_STR 1
#define RC_DBG_ACCESS_GET 0
#define RC_DBG_ACCESS_SET 1
#define RC_DBG_STATUS_GOOD 0
#define RC_DBG_STATUS_ERROR 1
struct dbg_var
{
wxString name;
wxString scope;
int data_type;
int access_type;
int status;
int dimensions;
uint64_t dim[3];
wxString var_value;
uint64_t index;
};
/** Implementing rc_debugger */
class rc_debugger_dialog : public rc_debugger
{
protected:
// Handlers for rc_debugger events.
void onPause( wxCommandEvent& event );
void onStep( wxCommandEvent& event );
void onRun( wxCommandEvent& event );
void onSuper( wxCommandEvent& event );
void onEnd( wxCommandEvent& event );
void onClose( wxCommandEvent& event );
void onDebugUpdate( wxUpdateUIEvent& event );
void onDebugProcessTerminate( wxProcessEvent& event );
public:
/** Constructor */
rc_debugger_dialog( wxWindow* parent, wxFileName dbg_cbc, wxFileName dbg_runtime );
void loadDebugData(wxString sym_file, wxString inc_file);
void updateDebugData();
void updateDebugUI();
void term_process();
wxProcess* rc_debug_process;
long rc_debug_pid = -1;
bool step = false;
bool auto_run = false;
bool super_run = false;
bool ends_on_error = false;
wxString error_msg;
bool is_running = false;
std::vector<wxString> src_files;
std::vector<dbg_var> dbg_vars;
std::vector<dbg_var> used_vars;
uint64_t current_line = 0;
wxString current_src_file = _("");
wxColour msg_bkg_color[2];
wxString cwd;
wxFileName dbg_rt;
//// end generated class members
};
#endif // __rc_debugger_dialog__