Feature/analyzer workflow cleanup (#46)

* feat: added thread naming functionality
feat: improve function name sanitization

* fix: fix decode jump target
feat: better word read
feat: prevent unexpect path on output tom
feat: analyzeEntryPoint now lookup for correct entry insted of rely on names
fix: fix CFG graph
feat: mangled name are not handle and sysfunctions anymore
feat: heavy loop flag count is not 5 from 3

* fix: skip/stubs now under [general]
fix: patch address now saves as true hex insted of decimal with 0x
fix: fix J/JAL reconstruction (PC+4)
feat: better C++ identifier sanitization
feat: decoder now dont stop the execution anymore just keep going
This commit is contained in:
Ranieri
2026-02-06 00:27:38 -03:00
committed by GitHub
parent e567c4cf60
commit df745d7ee9
5 changed files with 371 additions and 108 deletions
+16 -6
View File
@@ -20,6 +20,7 @@
#include <fstream>
#include <sstream>
#include <algorithm>
#include <cstring>
namespace
{
@@ -613,13 +614,22 @@ namespace ps2recomp
{
for (const auto &section : m_sections)
{
if (address >= section.address && address < (section.address + section.size))
if (address < section.address || section.size < sizeof(uint32_t))
{
if (section.data)
{
uint32_t offset = address - section.address;
return *reinterpret_cast<uint32_t *>(section.data + offset);
}
continue;
}
const uint32_t offset = address - section.address;
if (offset > section.size - static_cast<uint32_t>(sizeof(uint32_t)))
{
continue;
}
if (section.data)
{
uint32_t word = 0;
std::memcpy(&word, section.data + offset, sizeof(word));
return word;
}
}