Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: tools/grokdump.py

Issue 845713002: Extend grokdump's dd command with a second optional parameter defining number of words to dump. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grokdump.py
diff --git a/tools/grokdump.py b/tools/grokdump.py
index 2177ec2122aa9824df335dc7b212eb74c171f564..5a5cf4ba68ed351efadb49d0fbabd800a15adfa1 100755
--- a/tools/grokdump.py
+++ b/tools/grokdump.py
@@ -2807,16 +2807,20 @@ class InspectionShell(cmd.Cmd):
else:
print "%s\n" % string
- def do_dd(self, address):
+ def do_dd(self, args):
"""
- Interpret memory at the given address (if available) as a sequence
- of words. Automatic alignment is not performed.
+ Interpret memory in the given region [address, address + num * word_size)
+ (if available) as a sequence of words. Automatic alignment is not performed.
+ If the num is not specified, a default value of 16 words is used.
+ Synopsis: dd 0x<address> 0x<num>
"""
- start = int(address, 16)
+ args = args.split(' ')
+ start = int(args[0], 16)
+ num = int(args[1], 16) if len(args) > 1 else 0x10
if (start & self.heap.ObjectAlignmentMask()) != 0:
print "Warning: Dumping un-aligned memory, is this what you had in mind?"
for slot in xrange(start,
- start + self.reader.PointerSize() * 10,
+ start + self.reader.PointerSize() * num,
self.reader.PointerSize()):
if not self.reader.IsValidAddress(slot):
print "Address is not contained within the minidump!"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698