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
Packed modules: miscommunication emacs/ocamldebug #7540
Comments
Comment author: @mshinwell Please submit a Github PR with your fix (https://github.com/ocaml/ocaml), thanks. |
Comment author: @xavierleroy Hugo, we're still interested in your code (the one that attempts to fix the loading of events in ocamldebug). Having your code as a possible fix or at least a starting point would help us a lot. Thank you. |
Comment author: herbelin Hi Xavier, regarding the fix to ocamldebug, I had submitted #1179 which has been merged on Jul 19 (23ba478). I had another issue with tuareg which does not support sending breakpoints to ocamldebug when modules are in a pack. I reported this at ocaml/tuareg#136 but I have no clue how to fix that, since either tuareg should get a way to know that some files are in a pack, or ocamldebug being able to recover the fully qualified module name from the base name, but this would somehow defeat the purpose of packing. Actually, the issue seems to exist also for the version of camldebug.el shipped with ocaml ( Line 190 in 019f469
|
Comment author: @xavierleroy Sorry, I missed the Github pull request. Thanks for the info. Updating this PR to reflect that only the ocamldebug/emacs problem remains. |
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: 7540
Reporter: herbelin
Status: acknowledged (set by @xavierleroy on 2017-10-10T12:29:17Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.04.1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
[ Original summary was: Packed modules: setting "break" broken in ocamldebug + miscommunication emacs/ocamldebug. First issue is solved. ]
There seems to be a bug with ocamldebug on packed modules. In the reproducible script below, the first "break" works but the second gives "Can't find any event there". Note however that executing step by step works well.
This seems related to the call to "Hashtbl.add all_events_by_module md sorted_evl" in Symbols.read_symbols which binds all modules of a pack to the name of the first module.
There is also a communication bug when calling ocamldebug from emacs (at least using tuareg). Commands of the form
break @ "b" # 10
are sent while ocamldebug tolerance is only about adding .ml or uncapitalizing the first letter of a (possibly qualified) module name.Steps to reproduce
echo "let f x = x" > a.ml
echo "open A;; f 1" > b.ml
ocamlc -g -c a.ml b.ml
ocamlc -g -pack -o p.cmo a.cmo b.cmo
ocamlc -g -o a.out p.cmo
ocamldebug a.out
break @ B.P # 10
break @ A.P # 9
Additional information
Since I already tried a fix for testing, I shall try to submit it to the PR system in case it can ever save time.
The text was updated successfully, but these errors were encountered: