mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 16:59:35 -04:00
7562ec14c9
* feat: modularize elf analyzer feat: added experimental sce symbol scanner feat: change analyzer order feat: small optimizations on analyzer * feat: remove example_config.toml because its causing confusion on some people * feat: embed sce symbol but leave optional import path feat: killed skip function on analyzer but leave it so you can skip manual if you want * feat: pin elfio tag * feat: manually create string view with size * feat: update ghidra script
32 lines
907 B
C++
32 lines
907 B
C++
#ifndef PS2RECOMP_FUNCTION_CLASSIFIER_H
|
|
#define PS2RECOMP_FUNCTION_CLASSIFIER_H
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <unordered_set>
|
|
|
|
namespace ps2recomp
|
|
{
|
|
class FunctionClassifier
|
|
{
|
|
public:
|
|
FunctionClassifier();
|
|
|
|
void setSceSdkFunctionNames(const std::unordered_set<std::string> *names);
|
|
bool isLibraryFunction(const std::string &name) const;
|
|
static bool hasRuntimeHandler(const std::string &name);
|
|
|
|
static bool isReliableSymbolName(const std::string &name);
|
|
static bool hasPs2ApiPrefix(const std::string &name);
|
|
|
|
private:
|
|
std::unordered_set<std::string> m_knownLibNames;
|
|
const std::unordered_set<std::string> *m_sceSdkFunctionNames = nullptr;
|
|
|
|
void initializeKnownLibraryFunctions();
|
|
static bool matchesKernelRuntimeName(const std::string &name);
|
|
};
|
|
}
|
|
|
|
#endif // PS2RECOMP_FUNCTION_CLASSIFIER_H
|