本文整理汇总了Python中collector.Collector.enhance_call_tree_from_assembly_line方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.enhance_call_tree_from_assembly_line方法的具体用法?Python Collector.enhance_call_tree_from_assembly_line怎么用?Python Collector.enhance_call_tree_from_assembly_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collector.Collector
的用法示例。
在下文中一共展示了Collector.enhance_call_tree_from_assembly_line方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_enhance_call_tree_from_assembly_line
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import enhance_call_tree_from_assembly_line [as 别名]
def test_enhance_call_tree_from_assembly_line(self):
c = Collector()
f1 = "f1"
f2 = {collector.ADDRESS: "00000088"}
f3 = {collector.ADDRESS: "00000930"}
c.symbols = {int(f2[collector.ADDRESS], 16): f2, int(f3[collector.ADDRESS], 16): f3}
with patch.object(c, "add_function_call") as m:
c.enhance_call_tree_from_assembly_line(f1, " 89e: e9d3 0100 ldrd r0, r1, [r3]")
self.assertFalse(m.called)
with patch.object(c, "add_function_call") as m:
c.enhance_call_tree_from_assembly_line(f1, "934: f7ff bba8 b.w 88 <jump_to_pbl_function>")
m.assert_called_with(f1,f2)
with patch.object(c, "add_function_call") as m:
c.enhance_call_tree_from_assembly_line(f1, "8e4: f000 f824 bl 930 <app_log>")
m.assert_called_with(f1,f3)
with patch.object(c, "add_function_call") as m:
c.enhance_call_tree_from_assembly_line(f1, "6c6: d202 bcs.n 88 <__aeabi_ddiv+0x6e>")
m.assert_called_with(f1,f2)
with patch.object(c, "add_function_call") as m:
c.enhance_call_tree_from_assembly_line(f1, " 805bbac: 2471 0805 b64b 0804 b3c9 0804 b459 0804 q$..K.......Y...")
self.assertFalse(m.called)