(self, address, size)
| 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): |
no test coverage detected