Ark Server API 3.54
Serverside plugin support for Ark Survival Evolved.
Loading...
Searching...
No Matches
PDBReader.h
Go to the documentation of this file.
1#pragma once
2
3#include <dia2.h>
4#include <unordered_set>
5
6#include "json.hpp"
7
8#include <API/Fields.h>
9
10namespace API
11{
13 {
14 public:
15 PdbReader() = default;
16 ~PdbReader() = default;
17
18 void Read(const std::wstring& path, std::unordered_map<std::string, intptr_t>* offsets_dump,
19 std::unordered_map<std::string, BitField>* bitfields_dump);
20
21 private:
22 static void LoadDataFromPdb(const std::wstring& /*path*/, IDiaDataSource** /*dia_source*/, IDiaSession**
23 /*session*/, IDiaSymbol** /*symbol*/);
24
25 void DumpStructs(IDiaSymbol* /*g_symbol*/);
26 void DumpFunctions(IDiaSymbol* /*g_symbol*/);
27 void DumpGlobalVariables(IDiaSymbol* /*g_symbol*/);
28 void DumpType(IDiaSymbol* /*symbol*/, const std::string& /*structure*/, int /*indent*/) const;
29 void DumpData(IDiaSymbol* /*symbol*/, const std::string& /*structure*/) const;
30
31 static std::string GetSymbolNameString(IDiaSymbol* /*symbol*/);
32 static uint32_t GetSymbolId(IDiaSymbol* /*symbol*/);
33 static void Cleanup(IDiaSymbol* /*symbol*/, IDiaSession* /*session*/, IDiaDataSource* /*source*/);
34
35 std::unordered_map<std::string, intptr_t>* offsets_dump_{nullptr};
36 std::unordered_map<std::string, BitField>* bitfields_dump_{nullptr};
37
38 std::unordered_set<uint32_t> visited_;
39 };
40} // namespace API
PdbReader()=default
void DumpType(IDiaSymbol *, const std::string &, int) const
Definition: PDBReader.cpp:254
std::unordered_set< uint32_t > visited_
Definition: PDBReader.h:38
std::unordered_map< std::string, BitField > * bitfields_dump_
Definition: PDBReader.h:36
void DumpFunctions(IDiaSymbol *)
Definition: PDBReader.cpp:170
static void LoadDataFromPdb(const std::wstring &, IDiaDataSource **, IDiaSession **, IDiaSymbol **)
Definition: PDBReader.cpp:82
std::unordered_map< std::string, intptr_t > * offsets_dump_
Definition: PDBReader.h:35
static uint32_t GetSymbolId(IDiaSymbol *)
Definition: PDBReader.cpp:357
void DumpData(IDiaSymbol *, const std::string &) const
Definition: PDBReader.cpp:289
void DumpGlobalVariables(IDiaSymbol *)
Definition: PDBReader.cpp:219
void Read(const std::wstring &path, std::unordered_map< std::string, intptr_t > *offsets_dump, std::unordered_map< std::string, BitField > *bitfields_dump)
Definition: PDBReader.cpp:44
void DumpStructs(IDiaSymbol *)
Definition: PDBReader.cpp:143
~PdbReader()=default
static void Cleanup(IDiaSymbol *, IDiaSession *, IDiaDataSource *)
Definition: PDBReader.cpp:365
static std::string GetSymbolNameString(IDiaSymbol *)
Definition: PDBReader.cpp:337