Files
PS2Recomp/ps2xAnalyzer/include/ps2recomp/function_classifier.h
Ranieri 7562ec14c9 better analyzer and integrating sce-symbol-scanner (#130)
* 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
2026-06-06 23:37:12 -03:00

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