aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_term_cb.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-02-03 18:03:40 +0100
committerDan Gudmundsson <[email protected]>2014-02-03 18:03:40 +0100
commit846c74cd36ff3cf3bc576bc0512f5a1502f3fab4 (patch)
tree33cd95ea17cc9d5e4dfa63dd891b3cef0c8f8f05 /lib/observer/src/cdv_term_cb.erl
parent9279c200ea4bf7cf5f11749aa5688a5e275f8e66 (diff)
downloadotp-846c74cd36ff3cf3bc576bc0512f5a1502f3fab4.tar.gz
otp-846c74cd36ff3cf3bc576bc0512f5a1502f3fab4.tar.bz2
otp-846c74cd36ff3cf3bc576bc0512f5a1502f3fab4.zip
observer: Fix binary links
Heap binaries crashed, rework it and add links always. So the user can the binary in hex or whatever view he wants
Diffstat (limited to 'lib/observer/src/cdv_term_cb.erl')
-rw-r--r--lib/observer/src/cdv_term_cb.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/observer/src/cdv_term_cb.erl b/lib/observer/src/cdv_term_cb.erl
index 2ba908b909..4451045012 100644
--- a/lib/observer/src/cdv_term_cb.erl
+++ b/lib/observer/src/cdv_term_cb.erl
@@ -56,8 +56,9 @@ expand(['#CDVBin',Offset,Size,Pos], true) ->
{ok,Bin} = crashdump_viewer:expand_binary({Offset,Size,Pos}),
Bin;
expand(Bin, Tab) when is_binary(Bin), not is_boolean(Tab) ->
- <<Preview:80, _/binary>> = Bin,
Size = byte_size(Bin),
+ PrevSize = min(Size, 10) * 8,
+ <<Preview:PrevSize, _/binary>> = Bin,
Hash = erlang:phash2(Bin),
Key = {Preview, Size, Hash},
ets:insert(Tab, {Key,Bin}),