vcpudebug.h 846 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef __VCPUDEBUG_H
  2. #define __VCPUDEBUG_H
  3. #include <bfc/ptrlist.h>
  4. #include <bfc/stack.h>
  5. #include <bfc/reentryfilter.h>
  6. class MakiJITD;
  7. class VCPUDebugger {
  8. public:
  9. VCPUDebugger();
  10. virtual ~VCPUDebugger();
  11. void trace();
  12. int getVIP(); // instruction pointer
  13. int getVSD(); // script descriptor (id)
  14. int getVSP(); // variables stack pointer
  15. int getVCC(); // call stack pointer
  16. int filterEvent(int vcpuid, int eventid); // if this returns 1, you should return immediatly and not call eventComplete!
  17. void eventComplete();
  18. int isActive();
  19. MakiJITD *createJITD(int vcpuid);
  20. MakiJITD *getJITD(int vcpuid);
  21. const char *getCodeBlock(int vcpuid);
  22. private:
  23. PtrList<MakiJITD> jitds;
  24. ReentryFilterObject reentryfilter;
  25. ReentryFilter filter;
  26. Stack<int> scopestack;
  27. };
  28. #endif