File 0766-observer-Handle-the-stackdump-in-crashdumps-in-23.patch of Package erlang

From d297de6314d78fb1aef7258d76867e792f09e787 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Wed, 13 Oct 2021 09:33:40 +0200
Subject: [PATCH 1/2] observer: Handle the stackdump in crashdumps in 23

In OTP-23 the format of the stackdump was inadvertenly changed
so that all variables in the first frame are prefixed with an
address instead of y register. This commit makes cdv handle the
new and old format.
---
 lib/observer/src/observer_html_lib.erl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/observer/src/observer_html_lib.erl b/lib/observer/src/observer_html_lib.erl
index 4cce12dde8..3a87bf5d80 100644
--- a/lib/observer/src/observer_html_lib.erl
+++ b/lib/observer/src/observer_html_lib.erl
@@ -139,15 +139,15 @@ msgq_table(Tab,Msg0, Id, Even, Colors) ->
 
 stackdump_table(Tab,{Label0,Term0},Even, Colors) ->
     Label = io_lib:format("~ts",[Label0]),
-    Term = case atom_to_list(Label0) of
-               "y" ++ _ ->
-                   %% Any term is possible, including huge ones.
-                   all_or_expand(Tab,Term0);
-               _ ->
+    Term = case string:split(Label, ":") of
+               [_Addr, "S" ++ _] ->
                    %% Return address or catch tag. It is known to be a
                    %% flat list, shortish, possibly containing characters
                    %% greater than 255.
-                   href_proc_port(Term0)
+                   href_proc_port(Term0);
+               _ ->
+                   %% Any term is possible, including huge ones.
+                   all_or_expand(Tab,Term0)
            end,
     tr(color(Even, Colors), [td("VALIGN=center",pre(Label)), td(pre(Term))]).
 
-- 
2.31.1

openSUSE Build Service is sponsored by