summaryrefslogtreecommitdiff
path: root/erts/emulator/beam/beam_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/beam_debug.c')
-rw-r--r--erts/emulator/beam/beam_debug.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index a50ec46659..f8bc2af783 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -96,7 +96,7 @@ erts_debug_size_shared_1(BIF_ALIST_1)
}
BIF_RETTYPE
-erts_debug_copy_shared_1(BIF_ALIST_1)
+erts_debug_copy_shared_2(BIF_ALIST_2)
{
Process* p = BIF_P;
Eterm term = BIF_ARG_1;
@@ -106,6 +106,13 @@ erts_debug_copy_shared_1(BIF_ALIST_1)
erts_shcopy_t info;
INITIALIZE_SHCOPY(info);
+ switch (BIF_ARG_2) {
+ case am_true: info.copy_literals = 1; break;
+ case am_false: info.copy_literals = 0; break;
+ default:
+ BIF_ERROR(p, BADARG);
+ }
+
size = copy_shared_calculate(term, &info);
if (size > 0) {
hp = HAlloc(p, size);