Skip to content

Commit

Permalink
Merge pull request #14 from VyacheslavIurevich/data_types_dump
Browse files Browse the repository at this point in the history
merge branch "data_types_dump" to "development"
  • Loading branch information
Sarapulov-Vas authored Jul 11, 2024
2 parents bd04fee + 92ba761 commit d2b579d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file added resources/in/test.out
Binary file not shown.
14 changes: 14 additions & 0 deletions src/write_program_data_types.py
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()

0 comments on commit d2b579d

Please sign in to comment.