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

Method do_disassemble

deps/v8/tools/grokdump.py:4076–4110  ·  view source on GitHub ↗

Unassemble memory in the region [address, address + size). If the size is not specified, a default value of 32 bytes is used. Synopsis: u 0x 0x

(self, args)

Source from the content-addressed store, hash-verified

4074 return self.do_disassemble(args)
4075
4076 def do_disassemble(self, args):
4077 """
4078 Unassemble memory in the region [address, address + size).
4079
4080 If the size is not specified, a default value of 32 bytes is used.
4081 Synopsis: u 0x<address> 0x<size>
4082 """
4083 if len(args) != 0:
4084 args = args.split(' ')
4085 self.u_start = self.ParseAddressExpr(args[0])
4086 self.u_size = self.ParseAddressExpr(args[1]) if len(args) > 1 else 0x20
4087 skip = False
4088 else:
4089 # Skip the first instruction if we reuse the last address.
4090 skip = True
4091
4092 if not self.reader.IsValidAddress(self.u_start):
4093 print("Address %s is not contained within the minidump!" % (
4094 self.reader.FormatIntPtr(self.u_start)))
4095 return
4096 lines = self.reader.GetDisasmLines(self.u_start, self.u_size)
4097 if len(lines) == 0:
4098 print("Address %s could not be disassembled!" % (
4099 self.reader.FormatIntPtr(self.u_start)))
4100 print(" Could not disassemble using %s." % OBJDUMP_BIN)
4101 print(" Pass path to architecture specific objdump via --objdump?")
4102 return
4103 for line in lines:
4104 if skip:
4105 skip = False
4106 continue
4107 print(FormatDisasmLine(self.u_start, self.heap, line))
4108 # Set the next start address = last line
4109 self.u_start += lines[-1][0]
4110 print()
4111
4112 def do_EOF(self, none):
4113 raise KeyboardInterrupt

Callers 1

do_uMethod · 0.95

Calls 7

ParseAddressExprMethod · 0.95
FormatDisasmLineFunction · 0.85
IsValidAddressMethod · 0.80
GetDisasmLinesMethod · 0.80
printFunction · 0.70
splitMethod · 0.45
FormatIntPtrMethod · 0.45

Tested by

no test coverage detected