Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghidra Struct Member Names Not Updating #51

Open
Flipout50 opened this issue Apr 4, 2024 · 0 comments
Open

Ghidra Struct Member Names Not Updating #51

Flipout50 opened this issue Apr 4, 2024 · 0 comments
Labels
bug Something isn't working ghidra

Comments

@Flipout50
Copy link
Collaborator

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.

@Flipout50 Flipout50 added bug Something isn't working ghidra labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ghidra
Projects
None yet
Development

No branches or pull requests

1 participant