decomp-toolkit icon indicating copy to clipboard operation
decomp-toolkit copied to clipboard

[BUG] dwarf dump does not understand anonymous unions.

Open ProfElements opened this issue 1 year ago • 0 comments

Repository URL

No response

Game Name

Spongebob Squarepants: Creature from the Krusty Krab

Game Version

USA V0

Description

When I run dwarf dump the structures are not populated correctly. Instead of being able to parse the struct, they get hit by and anonymous union at the tail end of it.

I did a simple fix by changing src/util/dwarf.rs line 1838 and changing it from let name = name.ok_or_else(|| anyhow!("Member without name: {:?}", tag))?; to let name = name.unwrap_or("".to_string());

I don't think that is a good fix but it did it for me. I think there might need to be a more specific fix for this.

ProfElements avatar Mar 15 '24 02:03 ProfElements