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
I can run the following python script in the GUI and does what I expect (opens GDT archive, imports the data types and closes the archive). However, if I run it as preScript in headless, the data types are imported however the GDT archive is left in a 'weird unclosed state' such that when you open the project in the GUI the archive is still associated with the project but it can no longer find the archive. I'm assuming I've missed something here in the script that the GUI is fixing for me - anyone any ideas?
from ghidra.program.model.data import FileDataTypeManager
dtm = currentProgram.getDataTypeManager()
gdt_file = java.io.File("./archive.gdt")
fdtm = FileDataTypeManager.openFileArchive(gdt_file, False)
for dt in fdtm.getAllDataTypes():
dtm.addDataType(dt, None)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I can run the following python script in the GUI and does what I expect (opens GDT archive, imports the data types and closes the archive). However, if I run it as preScript in headless, the data types are imported however the GDT archive is left in a 'weird unclosed state' such that when you open the project in the GUI the archive is still associated with the project but it can no longer find the archive. I'm assuming I've missed something here in the script that the GUI is fixing for me - anyone any ideas?
Beta Was this translation helpful? Give feedback.
All reactions