diff mbox

external/mambo: add shortcut to print all GPRs

Message ID 1479360008-8454-1-git-send-email-oohall@gmail.com
State Accepted
Headers show

Commit Message

Oliver O'Halloran Nov. 17, 2016, 5:20 a.m. UTC
The 'p' function added by mambo utils can be used to print registers
(GPR or SPR) from a thread. Mambo supports printing all the GPRs in one
go so this plumbs it into the 'p' function.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 external/mambo/mambo_utils.tcl | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stewart Smith Nov. 24, 2016, 5:56 a.m. UTC | #1
Oliver O'Halloran <oohall@gmail.com> writes:
> The 'p' function added by mambo utils can be used to print registers
> (GPR or SPR) from a thread. Mambo supports printing all the GPRs in one
> go so this plumbs it into the 'p' function.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> ---
>  external/mambo/mambo_utils.tcl | 4 ++++
>  1 file changed, 4 insertions(+)

merged to master as of f5d14f81b51f38c47aa565979c626706888f8434
diff mbox

Patch

diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index 6de952a18af5..a97bdc42af64 100644
--- a/external/mambo/mambo_utils.tcl
+++ b/external/mambo/mambo_utils.tcl
@@ -4,6 +4,10 @@ 
 #
 proc p { reg { t 0 } { c 0 } } {
     switch -regexp $reg {
+	^r$ {
+            set val [mysim cpu $c thread $t display gprs]
+            puts "$val"
+	}
         ^r[0-9]+$ {
             regexp "r(\[0-9\]*)" $reg dummy num
             set val [mysim cpu $c thread $t display gpr $num]