Skip to content

Commit

Permalink
tool: print out values of TCB registers in report
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Jan 11, 2024
1 parent 5df80c6 commit 17f06ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tool/microkit/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ def invocation_to_str(inv: Sel4Invocation, cap_lookup: Dict[int, str]) -> str:
val_str = f"{val} ({object_type_name} - variable size)"
else:
val_str = f"{val} ({object_type_name} - 0x{object_size:x})"
elif nm == "regs":
regs = vars(inv.regs)
val_str = ""
for i, reg in enumerate(regs.items()):
reg_value = 0 if reg[1] is None else reg[1]
if i == 0:
val_str = f"{reg[0]}: 0x{reg_value:016x}"
else:
val_str += f"\n{' ':30s}{reg[0]}: 0x{reg_value:016x}"
else:
val_str = str(val)
arg_strs.append(f" {nm:20s} {val_str}")
Expand Down

0 comments on commit 17f06ed

Please sign in to comment.