Skip to content

Ghidra Struct Member Names Not Updating #51

@Flipout50

Description

@Flipout50
struct = deci.structs['/eh_frame_hdr']
struct.name = "my_struct_name"
struct.members[0].name = 'new_name'
struct.members[0].type = 'undefined'
struct.members[1].name = 'new_name_2'
struct.members[1].type = 'undefined'
deci.structs['/eh_frame_hdr'] = struct
assert deci.structs['/' + struct.name] == struct

If this test is run using the fauxware example binary, everything updates except for the struct names.
https://github.com/binsync/libbs/blob/585d5fabdfc50826316472abeb6d9e05d1cc3f1a/libbs/decompilers/ghidra/interface.py#L395C17-L395C84
This is the problematic line. Instead of replacing the struct members with the names provided, it seems to replace them with generic names like field_0 and field_1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingghidra

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions