You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Pyhidra developers! I've recently been moving to reimplement our plugin system, BinSync to Pyhidra Python3. In our code, we have some code to handle events generated by users when they make changes in their decompiler.
I put the following code in the Pyhidra interpreter running in Ghidra:
Now, after making some changes in the normal CodeBrowser (like renaming the function), a print should appear in the Python window. However, it never does. I notice I can only get the print to trigger if I make the change to the Domain inside the Python window.
Is this intended? Or, am I doing something incorrect? Are there any workarounds?
Thank you!
The text was updated successfully, but these errors were encountered:
Sorry for the delay in response. We did not want to recommend the usage of certain functionality until we were sure it would be carried over into PyGhidra.
The domainObjectChanged callback is being triggered in the thread that called it. The reason the print statement isn't being seen is due to how stdout and stderr are redirected on a per-thread, best effort basis. We have overriden the builtin print function within ghidra script context to ensure print will always work as expected.
While you can't extend a Java class from Python, we have created a mechanism to assist in situations where this is required. You can create the necessary Java classes in Java and create an interface which can be implemented in Python and delegate the necessary calls to your implemented interface. You can then register this with pyhidra to create and install the Ghidra plugin for you. An example for how to register it may be found and an example of the necessary Java code may be found. When registering the entry points, please use "pyghidra.setup" and "pyghidra.pre_launch"
Ghidra uses Swing for it's GUI. Attempting to use another GUI framework is not recommended and may not work at all on some operating systems.
Hi Pyhidra developers! I've recently been moving to reimplement our plugin system, BinSync to Pyhidra Python3. In our code, we have some code to handle events generated by users when they make changes in their decompiler.
I put the following code in the Pyhidra interpreter running in Ghidra:
Now, after making some changes in the normal CodeBrowser (like renaming the function), a print should appear in the Python window. However, it never does. I notice I can only get the print to trigger if I make the change to the Domain inside the Python window.
Is this intended? Or, am I doing something incorrect? Are there any workarounds?
Thank you!
The text was updated successfully, but these errors were encountered: