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

Function _AnalyzeMinidump

deps/v8/tools/grokdump.py:4169–4266  ·  view source on GitHub ↗
(options, reader)

Source from the content-addressed store, hash-verified

4167
4168
4169def _AnalyzeMinidump(options, reader):
4170 heap = None
4171
4172 stack_top = reader.ExceptionSP()
4173 stack_bottom = reader.StackBottom()
4174 stack_map = {reader.ExceptionIP(): -1}
4175 for slot in range(stack_top, stack_bottom, reader.MachinePointerSize()):
4176 maybe_address = reader.ReadUIntPtr(slot)
4177 if not maybe_address in stack_map:
4178 stack_map[maybe_address] = slot
4179
4180 heap = V8Heap(reader, stack_map)
4181 padawan = InspectionPadawan(reader, heap)
4182
4183 DebugPrint("========================================")
4184 if reader.exception is None:
4185 print("Minidump has no exception info")
4186 else:
4187 print("Address markers:")
4188 print(" T = valid tagged pointer in the minidump")
4189 print(" S = address on the exception stack")
4190 print(" C = address in loaded C/C++ module")
4191 print(" * = address in the minidump")
4192 print("")
4193 print("Exception info:")
4194 exception_thread = reader.ExceptionThread()
4195 print(" thread id: %d" % exception_thread.id)
4196 print(" code: %08X" % reader.exception.exception.code)
4197 print(" context:")
4198 context = CONTEXT_FOR_ARCH[reader.arch]
4199 maxWidth = max(map(lambda s: len(s), context))
4200 for r in context:
4201 register_value = reader.Register(r)
4202 print(" %s: %s" % (r.rjust(maxWidth),
4203 heap.FormatIntPtr(register_value)))
4204 # TODO(vitalyr): decode eflags.
4205 if reader.arch in [MD_CPU_ARCHITECTURE_ARM, MD_CPU_ARCHITECTURE_ARM64]:
4206 print(" cpsr: %s" % bin(reader.exception_context.cpsr)[2:])
4207 else:
4208 print(" eflags: %s" % bin(reader.exception_context.eflags)[2:])
4209
4210 print()
4211 print(" modules:")
4212 for module in reader.module_list.modules:
4213 name = GetModuleName(reader, module)
4214 if name in KNOWN_MODULES:
4215 print(" %s at %08X" % (name, module.base_of_image))
4216 reader.TryLoadSymbolsFor(name, module)
4217 print()
4218
4219 print(" stack-top: %s" % heap.FormatIntPtr(reader.StackTop()))
4220 print(" stack-bottom: %s" % heap.FormatIntPtr(reader.StackBottom()))
4221 print("")
4222
4223 if options.shell:
4224 padawan.PrintStackTraceMessage(print_message=False)
4225
4226 print("Disassembly around exception.eip:")

Callers 1

AnalyzeMinidumpFunction · 0.85

Calls 15

FormatIntPtrMethod · 0.95
InterpretMemoryMethod · 0.95
V8HeapClass · 0.85
InspectionPadawanClass · 0.85
DebugPrintFunction · 0.85
GetModuleNameFunction · 0.85
FormatDisasmLineFunction · 0.85
FullDumpFunction · 0.85
InspectionShellClass · 0.85
ExceptionSPMethod · 0.80
StackBottomMethod · 0.80

Tested by

no test coverage detected