mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-08-08 07:40:39 -09:00
Merge branch 'GP-7001_ryanmkurtz_pyghidra' (Closes #9288)
This commit is contained in:
@@ -99,8 +99,16 @@ public final class PyGhidraScriptProvider extends AbstractPythonScriptProvider {
|
||||
implements PythonFieldExposer {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
scriptRunner.accept(this);
|
||||
public void run() throws Exception {
|
||||
try {
|
||||
scriptRunner.accept(this);
|
||||
}
|
||||
catch (Exception e) {
|
||||
// This is a PyExceptionProxy, which we unfortunately cannot add a custom message
|
||||
// to. We don't want to wrap it in a custom exception because then Python will lose
|
||||
// access to the original BaseException.
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -571,6 +571,7 @@ __3.2.0__
|
||||
* PyGhidra's `help()` override can now show `public/private/protected` on Ghidra Java fields and
|
||||
methods (available in Ghidra 12.2 and later).
|
||||
* When an uncaught `JException` occurs, PyGhidra will now output the full Java stack trace.
|
||||
* PyGhidra no longer swallows the original exception object generated by GhidraScripts.
|
||||
|
||||
__3.1.0__
|
||||
* PyGhidra will now, by default, restore `sys.modules` to its prior state after a PyGhidra script is
|
||||
|
||||
@@ -256,6 +256,7 @@ class PyGhidraScript(dict):
|
||||
# pylint: disable=bare-except
|
||||
except:
|
||||
print_stacktrace(self._script, script_path)
|
||||
raise
|
||||
finally:
|
||||
sys.argv = orig_argv
|
||||
|
||||
|
||||
Reference in New Issue
Block a user