diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-03-08 19:52:03 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-03-08 19:52:03 +0000 |
commit | 6c24f4f90b23e8c4536281d31461adfe5a15b739 (patch) | |
tree | 29f6c4af8052800cc7d0eafb9650c6be8e90a2e5 /byterun/debugger.c | |
parent | 1fb4007ece64b1d59e16d7a84639fce1dd69ed45 (diff) |
merge version 3.12 from 3.12.1 to r12205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/debugger.c')
-rw-r--r-- | byterun/debugger.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/byterun/debugger.c b/byterun/debugger.c index c69b1edd1..a114b46cb 100644 --- a/byterun/debugger.c +++ b/byterun/debugger.c @@ -21,6 +21,7 @@ #include <string.h> +#include "alloc.h" #include "config.h" #include "debugger.h" #include "misc.h" @@ -28,6 +29,7 @@ int caml_debugger_in_use = 0; uintnat caml_event_count; int caml_debugger_fork_mode = 1; /* parent by default */ +value marshal_flags = Val_emptylist; #if !defined(HAS_SOCKETS) || defined(NATIVE_CODE) @@ -162,6 +164,11 @@ void caml_debugger_init(void) struct hostent * host; int n; + caml_register_global_root(&marshal_flags); + marshal_flags = caml_alloc(2, Tag_cons); + Store_field(marshal_flags, 0, Val_int(1)); /* Marshal.Closures */ + Store_field(marshal_flags, 1, Val_emptylist); + address = getenv("CAML_DEBUG_SOCKET"); if (address == NULL) return; dbg_addr = address; @@ -230,7 +237,7 @@ static void safe_output_value(struct channel *chan, value val) saved_external_raise = caml_external_raise; if (sigsetjmp(raise_buf.buf, 0) == 0) { caml_external_raise = &raise_buf; - caml_output_val(chan, val, Val_unit); + caml_output_val(chan, val, marshal_flags); } else { /* Send wrong magic number, will cause [caml_input_value] to fail */ caml_really_putblock(chan, "\000\000\000\000", 4); |