MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / gen

Function gen

arch/armv7/thumb2_disasm/arm_pcode_parser/codegencpp.py:677–689  ·  view source on GitHub ↗
(pcode, rule='start', comments=True)

Source from the content-addressed store, hash-verified

675
676# take as input a single pcode statement
677def gen(pcode, rule='start', comments=True):
678
679 # strip trailing whitespace or semicolons
680 while pcode[-1] in [' ', '\t', ';']:
681 pcode = pcode[0:-1]
682
683 code = ''
684 parser = pcodeParser(parseInfo=False)
685 if comments:
686 code = '/* pcode: %s */\n' % pcode
687 tree = parser.parse(pcode, rule_name=rule, semantics=PcodeSemantics())
688 code += tree.gen()
689 return code
690
691# take as input multiple pcode statements (separated by ";\n")
692def genBlock(pcode, comments=True):

Callers 1

genBlockFunction · 0.85

Calls 4

pcodeParserClass · 0.90
PcodeSemanticsClass · 0.85
genMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected