Browse thread
[Caml-list] Debugging mixed ocaml/C code
-
Yaron M. Minsky
- Olivier Andrieu
- Yaron M. Minsky
- Yaron M. Minsky
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Olivier Andrieu <andrieu@i...> |
| Subject: | Re: [Caml-list] Debugging mixed ocaml/C code |
Yaron M. Minsky [Wednesday 11 September 2002] : > Instead, it segfaults in a predictable place in the ocaml code > instead. (Surprisingly, it segfaults in the same place if I compile to > native code or bytecode.) Why is it surprising ? It probably means your C stub returns a non-block value and caml thinks it's a block value (and when it tries to access the block, it gets a segfault). Or it could be a block that was allocated with a wrong size, etc. You could use a generic function (using Obj) to print the actual structure of the returned value (block/long, nb of fields, tag, etc). -- Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners