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

Function FormatDisasmLine

deps/v8/tools/grokdump.py:1173–1193  ·  view source on GitHub ↗
(start, heap, line)

Source from the content-addressed store, hash-verified

1171
1172
1173def FormatDisasmLine(start, heap, line):
1174 line_address = start + line[0]
1175 stack_slot = heap.stack_map.get(line_address)
1176 marker = " "
1177 if stack_slot:
1178 marker = "=>"
1179 code = AnnotateAddresses(heap, line[1])
1180
1181 # Compute the actual call target which the disassembler is too stupid
1182 # to figure out (it adds the call offset to the disassembly offset rather
1183 # than the absolute instruction address).
1184 if heap.reader.arch == MD_CPU_ARCHITECTURE_X86:
1185 if code.startswith("e8"):
1186 words = code.split()
1187 if len(words) > 6 and words[5] == "call":
1188 offset = int(words[4] + words[3] + words[2] + words[1], 16)
1189 target = (line_address + offset + 5) & 0xFFFFFFFF
1190 code = code.replace(words[6], "0x%08x" % target)
1191 # TODO(jkummerow): port this hack to ARM and x64.
1192
1193 return "%s%08x %08x: %s" % (marker, line_address, line[0], code)
1194
1195
1196def AnnotateAddresses(heap, line):

Callers 4

dump_regionFunction · 0.85
_FormatLineMethod · 0.85
do_disassembleMethod · 0.85
_AnalyzeMinidumpFunction · 0.85

Calls 4

AnnotateAddressesFunction · 0.85
intFunction · 0.85
getMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…