Ark Server API (ASA) - Wiki
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, const std::unordered_set<std::string> filter_set);
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 bool FilterSymbols(const std::string input);
32 static std::string GetSymbolNameString(IDiaSymbol* /*symbol*/);
33 static uint32_t GetSymbolId(IDiaSymbol* /*symbol*/);
34 static void Cleanup(IDiaSymbol* /*symbol*/, IDiaSession* /*session*/, IDiaDataSource* /*source*/);
35 static std::string GetFunctionSymbolParams(IDiaSymbol* /*symbol*/);
36
39
42 };
43} // namespace API
#define WINAPI
PdbReader()=default
void DumpType(IDiaSymbol *, const std::string &, int) const
std::unordered_set< uint32_t > visited_
Definition PDBReader.h:41
std::unordered_set< std::string > filter_set_
Definition PDBReader.h:40
void Read(const std::wstring &path, std::unordered_map< std::string, intptr_t > *offsets_dump, std::unordered_map< std::string, BitField > *bitfields_dump, const std::unordered_set< std::string > filter_set)
Definition PDBReader.cpp:44
std::unordered_map< std::string, BitField > * bitfields_dump_
Definition PDBReader.h:38
bool FilterSymbols(const std::string input)
void DumpFunctions(IDiaSymbol *)
static void LoadDataFromPdb(const std::wstring &, IDiaDataSource **, IDiaSession **, IDiaSymbol **)
Definition PDBReader.cpp:86
std::unordered_map< std::string, intptr_t > * offsets_dump_
Definition PDBReader.h:37
static uint32_t GetSymbolId(IDiaSymbol *)
void DumpData(IDiaSymbol *, const std::string &) const
void DumpGlobalVariables(IDiaSymbol *)
void DumpStructs(IDiaSymbol *)
static std::string GetFunctionSymbolParams(IDiaSymbol *)
~PdbReader()=default
static void Cleanup(IDiaSymbol *, IDiaSession *, IDiaDataSource *)
static std::string GetSymbolNameString(IDiaSymbol *)
void Attach(T *sym)
Definition PDBReader.cpp:35
Definition IBaseApi.h:9
Definition json.hpp:4518