Files
BlitzNext/debugger/mainframe.hpp
T

67 lines
1.6 KiB
C++
Raw Normal View History

2014-01-31 08:23:00 +13:00
#ifndef MAINFRAME_H
#define MAINFRAME_H
2019-01-18 15:55:40 +01:00
#include "debugger.hpp"
#include "debugtree.hpp"
2019-01-18 17:04:34 +01:00
#include "sourcefile.hpp"
#include "tabber.hpp"
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
class MainFrame : public CFrameWnd, public Debugger {
Tabber tabber;
Tabber tabber2;
CToolBar toolBar;
SourceFile debug_log;
ConstsTree consts_tree;
GlobalsTree globals_tree;
LocalsTree locals_tree;
map<const char*, int> file_tabs;
map<const char*, SourceFile*> files;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
int state, step_level, cur_pos;
const char* cur_file;
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
bool shouldRun() const
{
return step_level < locals_tree.size();
}
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
public:
2014-01-31 08:23:00 +13:00
MainFrame();
~MainFrame();
void debugRun();
void debugStop();
2019-01-18 17:04:34 +01:00
void debugStmt(int srcpos, const char* file);
void debugEnter(void* frame, void* env, const char* func);
2014-01-31 08:23:00 +13:00
void debugLeave();
2019-01-18 17:04:34 +01:00
void debugLog(const char* msg);
void debugMsg(const char* msg, bool serious);
void debugSys(void* msg);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
void showCurStmt();
void setState(int n);
void setRuntime(void* mod, void* env);
SourceFile* sourceFile(const char* file);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
DECLARE_DYNAMIC(MainFrame)
2014-01-31 08:23:00 +13:00
DECLARE_MESSAGE_MAP()
2019-01-18 17:04:34 +01:00
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT type, int w, int h);
2014-01-31 08:23:00 +13:00
afx_msg void OnClose();
afx_msg void cmdStop();
afx_msg void cmdRun();
afx_msg void cmdStepOver();
afx_msg void cmdStepInto();
afx_msg void cmdStepOut();
afx_msg void cmdEnd();
2019-01-18 17:04:34 +01:00
afx_msg void updateCmdUI(CCmdUI* ui);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:34 +01:00
afx_msg void OnWindowPosChanging(WINDOWPOS* pos);
2014-01-31 08:23:00 +13:00
};
#endif