mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 06:59:47 +08:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -228,12 +228,12 @@ def program_loader() -> "ProgramLoader.Builder":
|
||||
```python
|
||||
def task_monitor(
|
||||
timeout: Optional[int] = None
|
||||
) -> "PyGhidraTaskMonitor":
|
||||
) -> "TaskMonitor":
|
||||
"""
|
||||
Convenience function to get a "PyGhidraTaskMonitor" object.
|
||||
Convenience function to get a "TaskMonitor" object.
|
||||
|
||||
:param timeout: An optional number of seconds to wait before canceling the monitor.
|
||||
:return: A "PyGhidraTaskMonitor" object.
|
||||
:return: A "TaskMonitor" object.
|
||||
"""
|
||||
```
|
||||
|
||||
@@ -577,7 +577,9 @@ __3.1.0__
|
||||
__3.0.2__
|
||||
* Fixed an issue that prevented [`pyghidra.analysis_properties()`](#pyghidraanalysis_properties)
|
||||
from having access to all of the analysis properties.
|
||||
* Fixed issues related to the PyGhidra API inadvertently squashing exceptions
|
||||
* Fixed issues related to the PyGhidra API inadvertently squashing exceptions.
|
||||
* Calling [`pyghidra.task_monitor()`](#pyghidratask_monitor) with no `timeout` parameter will now
|
||||
return a `TaskMonitor.DUMMY` instead of a `PyGhidraTaskMonitor`.
|
||||
|
||||
__3.0.1__
|
||||
* Fixed `AttributeError: module 'pyghidra' has no attribute 'program_conext'` when performing a
|
||||
|
||||
@@ -305,17 +305,20 @@ def program_loader() -> "ProgramLoader.Builder":
|
||||
|
||||
def task_monitor(
|
||||
timeout: Optional[int] = None
|
||||
) -> "PyGhidraTaskMonitor":
|
||||
) -> "TaskMonitor":
|
||||
"""
|
||||
Convenience function to get a "PyGhidraTaskMonitor" object.
|
||||
Convenience function to get a "TaskMonitor" object.
|
||||
|
||||
:param timeout: An optional number of seconds to wait before canceling the monitor.
|
||||
:return: A "PyGhidraTaskMonitor" object.
|
||||
:return: A "TaskMonitor" object.
|
||||
"""
|
||||
from ghidra.util.task import TaskMonitor
|
||||
from ghidra.pyghidra import PyGhidraTaskMonitor
|
||||
from jpype.types import JInt
|
||||
t = None if timeout is None else JInt(timeout)
|
||||
return PyGhidraTaskMonitor(t, None)
|
||||
if timeout is None:
|
||||
return TaskMonitor.DUMMY
|
||||
else:
|
||||
return PyGhidraTaskMonitor(JInt(timeout), None)
|
||||
|
||||
def walk_project(
|
||||
project: "Project",
|
||||
|
||||
Reference in New Issue
Block a user