binsync / libbs

A library for writing plugins in any decompiler: includes API lifting, common data formatting, and GUI abstraction!
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Support for Enums in Ghidra Categories #65

Closed Flipout50 closed 4 months ago

Flipout50 commented 4 months ago

Currently if an enum exists inside of a ghidra category folder other than the root, libbs cannot properly update that enum. Enum getting is functional, however if the enum is updated and re-pushed to ghidra, the name will contain the path of the enum. Ex: A new enum is created under a category SomeEnums. It is called nestedEnum. The name used to access it in the database is /SomeEnums/nestedEnum. When this enum is re-pushed to ghidra, it will show up in the gui under SomeEnums as SomeEnums/nestedEnum and is now accessable through the database as /SomeEnums/SomeEnums/nestedEnum.

Solving this would probably require a rework of how the libbs artifact object Enum works as we would need to represent the path and name of the Enum separately because some methods require one or the other.