Vector35 / Vector35/binaryninja-api
Automatic structure/type propagation on pointer type fields
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
It would be nice to have a way to semi/automatically apply types to whatever pointers point to e.g.
00fd0210 struct link data_fd0210 =
00fd0210 {
00fd0210 struct link* flink = 0xfc0620
00fd0218 struct link* blink = 0xfc0aa8
00fd0220 }
Now instead of manually going to 0xfc0620 and 0xfc0aa8 and making the data the type by typing the type there could be some alternatives.
Solution 1:
Fully automatic, always propagate type to pointer types if there is a valid address at that data field
Solution 2:
Semi-automatic, shortkey to apply the type of current field to the address if there is valid pointer
Solution 3:
Full metal jacket would be to recursively apply types to all valid pointers found in a structure when applied (I have no idea how reliable this would be but having it as an option would be very nice)
I think all of these have their uses and should probably be available by right clicking anywhere inside a defined struct variable
Constraints:
- Warning/ignore/cancel if segment is RW, but still allow it.
- Field can only be propagated if its a pointer type
- Pointer should be valid
is_mapped(ptr_val) - Warning/ask for overwrite if a type is already defined, and it is about to be redefined
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the C++ API's existing structure and pointer-type handling, including the is_mapped(ptr_val) validity check and writable-segment behavior. Define which automatic, shortcut, and recursive propagation modes are supported, with overwrite prompts and cancellation behavior serving as the completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100