MCPcopy Create free account
hub / github.com/nodejs/node / GetDisasmLines

Method GetDisasmLines

deps/v8/tools/grokdump.py:989–1015  ·  view source on GitHub ↗
(self, address, size)

Source from the content-addressed store, hash-verified

987 return None
988
989 def GetDisasmLines(self, address, size):
990 def CountUndefinedInstructions(lines):
991 pattern = "<UNDEFINED>"
992 return sum([line.count(pattern) for (ignore, line) in lines])
993
994 location = self.FindLocation(address)
995 if location is None: return []
996 arch = None
997 possible_objdump_flags = [""]
998 if self.arch == MD_CPU_ARCHITECTURE_X86:
999 arch = "ia32"
1000 elif self.arch == MD_CPU_ARCHITECTURE_ARM:
1001 arch = "arm"
1002 possible_objdump_flags = ["", "--disassembler-options=force-thumb"]
1003 elif self.arch == MD_CPU_ARCHITECTURE_ARM64:
1004 arch = "arm64"
1005 possible_objdump_flags = ["", "--disassembler-options=force-thumb"]
1006 elif self.arch == MD_CPU_ARCHITECTURE_AMD64:
1007 arch = "x64"
1008 results = [ disasm.GetDisasmLines(self.minidump_name,
1009 location,
1010 size,
1011 arch,
1012 False,
1013 objdump_flags)
1014 for objdump_flags in possible_objdump_flags ]
1015 return min(results, key=CountUndefinedInstructions)
1016
1017
1018 def Dispose(self):

Callers 6

dump_regionFunction · 0.80
PrintMethod · 0.80
output_disasm_rangeMethod · 0.80
do_disassembleMethod · 0.80
_AnalyzeMinidumpFunction · 0.80
_GetDisasmLinesMethod · 0.80

Calls 2

FindLocationMethod · 0.95
minFunction · 0.85

Tested by

no test coverage detected