1
0

jitd.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef __MAKIJITD_H
  2. #define __MAKIJITD_H
  3. #include <bfc/ptrlist.h>
  4. class JITDBreakpoint;
  5. class VCPUDebugger;
  6. class svc_debuggerUI;
  7. class SimpleDebuggerUI;
  8. class DebuggerUI;
  9. class DebugSymbols;
  10. class SourceCodeLine;
  11. enum {
  12. JITD_RETURN_STEPINTO = 0,
  13. JITD_RETURN_STEPOVER = 1,
  14. JITD_RETURN_STEPOUT = 2,
  15. JITD_RETURN_TERMINATE = 3,
  16. JITD_RETURN_CONTINUE = 4,
  17. };
  18. class MakiJITD { // dispatch me!
  19. public:
  20. MakiJITD(VCPUDebugger *debugger, int vcpuid);
  21. virtual ~MakiJITD();
  22. int getNumBreakpoints();
  23. JITDBreakpoint *enumBreakpoint(int n);
  24. JITDBreakpoint *findBreakpoint(int pointer);
  25. void addBreakpoint(int pointer);
  26. void removeBreakpoint(JITDBreakpoint *breakpoint);
  27. void clearAllBreakpoints();
  28. int isGlobalBreakpointSet();
  29. void setGlobalBreakpoint(int s);
  30. void setSysBreakpoint(int pointer); // deactivates automatically next time the debugger is activated
  31. int getVCPUId();
  32. void trace();
  33. int isActive();
  34. int isOnHold(); // 1 if running in the jitd's message loop
  35. int getVIP();
  36. int getVSD();
  37. int getVCC();
  38. int getVSP();
  39. const char *getCodeBlock();
  40. virtual int findLine(int pointer);
  41. virtual int getNumLines();
  42. virtual SourceCodeLine *enumLine(int n);
  43. private:
  44. void createUi();
  45. void enterUi();
  46. int vcpuid;
  47. int vip, vsd, vcc, vsp;
  48. int globalbreakpoint;
  49. PtrList<JITDBreakpoint> breakpoints;
  50. VCPUDebugger *debugger;
  51. svc_debuggerUI *uisvc;
  52. DebuggerUI *ui;
  53. SimpleDebuggerUI *simpleui;
  54. int onhold;
  55. const char *codeblock;
  56. JITDBreakpoint *sysbp;
  57. DebugSymbols *symbols;
  58. };
  59. #endif