Skip to content

Conversation

@Lucasnribeiro
Copy link
Contributor

implementing this issue #17

if (sym && sym->isFunction)
{
return sym->name;
return sanitizeFunctionName(sym->name);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will cause an error because the function body is online 78.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow, yeah

Copy link
Contributor

@DanielSvoboda DanielSvoboda Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding "CodeGenerator::" to the beginning should solve the problem.

return CodeGenerator::sanitizeFunctionName(sym->name);

and add this to code_generator.h:

std::string sanitizeFunctionName(const std::string& name);

{
if (inst.opcode == OPCODE_JAL)
{
uint32_t target = (inst.address & 0xF0000000) | (inst.target << 2);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need (currentAddr + 4) & 0xF0000000 . Rabbitizer already gives the full VRAM target,

So repllace (inst.address & 0xF0000000) | (inst.target << 2) with inst.target; in alll places

: m_elfPath(elfPath)
{
m_elfParser = std::make_unique<ElfParser>(elfPath);
m_decoder = std::make_unique<R5900Decoder>();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also delete the file and the test if they use it.

@ran-j
Copy link
Owner

ran-j commented Jan 29, 2026

Nice work @Lucasnribeiro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants