aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/script/debugger/vcpudebug.h
blob: 6bba084ba279ab840d05fbba03f01bbb5f5133be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __VCPUDEBUG_H
#define __VCPUDEBUG_H

#include <bfc/ptrlist.h>
#include <bfc/stack.h>
#include <bfc/reentryfilter.h>

class MakiJITD;

class VCPUDebugger {
  public:
    VCPUDebugger();
    virtual ~VCPUDebugger();

    void trace();

    int getVIP(); // instruction pointer
    int getVSD(); // script descriptor (id)
    int getVSP(); // variables stack pointer
    int getVCC(); // call stack pointer

    int filterEvent(int vcpuid, int eventid); // if this returns 1, you should return immediatly and not call eventComplete!
    void eventComplete();

    int isActive();

    MakiJITD *createJITD(int vcpuid);
    MakiJITD *getJITD(int vcpuid);
    const char *getCodeBlock(int vcpuid);

  private:

    PtrList<MakiJITD> jitds;
    ReentryFilterObject reentryfilter;
    ReentryFilter filter;
    Stack<int> scopestack;
};

#endif