Skip to content

Commit f49687b

Browse files
committed
when invoke returns a str, also send handle to the string
1 parent cc1c8ba commit f49687b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/debug/debugserver.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,8 @@ static void debugserver_invocation_special_return(MVMThreadContext *tc, void *da
15441544
case MVM_RETURN_STR: {
15451545
/* TODO handle strings with null bytes in them */
15461546
char *str_result = MVM_string_utf8_encode_C_string(tc, data->return_target.s);
1547-
cmp_write_map(ctx, 5);
1547+
MVMuint64 handle = allocate_handle(tc, data->return_target.s);
1548+
cmp_write_map(ctx, 6);
15481549
cmp_write_str(ctx, "type", 4);
15491550
cmp_write_int(ctx, MT_InvokeResult);
15501551
cmp_write_str(ctx, "id", 2);
@@ -1555,6 +1556,8 @@ static void debugserver_invocation_special_return(MVMThreadContext *tc, void *da
15551556
cmp_write_str(ctx, "str", 3);
15561557
cmp_write_str(ctx, "value", 5);
15571558
cmp_write_str(ctx, str_result, strlen(str_result));
1559+
cmp_write_str(ctx, "handle", 6);
1560+
cmp_write_int(ctx, handle);
15581561
MVM_free(str_result);
15591562
break;
15601563
}

0 commit comments

Comments
 (0)