debugtree.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef DEBUGTREE_H
  2. #define DEBUGTREE_H
  3. #include "../linker/linker.h"
  4. #include "../compiler/environ.h"
  5. class DebugTree : public CTreeCtrl{
  6. int st_nest;
  7. protected:
  8. HTREEITEM insertVar( void *var,Decl *d,const string &name,HTREEITEM it,HTREEITEM parent );
  9. public:
  10. DebugTree();
  11. ~DebugTree();
  12. DECLARE_DYNAMIC( DebugTree )
  13. DECLARE_MESSAGE_MAP()
  14. afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
  15. };
  16. class ConstsTree : public DebugTree{
  17. public:
  18. ConstsTree();
  19. void reset( Environ *env );
  20. };
  21. class GlobalsTree : public DebugTree{
  22. Module *module;
  23. Environ *envron;
  24. public:
  25. GlobalsTree();
  26. void reset( Module *mod,Environ *env );
  27. void refresh();
  28. };
  29. class LocalsTree : public DebugTree{
  30. Module *module;
  31. Environ *envron;
  32. struct Frame{
  33. void *frame;
  34. Environ *env;
  35. const char *func;
  36. HTREEITEM item;
  37. Frame( void *f,Environ *e,const char *fn ):frame(f),env(e),func(fn),item(0){}
  38. };
  39. vector<Frame> frames;
  40. void refreshFrame( const Frame &f );
  41. public:
  42. LocalsTree();
  43. void reset( Environ *env );
  44. void refresh();
  45. void pushFrame( void *frame,void *env,const char *func );
  46. void popFrame();
  47. int size()const{ return frames.size(); }
  48. };
  49. #endif