aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-07 20:17:26 +0100
committerGitHub <[email protected]>2017-11-07 20:17:26 +0100
commitef0d576a15fcf74fba6691b36b06c272a2d02ad3 (patch)
tree24c2cb8c7c18638726c778ddce460b69d632074d
parent513efb0bb34daecff84ac09fc36977c6682fa84d (diff)
parente58e6c2db1f8b01f0adca778456ff5e1f9475038 (diff)
downloadotp-ef0d576a15fcf74fba6691b36b06c272a2d02ad3.tar.gz
otp-ef0d576a15fcf74fba6691b36b06c272a2d02ad3.tar.bz2
otp-ef0d576a15fcf74fba6691b36b06c272a2d02ad3.zip
Merge PR-1619 from mikpe/erts-hipe-print-heap-fixes
fix output formatting in hipe_bifs:show_heap/1
-rw-r--r--erts/emulator/hipe/hipe_debug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_debug.c b/erts/emulator/hipe/hipe_debug.c
index 222a11db3d..cfe60b379e 100644
--- a/erts/emulator/hipe/hipe_debug.c
+++ b/erts/emulator/hipe/hipe_debug.c
@@ -135,7 +135,9 @@ static void print_heap(Eterm *pos, Eterm *end)
printf("From: 0x%0*lx to 0x%0*lx\n\r",
2*(int)sizeof(long), (unsigned long)pos,
2*(int)sizeof(long), (unsigned long)end);
- printf(" | H E A P |\r\n");
+ printf(" | %*s H E A P %*s |\r\n",
+ 2*(int)sizeof(long)-1, "",
+ 2*(int)sizeof(long)-1, "");
printf(" | %*s | %*s |\r\n",
2+2*(int)sizeof(long), "Address",
2+2*(int)sizeof(long), "Contents");
@@ -158,8 +160,10 @@ static void print_heap(Eterm *pos, Eterm *end)
++pos;
--ari;
}
- } else
+ } else {
+ fflush(stdout);
erts_printf("%.30T", val);
+ }
printf("\r\n");
}
printf(" |%s|%s|\r\n", dashes, dashes);