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

Unified Diff: tools/grokdump.py

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 5 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 | « tools/gcmole/gcmole.lua ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grokdump.py
===================================================================
--- tools/grokdump.py (revision 8778)
+++ tools/grokdump.py (working copy)
@@ -291,6 +291,7 @@
self.exception = None
self.exception_context = None
self.memory_list = None
+ self.memory_list64 = None
self.thread_map = {}
for d in directories:
DebugPrint(d)
@@ -311,16 +312,17 @@
self.thread_map[thread.id] = thread
elif d.stream_type == MD_MEMORY_LIST_STREAM:
print >>sys.stderr, "Warning: not a full minidump"
- ml = MINIDUMP_MEMORY_LIST.Read(self.minidump, d.location.rva)
- DebugPrint(ml)
- for m in ml.ranges:
- DebugPrint(m)
- elif d.stream_type == MD_MEMORY_64_LIST_STREAM:
assert self.memory_list is None
- self.memory_list = MINIDUMP_MEMORY_LIST64.Read(
+ self.memory_list = MINIDUMP_MEMORY_LIST.Read(
self.minidump, d.location.rva)
assert ctypes.sizeof(self.memory_list) == d.location.data_size
DebugPrint(self.memory_list)
+ elif d.stream_type == MD_MEMORY_64_LIST_STREAM:
+ assert self.memory_list64 is None
+ self.memory_list64 = MINIDUMP_MEMORY_LIST64.Read(
+ self.minidump, d.location.rva)
+ assert ctypes.sizeof(self.memory_list64) == d.location.data_size
+ DebugPrint(self.memory_list64)
def IsValidAddress(self, address):
return self.FindLocation(address) is not None
@@ -338,12 +340,16 @@
return self.minidump[location:location + size]
def FindLocation(self, address):
- # TODO(vitalyr): only works for full minidumps (...64 structure variants).
offset = 0
- for r in self.memory_list.ranges:
- if r.start <= address < r.start + r.size:
- return self.memory_list.base_rva + offset + address - r.start
+ if self.memory_list64 is not None:
+ for r in self.memory_list64.ranges:
+ if r.start <= address < r.start + r.size:
+ return self.memory_list64.base_rva + offset + address - r.start
offset += r.size
+ if self.memory_list is not None:
+ for r in self.memory_list.ranges:
+ if r.start <= address < r.start + r.memory.data_size:
+ return r.memory.rva + address - r.start
return None
def GetDisasmLines(self, address, size):
« no previous file with comments | « tools/gcmole/gcmole.lua ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698