New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide primitive to extract debug information from a closure #6689
Comments
Comment author: @mshinwell A very quick dump of some random thoughts, for native:
|
Comment author: @ppedrot Some remarks on the thoughts of shinwell:
|
Comment author: @mshinwell
-- external int64_from_string : string -> int -> int64 = "%caml_string_get64u" let code_pointer_of_closure (f : 'a -> 'b) = let () = |
Comment author: @gasche I would be interested in solving the immediate use-case of bytecode, which is what the Coq people asked for. That seems reasonably easy and I'll try my hand at a patch someday. Mark, I wonder which interface I should present for this feature, and that is related to how/wheter we plan to extend this to native-code in the future. We could have a primitive that only works in bytecode, or that returns a "no information" value in native (this is how backtraces worked for a long time). If there is some specific interface that you think could be extended to a native counterpart in the future, it's of course a better choice. (As for backtraces, I'm probably aiming for a fast "raw" primitive that returns an abstract type that needs to be explicited into the user-friendly representation, to allow to collect such locations quickly and only unfold/locate it on the user's demand.) |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 6689
Reporter: @gasche
Status: acknowledged (set by @mshinwell on 2014-12-05T07:27:02Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.03.0+dev / +beta1
Category: back end (clambda to assembly)
Monitored by: @ygrek
Bug description
During a "Coq developers lunch", Coq developers mentioned that it would be useful for their debugging to be able to access the debug information attached to a function (without calling it).
They mentioned the case of global/closed/static functions and bytecode (they do use bytecode for debugging purposes), but we could extend this to native code and arbitrary closure if possible.
The text was updated successfully, but these errors were encountered: