-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Often, we need to know when a decompilation text (or window) for a function was updated. This can be very useful for caching or other event-based code. As such, we need a new callback in the callbacks to handle this case.
Requirements
- Add a new callback handler to the handlers in
libbs/api/decompiler_interface.py#L717, calleddecompilation_changed. This handler should trigger every time decompilation gets updated through either direct edits or refreshes. Ideally, the data provided by the event is BS objects, like a function and associated things. - Implement the actual logic in at least one decompiler, I recommend
libbs/decompilers/ida. The most likely way you will implement this is by using the already present HexRays Hooks inlibbs/decompilers/ida/hooks.py#L510. - The implementation must not cause lag! Thread whatever you can (when applicable). If the delay for a change is more than 1 second, it is too long.
Testing
After implementation, make a new test case in test_decompilers.py. This testcase should verify that if some change (like a variable rename) is triggered, then the decompilation is triggered as well.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress