summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-02-21 18:31:20 -0800
committerBen Widawsky <ben@bwidawsk.net>2013-02-21 18:31:20 -0800
commit2155b16af2a382055b4059ce21786b77305d8910 (patch)
tree22ee38b97c1cce7c341693f184ffce81b0cd6af5 /tools
parentcf17d10828a42bacce9932d1d19f4d64d14a9479 (diff)
quick_dump: prettier printing
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/quick_dump/quick_dump.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py
index 7eb043bc..c2f5cd97 100755
--- a/tools/quick_dump/quick_dump.py
+++ b/tools/quick_dump/quick_dump.py
@@ -9,10 +9,14 @@ import chipset
import reg_access as reg
def parse_file(file):
+ print('{0:^10s} | {1:^28s} | {2:^10s}'. format('offset', file.name, 'value'))
+ print('-' * 54)
for line in file:
register = ast.literal_eval(line)
val = reg.read(register[1])
- print(register[1], "(", register[0], ")", hex(val))
+ intreg = int(register[1], 16)
+ print('{0:#010x} | {1:<28} | {2:#010x}'.format(intreg, register[0], val))
+ print('')
parser = argparse.ArgumentParser(description='Dumb register dumper.')