2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
#ifndef DEBUGTREE_H
|
|
|
|
|
#define DEBUGTREE_H
|
|
|
|
|
|
2019-01-18 15:55:40 +01:00
|
|
|
#include "environ.hpp"
|
2019-01-18 17:04:34 +01:00
|
|
|
#include "linker.hpp"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
class DebugTree : public CTreeCtrl {
|
2014-01-31 08:23:00 +13:00
|
|
|
int st_nest;
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
protected:
|
|
|
|
|
HTREEITEM insertVar(void* var, Decl* d, const string& name, HTREEITEM it, HTREEITEM parent);
|
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
|
|
|
DebugTree();
|
|
|
|
|
~DebugTree();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
DECLARE_DYNAMIC(DebugTree)
|
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);
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
class ConstsTree : public DebugTree {
|
|
|
|
|
public:
|
2014-01-31 08:23:00 +13:00
|
|
|
ConstsTree();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
void reset(Environ* env);
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
class GlobalsTree : public DebugTree {
|
|
|
|
|
Module* module;
|
|
|
|
|
Environ* envron;
|
|
|
|
|
|
|
|
|
|
public:
|
2014-01-31 08:23:00 +13:00
|
|
|
GlobalsTree();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
void reset(Module* mod, Environ* env);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
void refresh();
|
|
|
|
|
};
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
class LocalsTree : public DebugTree {
|
|
|
|
|
Module* module;
|
|
|
|
|
Environ* envron;
|
|
|
|
|
struct Frame {
|
|
|
|
|
void* frame;
|
|
|
|
|
Environ* env;
|
|
|
|
|
const char* func;
|
|
|
|
|
HTREEITEM item;
|
|
|
|
|
Frame(void* f, Environ* e, const char* fn) : frame(f), env(e), func(fn), item(0) {}
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|
|
|
|
|
vector<Frame> frames;
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
void refreshFrame(const Frame& f);
|
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
|
|
|
LocalsTree();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
void reset(Environ* env);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
void refresh();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
void pushFrame(void* frame, void* env, const char* func);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
void popFrame();
|
|
|
|
|
|
2019-01-18 17:04:34 +01:00
|
|
|
int size() const
|
|
|
|
|
{
|
|
|
|
|
return frames.size();
|
|
|
|
|
}
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|