MCPcopy Index your code
hub / github.com/nodejs/node / FormatStackTrace

Method FormatStackTrace

deps/v8/tools/grokdump.py:2402–2420  ·  view source on GitHub ↗
(self, message, print_message)

Source from the content-addressed store, hash-verified

2400 return stack_start
2401
2402 def FormatStackTrace(self, message, print_message):
2403 if not print_message:
2404 print(" Use `dsa` to print the message with annotated addresses.")
2405 print("")
2406 return
2407 ptr_size = self.reader.MachinePointerSize()
2408 # Annotate all addresses in the dumped message
2409 prog = re.compile("[0-9a-fA-F]{%s}" % ptr_size*2)
2410 addresses = list(set(prog.findall(message)))
2411 for i in range(len(addresses)):
2412 address_org = addresses[i]
2413 address = self.heap.FormatIntPtr(int(address_org, 16))
2414 if address_org != address:
2415 message = message.replace(address_org, address)
2416 print("Message:")
2417 print("="*80)
2418 print(message)
2419 print("="*80)
2420 print("")
2421
2422 def TryInferFramePointer(self, slot, address):
2423 """ Assume we have a framepointer if we find 4 consecutive links """

Callers 4

TryExtractStackTraceMethod · 0.95

Calls 8

intFunction · 0.85
printFunction · 0.70
listFunction · 0.50
setFunction · 0.50
rangeFunction · 0.50
MachinePointerSizeMethod · 0.45
compileMethod · 0.45
FormatIntPtrMethod · 0.45

Tested by

no test coverage detected