-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from VyacheslavIurevich/data_types_dump
merge branch "data_types_dump" to "development"
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'''Dumping program data types''' | ||
#pylint: disable=wrong-import-position | ||
import pyhidra # pylint: disable=import-error | ||
pyhidra.start() | ||
import ghidra # pylint: disable=import-error | ||
from java.io import PrintWriter # pylint: disable=import-error | ||
|
||
def write_program_data_types(program, file, monitor): | ||
"""Dumping program data types""" | ||
dtm = program.getDataTypeManager() | ||
c_file_writer = PrintWriter(file) | ||
data_type_writer = ghidra.program.model.data.DataTypeWriter(dtm, c_file_writer, False) | ||
data_type_writer.write(dtm, monitor) | ||
c_file_writer.close() |