aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-10-27 15:14:38 +0200
committerHans Nilsson <[email protected]>2016-10-27 15:25:21 +0200
commit22a29422236f28adc24090dace03c0fd29311c9c (patch)
tree7b3e501dedcee2af58ee032a288a5660395e2598 /lib/ssh
parent39cb552ba0a5aaa36cb07526b3b895677ba1f3dc (diff)
downloadotp-22a29422236f28adc24090dace03c0fd29311c9c.tar.gz
otp-22a29422236f28adc24090dace03c0fd29311c9c.tar.bz2
otp-22a29422236f28adc24090dace03c0fd29311c9c.zip
ssh: more info about shrinked binaries in ssh_dbg
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/src/ssh_dbg.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_dbg.erl b/lib/ssh/src/ssh_dbg.erl
index bd6bc0335b..ce5596e0f9 100644
--- a/lib/ssh/src/ssh_dbg.erl
+++ b/lib/ssh/src/ssh_dbg.erl
@@ -113,7 +113,12 @@ setup_tracer(Write, MangleArg) ->
ok.
%%%----------------------------------------------------------------
-shrink_bin(B) when is_binary(B), size(B)>100 -> {'*** SHRINKED BIN',size(B),element(1,split_binary(B,20)),'***'};
+shrink_bin(B) when is_binary(B), size(B)>100 -> {'*** SHRINKED BIN',
+ size(B),
+ element(1,split_binary(B,20)),
+ '...',
+ element(2,split_binary(B,size(B)-20))
+ };
shrink_bin(L) when is_list(L) -> lists:map(fun shrink_bin/1, L);
shrink_bin(T) when is_tuple(T) -> list_to_tuple(shrink_bin(tuple_to_list(T)));
shrink_bin(X) -> X.