Revision: 14572
Author: [email protected]
Date: Tue May 7 06:24:04 2013
Log: Prevent grokdump from crying about invalid input.
[email protected]
Review URL: https://codereview.chromium.org/14660012
http://code.google.com/p/v8/source/detail?r=14572
Modified:
/branches/bleeding_edge/tools/grokdump.py
=======================================
--- /branches/bleeding_edge/tools/grokdump.py Wed Mar 20 06:12:33 2013
+++ /branches/bleeding_edge/tools/grokdump.py Tue May 7 06:24:04 2013
@@ -2036,17 +2036,24 @@
def do_u(self, args):
"""
- u 0x<address> 0x<size>
- Unassemble memory in the region [address, address + size)
+ 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<address> 0x<size>
"""
args = args.split(' ')
start = int(args[0], 16)
- size = int(args[1], 16)
+ size = int(args[1], 16) if len(args) > 1 else 0x20
+ if not self.reader.IsValidAddress(start):
+ print "Address is not contained within the minidump!"
+ return
lines = self.reader.GetDisasmLines(start, size)
for line in lines:
print FormatDisasmLine(start, self.heap, line)
print
+ def do_EOF(self, none):
+ raise KeyboardInterrupt
+
EIP_PROXIMITY = 64
CONTEXT_FOR_ARCH = {
@@ -2131,7 +2138,10 @@
FullDump(reader, heap)
if options.shell:
- InspectionShell(reader, heap).cmdloop("type help to get help")
+ try:
+ InspectionShell(reader, heap).cmdloop("type help to get help")
+ except KeyboardInterrupt:
+ print "Kthxbye."
else:
if reader.exception is not None:
print "Annotated stack (from exception.esp to bottom):"
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.