Replies: 4 comments 26 replies
-
The definition is incomplete but is limited by GHIDRA's current capabilities. Ideally, GHIDRA needs to support multiple pointer sizes and types for a specific compiler spec, however the current GHIDRA Data Organization only supports the notion of a single pointer size and is generally assumed to refer to the default address space in many cases. There are a number of other pointer attributes which would ideally be supported as well, including the notion of address space a pointer variable references. In addition, size alone is insufficient to handle proper de-referencing in many cases (e.g., offset pointers, bit-shifted pointers, etc.). |
Beta Was this translation helpful? Give feedback.
-
Nothing at this point. It's on the wish list. |
Beta Was this translation helpful? Give feedback.
-
I have not researched a solution for your specific use-case involving segmented addressing issues, but do realize that many architectures support the notion of multiple pointer sizes and characteristics which can influence pointer interpretation and de-referencing. The hope is the architectural changes we are currently considering will improve the "datatype attribute" storage capabilities to provide sufficient flexibility to more easily tackle new use cases such as yours without the need to incrementally change the storage schema and low-level API. Such changes always have a big impact on data migration, datatype archives, multi-user conflict detection/merge and diff. With such a capability in place we can more easily introduce new datatype attributes, although it is still likely that a significant retrofit effort would be required when introducing new attribute which must be handled by the GUI and analysis chain (e.g., decompiler). I apologize for our lack of design documentation and a more immediate solution to your issue. Your willingness to assist is appreciated. We encourage your experimentation with solving your specific use case and passing along anything you find helpful. If you find a solution which does not entail new pointer attributes it may be possible to work them in sooner than later. |
Beta Was this translation helpful? Give feedback.
-
DecompilerDebugOutput_16-bit_vs_32-bit_pointers.zip I am currently littering the C++ code with |
Beta Was this translation helpful? Give feedback.
-
Over the last few months I've been climbing a mountain (a nanometre at a time), but I’m wondering if the configuration in
/Processors x86/data/languages/x86-16.cspec
describing<pointer_size value="2" />
is correct. I’ve noticed that actually all pointers are 32-bit comprising of either an implicit or explicitsegment
followed by theoffset
. The implicitsegment
is defined in the assembly instruction (as one ofDS
,SS
orES
).Therefore, is the definition wrong???
Beta Was this translation helpful? Give feedback.
All reactions