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

Method output_disasm_range

deps/v8/tools/grokdump.py:3386–3428  ·  view source on GitHub ↗
(
      self, f, start_address, end_address, highlight_address, exact)

Source from the content-addressed store, hash-verified

3384 return
3385
3386 def output_disasm_range(
3387 self, f, start_address, end_address, highlight_address, exact):
3388 region = self.reader.FindRegion(highlight_address)
3389 if start_address < region[0]:
3390 start_address = region[0]
3391 if end_address > region[0] + region[1]:
3392 end_address = region[0] + region[1]
3393 count = end_address - start_address
3394 lines = self.reader.GetDisasmLines(start_address, count)
3395 found = False
3396 if exact:
3397 for line in lines:
3398 if line[0] + start_address == highlight_address:
3399 found = True
3400 break
3401 if not found:
3402 start_address = highlight_address
3403 count = end_address - start_address
3404 lines = self.reader.GetDisasmLines(highlight_address, count)
3405 expand = ""
3406 if start_address != region[0] or end_address != region[0] + region[1]:
3407 exactness = ""
3408 if exact and not found and end_address == region[0] + region[1]:
3409 exactness = "&amp;exact=off"
3410 expand = ("(<a href=\"disasm.html?%s%s"
3411 "&amp;val=0x%x#highlight\">more...</a>)" %
3412 (self.encfilename, exactness, highlight_address))
3413
3414 f.write("<h3>Disassembling 0x%x - 0x%x, highlighting 0x%x %s</h3>" %
3415 (start_address, end_address, highlight_address, expand))
3416 f.write('<div class="code">')
3417 f.write("<table class=\"codedump\">");
3418 for i in range(len(lines)):
3419 line = lines[i]
3420 next_address = count
3421 if i + 1 < len(lines):
3422 next_line = lines[i + 1]
3423 next_address = next_line[0]
3424 self.format_disasm_line(
3425 f, start_address, line, next_address, highlight_address)
3426 f.write("</table>")
3427 f.write("</div>")
3428 return
3429
3430 def annotate_disasm_addresses(self, line):
3431 extra = []

Callers 3

output_disasmMethod · 0.95
output_search_resMethod · 0.95
output_disasm_pcMethod · 0.95

Calls 5

format_disasm_lineMethod · 0.95
FindRegionMethod · 0.80
GetDisasmLinesMethod · 0.80
rangeFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected