[erlang-bugs] dbg:dhandler1/3 missing newline?

Leo Liu sdl.web@REDACTED
Mon Oct 5 17:15:49 CEST 2015


Hi,

I am seeing dbg trace outputs looking like this:

--------------------------------
(<0.6690.1>) returned from observer_html_lib:expandable_term/3 -> [["<HTML>\n",
[snipped 22 lines]
                                                                        ["<TR ",
                                                                         [66,
                                                                          71,
                                                                          67,
                                                                          79,
                                                                          76,
                                                                          79,
                                                                          82,
                                                                          61,
                                                                          34,
                                                                          35,
                                                                          "E6",
                                                                          "E6",
                                                                          "FA",
                                                                          34],
                                                                         ">\n",
                                                                         [["<TD ",
                                                                           "VALIGN=center",
                                                                           ">",
                                                                           ["<PRE>",
                                                                            ["'0x0000000017857b50'"],
                                                                            "</PRE>"],
                                                                           "</TD>"],
......
--------------------------------

Is this a bug? I wonder if it looks better with the following tweak.

--- dbg.erl
+++ #<buffer dbg.erl>
@@ -1006,7 +1006,7 @@
 	return_from ->
 	    MFA = element(4, Trace),
 	    Ret = element(5, Trace),
-	    io:format(Out, "(~p) returned from ~s -> ~p~n", [From,ffunc(MFA),Ret]);
+	    io:format(Out, "(~p) returned from ~s ->~n  ~p~n", [From,ffunc(MFA),Ret]);
 	return_to ->
 	    MFA = element(4, Trace),
 	    io:format(Out, "(~p) returning to ~s~n", [From,ffunc(MFA)]);

Diff finished.  Mon Oct  5 23:02:46 2015

Leo



More information about the erlang-bugs mailing list