[Skiboot] [PATCH] mambo: Fix backtrace when trace mixes endian code

Reza Arbab arbab at linux.ibm.com
Thu Aug 4 04:43:10 AEST 2022


On Mon, Jul 18, 2022 at 11:46:20AM -0400, Ryan Grimm wrote:
>diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
>index 96f8971a..f8f64eb9 100644
>--- a/external/mambo/mambo_utils.tcl
>+++ b/external/mambo/mambo_utils.tcl
>@@ -423,6 +423,13 @@ proc bt { {sp 0} } {
>         set sym [addr2func $lr]
>         puts "stack:$pa \t$lr\t$sym"
>         if { $bc == 0 } { break }
>+
>+        # catch illegal address in case of endian mismatch
>+        set tstpa [ mysim cpu $p:$c:$t util dtranslate $bc ]
>+        if {[catch { set tst [ mem_display_64 $tstpa $le ] } ]} {
>+            set le [ expr ! $le ]
>+            set bc [ mem_display_64 $pa $le ]
>+        }
>         set sp $bc
>     }
>     puts ""

Applied to master.

-- 
Reza Arbab


More information about the Skiboot mailing list