mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-07 03:03:15 +00:00
core: Reorganize
This commit is contained in:
parent
89cf4dbfcb
commit
369d92fa56
73 changed files with 724 additions and 572 deletions
40
src/core/loader/symbols_resolver.h
Normal file
40
src/core/loader/symbols_resolver.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
|
||||
struct SymbolRecord {
|
||||
std::string name;
|
||||
u64 virtual_address;
|
||||
};
|
||||
|
||||
struct SymbolRes {
|
||||
std::string name;
|
||||
std::string nidName;
|
||||
std::string library;
|
||||
u16 library_version;
|
||||
std::string module;
|
||||
u08 module_version_major;
|
||||
u08 module_version_minor;
|
||||
u32 type;
|
||||
};
|
||||
|
||||
class SymbolsResolver {
|
||||
public:
|
||||
SymbolsResolver() = default;
|
||||
virtual ~SymbolsResolver() = default;
|
||||
|
||||
void AddSymbol(const SymbolRes& s, u64 virtual_addr);
|
||||
const SymbolRecord* FindSymbol(const SymbolRes& s) const;
|
||||
|
||||
static std::string GenerateName(const SymbolRes& s);
|
||||
|
||||
private:
|
||||
std::vector<SymbolRecord> m_symbols;
|
||||
};
|
||||
|
||||
} // namespace Core::Loader
|
Loading…
Add table
Add a link
Reference in a new issue