Skip to content

Commit

Permalink
attempt to fix ghidra script issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeFZ committed Jan 5, 2025
1 parent 4e46c29 commit 3d5427c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from ghidra.program.model.symbol import SourceType
from ghidra.program.model.symbol import RefType
from ghidra.app.cmd.label import DemanglerCmd
from ghidra.app.services import DataTypeManagerService

#try:
# from typing import TYPE_CHECKING
Expand Down Expand Up @@ -77,8 +78,7 @@ def set_data_type(self, address: int, type: str):
print("Failed to set type: %s" % type)

def set_function_type(self, address: int, type: str):
make_function(address)
typeSig = CParserUtils.parseSignature(None, currentProgram, type)
typeSig = CParserUtils.parseSignature(DataTypeManagerService@None, currentProgram, type)
ApplyFunctionSignatureCmd(toAddr(address), typeSig, SourceType.USER_DEFINED, False, True).applyTo(currentProgram)

def set_data_comment(self, address: int, cmt: str):
Expand Down

0 comments on commit 3d5427c

Please sign in to comment.