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

linux-ramdump-parser-v2: Use array_index in pagetypeinfo

array_index properly accounts for the changes in sizes of array
items. Use it.

Change-Id: I0dd0fb70f968a2b837a3d2aa02ae3d02ad5a578a
parent 8956a84f
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ class Pagetypeinfo(RamParser): ...@@ -33,7 +33,7 @@ class Pagetypeinfo(RamParser):
total_orders_str = 'Total pages: ' total_orders_str = 'Total pages: '
for mtype in range(0, migrate_types): for mtype in range(0, migrate_types):
mname_addr = ramdump.read_word(migratetype_names + mtype * 4) mname_addr = ramdump.read_word(ramdump.array_index(migratetype_names, 'char *', mtype))
mname = ramdump.read_cstring(mname_addr, 12) mname = ramdump.read_cstring(mname_addr, 12)
pageinfo = ('zone {0:8} type {1:12} '.format(zname, mname)) pageinfo = ('zone {0:8} type {1:12} '.format(zname, mname))
nums = '' nums = ''
......
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