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

Method output_search_res

deps/v8/tools/grokdump.py:3541–3599  ·  view source on GitHub ↗
(self, f, straddress)

Source from the content-addressed store, hash-verified

3539 return
3540
3541 def output_search_res(self, f, straddress):
3542 try:
3543 self.output_header(f)
3544 f.write("<h3>Search results for %s</h3>" % straddress)
3545
3546 address = int(straddress, 0)
3547
3548 f.write("Comment: ")
3549 self.output_comment_box(f, "search-", address)
3550 f.write("<br>")
3551
3552 page_address = address & ~self.heap.PageAlignmentMask()
3553
3554 f.write("Page info: ")
3555 self.output_page_info(f, "old", self.padawan.known_first_old_page, \
3556 page_address)
3557 self.output_page_info(f, "map", self.padawan.known_first_map_page, \
3558 page_address)
3559
3560 if not self.reader.IsValidAddress(address):
3561 f.write("<h3>The contents at address %s not found in the dump.</h3>" % \
3562 straddress)
3563 else:
3564 # Print as words
3565 self.output_words(f, address - 8, address + 32, address, "Dump",
3566 self.heap.MachinePointerSize())
3567
3568 if self.heap.IsPointerCompressed():
3569 self.output_words(f, address - 8, address + 32, address,
3570 "Tagged Dump", self.heap.TaggedPointerSize())
3571
3572 # Print as ASCII
3573 f.write("<hr>")
3574 self.output_ascii(f, address, address + 256, address)
3575
3576 # Print as code
3577 f.write("<hr>")
3578 self.output_disasm_range(f, address - 16, address + 16, address, True)
3579
3580 aligned_res, unaligned_res = self.reader.FindWordList(address)
3581
3582 if len(aligned_res) > 0:
3583 f.write("<h3>Occurrences of 0x%x at aligned addresses</h3>" %
3584 address)
3585 self.output_find_results(f, aligned_res)
3586
3587 if len(unaligned_res) > 0:
3588 f.write("<h3>Occurrences of 0x%x at unaligned addresses</h3>" % \
3589 address)
3590 self.output_find_results(f, unaligned_res)
3591
3592 if len(aligned_res) + len(unaligned_res) == 0:
3593 f.write("<h3>No occurrences of 0x%x found in the dump</h3>" % address)
3594
3595 self.output_footer(f)
3596
3597 except ValueError:
3598 f.write("<h3>Unrecognized address format \"%s\".</h3>" % straddress)

Callers 1

do_GETMethod · 0.80

Calls 15

output_headerMethod · 0.95
output_comment_boxMethod · 0.95
output_page_infoMethod · 0.95
output_wordsMethod · 0.95
output_asciiMethod · 0.95
output_disasm_rangeMethod · 0.95
output_find_resultsMethod · 0.95
output_footerMethod · 0.95
intFunction · 0.85
PageAlignmentMaskMethod · 0.80
IsValidAddressMethod · 0.80
FindWordListMethod · 0.80

Tested by

no test coverage detected