Skip to content
Snippets Groups Projects
Commit 075c0a75 authored by Laura Abbott's avatar Laura Abbott
Browse files

linux-ramdump-parser-v2: Add read_u64 function

Reading 64 bits of data is needed at times. Add a dedicated function

Change-Id: Ibef3777a574fb4ea87af51ab8230af7d4402c4f9
parent c761d7fa
No related branches found
No related tags found
No related merge requests found
...@@ -1029,6 +1029,16 @@ class RamDump(): ...@@ -1029,6 +1029,16 @@ class RamDump():
else: else:
return s[0] return s[0]
# returns a value guaranteed to be 64 bits
def read_u64(self, address, virtual=True, trace=False, cpu=None):
if trace:
print_out_str('reading {0:x}'.format(address))
s = self.read_string(address, '<Q', virtual, trace, cpu)
if s is None:
return None
else:
return s[0]
# returns a value guaranteed to be 32 bits # returns a value guaranteed to be 32 bits
def read_u32(self, address, virtual=True, trace=False, cpu=None): def read_u32(self, address, virtual=True, trace=False, cpu=None):
if trace: if trace:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment