aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/crashdump_viewer.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-01-09 12:05:38 +0100
committerSiri Hansen <[email protected]>2018-01-09 12:05:38 +0100
commitf5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6 (patch)
tree4edfdde310340bb8cbea806aea817cd4755d8018 /lib/observer/src/crashdump_viewer.erl
parentce8ec42b800bee1dacacebf06665d1e0e6269603 (diff)
parent6aed6670e08c75e363838091c8ad60e20c72758d (diff)
downloadotp-f5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6.tar.gz
otp-f5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6.tar.bz2
otp-f5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6.zip
Merge branch 'maint'
Diffstat (limited to 'lib/observer/src/crashdump_viewer.erl')
-rw-r--r--lib/observer/src/crashdump_viewer.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl
index f197e72b90..d578639f1a 100644
--- a/lib/observer/src/crashdump_viewer.erl
+++ b/lib/observer/src/crashdump_viewer.erl
@@ -2029,12 +2029,16 @@ all_modinfo(Fd,LM,LineHead,DecodeOpts) ->
end.
get_attribute(Fd, DecodeOpts) ->
+ Term = do_get_attribute(Fd, DecodeOpts),
+ io_lib:format("~tp~n",[Term]).
+
+do_get_attribute(Fd, DecodeOpts) ->
Bytes = bytes(Fd, ""),
try get_binary(Bytes, DecodeOpts) of
{Bin,_} ->
try binary_to_term(Bin) of
Term ->
- io_lib:format("~tp~n",[Term])
+ Term
catch
_:_ ->
{"WARNING: The term is probably truncated!",