-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsymbol_loader.hpp
63 lines (49 loc) · 1.04 KB
/
symbol_loader.hpp
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
58
59
60
61
62
63
#pragma once
#define PDB_INFO_SIGNATURE 0x53445352
#define SL_DEFAULT_TIMEOUT 10000
class SymbolLoader
{
private:
std::wstring dll_path = { 0 };
std::wstring pdb_path = { 0 };
bool is_ready = false;
size_t pdb_size = 0;
bool VerifyExistingPDB(const GUID* guid);
public:
bool Initialize(const wchar_t* dll_path, const wchar_t* pdb_path, bool redownload, DWORD connect_timeout);
bool IsReady() const;
void Cleanup();
size_t GetPDBSize() const;
std::wstring GetPDBPath() const;
std::wstring GetDLLPath() const;
};
struct PDBinfo
{
DWORD signature;
GUID guid;
DWORD age;
char pdb_file_name[ANYSIZE_ARRAY];
};
struct PDBHeader
{
char signature[0x20];
int page_size;
int alloc_table_ptr;
int num_of_file_pages;
int root_stream_size;
int reserved;
int page_number_of_root_stream_number_list;
};
struct PDBRootStream
{
int num_of_streams;
int stream_size[ANYSIZE_ARRAY]; // num_of_streams
// int stream_page_number_list[ANYSIZE_ARRAY]
};
struct PDBinfoStream1
{
int version;
int time_date_stamp;
int age;
GUID guid;
};