forked from hasherezade/tiny_tracer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FuncWatch.h
58 lines (45 loc) · 995 Bytes
/
FuncWatch.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <cctype>
#include <string>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
class WFuncInfo
{
public:
WFuncInfo() : paramCount(0)
{
}
WFuncInfo(const WFuncInfo& a)
{
this->dllName = a.dllName;
this->funcName = a.funcName;
this->paramCount = a.paramCount;
}
bool load(const std::string &line, char delimiter);
bool update(const WFuncInfo &func_info);
bool isValid() const
{
if (dllName.length() > 0 && funcName.length() > 0) {
return true;
}
return false;
}
std::string dllName;
std::string funcName;
size_t paramCount;
};
class FuncWatchList {
public:
FuncWatchList()
{
}
~FuncWatchList()
{
}
size_t loadList(const char* filename);
bool appendFunc(WFuncInfo &info);
WFuncInfo* findFunc(const std::string& dllName, const std::string &funcName);
std::vector<WFuncInfo> funcs;
};