coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs
- Date: Tue, 8 Jun 2021 20:57:29 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT skyskimmer.net; spf=Pass smtp.mailfrom=gaetan.gilbert AT skyskimmer.net; spf=None smtp.helo=postmaster AT relay2-d.mail.gandi.net
- Ironport-hdrordr: A9a23:j0/54aC1hgdpUoblHell55DYdb4zR+YMi2TDsHoBLSC9E/bo8vxH/pwgvyMc7Qx9ZJhOo7C90Ze7MAzhHPJOjbX4E9+ZLXTbUUGTXflfBbKL+UybJ8UVntQtqZuICpIOc+EYbmIK7/oSgjPIcOrIm+P3iZxA7N22pxxQpGdRCp2IwD0JdDpzeXcYeOApP/QE/Fv13Lshm9IuEU5nCPiGOg==
- Ironport-phdr: A9a23:77+dfBy6VfCBp8XXCzK0zVBlVkEcU1XcAAcZ59Idhq5Udez7ptK+ZR2Zvq08xw+TFazgqNt8w9LMtK7hXWFSqb2gi1slNKJ2ahkelM8NlBYhCsPWQWfyLfrtcjBoVJ8aDAwt8H60K1VaF9jjbFPOvHKy8SQSGhLiPgZpO+j5AIHfg9mz2uyo9ZDffwFFiDW+bL9sMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhjoZOT438G/ZicJ+g6xUrx2juxNxzJXZYJ2WOfdkYq/RYd0XSGhHU81MVyJBGIS8b44XAuQAJ+lfs5X9qEEIrRSmBAesBefvxSRWiX/swa0xzuMsEQ7c0wM+A9IBqnLUoM/6NKcTVeC617fHzS/fb/5Nwjf964jJcgsiofGNWLJwdNTeyVM1GwPDkFqQtZXoMjWI3esCr2aV9fBvVf6zi2E5sQFxpCCiy9kjhITNm44YxVDJ+yp4zYsrK9C1Rkp2b9G5HZZeqS2XKYt4T8IhTm10pis3ybkLt560ciUJy5kpyADSZv6FfoWO/xntWuGRITJii3JkfrKynw6y8Uy9yu3zV8m01k1KojBDktbWs3ACyQTf6s+bRfRn+0eh3SyD1wfJ6uFLOUw7ia3bK4c9wr43jpofq0HDHivulErqi6+Wb0Ek+u+v6+T/eLnmo5ucOolpgQ/9KqQjgtKzDfk6PwQUXWWX5f6w2KDg8ED3WrlGk/k7n6bfvZvHP8oUvLS5DBVQ0os76xawETOm0NMAkHkdMl1FfAiIjoj3N13XPf/0F/K/jE6tkDdv3fzGMafuApPQIXjCirvhe6hy61JExAoyy9BQ+Y5UB6kfLP7uWEL9rt7VAgMjPwCpwOvqBs9x2p4aVG+AGqOZNbndsV6M5uIhOemMY4oVtS7yK/c/+fHukWU2mVkHcamm3JsXbGu3Eep8I0WFenfsmdQBEGcRvgo9TezqjViCXiBJZ3qoWaIz+C07BJq8DYjfXoCtnKCB3CCjE5JKYWBGE0mAHmvsd4WZQPgBczmSI89kkjwcT7etUY4h1Re0tA/70bVrNOTU+jdL/a7kgdNy/qjYkQw43T1yFcWUlW+XHE9umWZdaDa1wKl5lmN8zl2Oy7Qw1/NRGMBa4bVGUwMwOITA5/d5GsvxWwfEc83PTlu6FIb1SQotR848loddK312HM+v20irN8WCGLwEjL+KAZk56OTa0mSjfq6VLl7d17g6jFgjR8ZVc2urmvwnn+AyL5TEl0yIzeOmM6EV3SqL+26FwWvIukxEAlYYbA==
dune secretly renames the plugin ml files, because unlike the main files we
don't use (wrapped false)
as such plugins/extraction/foo.ml is renamed to
plugins/extraction/extraction_plugin__Foo.ml
(note the capitalization of the first letter)
If using OCaml < 4.10 you also need to statically link the plugins you want
to step through
On Coq master this is done by adding coq-core.plugins.$name to the
(libraries) for the executable you're debugging in topbin/dune
If using OCaml 4.10 or 4.11 ocamldebug is deathly slow to the point of
unusability.
You may be able to debug coqtop used by PG using "loadingmode manual"
https://ocaml.org/manual/debugger.html#ss:debugger-loading
I've not tested this thoug, generally I use ocamldebug on coqc anyway
Gaëtan Gilbert
On 08/06/2021 20:29, Tj Barclay wrote:
Howdy,
I've been trying to figure out how to debug the extraction plugin. What I'd like to do is
execute an Extraction vernacular command in coqtop (or PG if that's an option) and have
that go until hitting a breakpoint set in one of the plugin's .ml files. So far all I've
managed to get working is running coqtop in ocamldebug using the provided code in
dev/tools/coqdev.el. From there I can set breakpoints in files like toplevel/coqtop.ml
<http://coqtop.ml> and toplevel/coqloop.ml <http://coqloop.ml>, but can't set
breakpoints in plugins/extraction/*.ml even after Require Extraction.
I appreciate any tips on how to get this going, or guidance on how to
properly go about debugging Coq plugins in general if what I'm proposing
doesn't work or isn't recommended.
Best,
TJ
--
TJ Barclay
Electrcial Engineering & Computer Science, University of Kansas
tjbarclay AT ku.edu <mailto:tjbarclay AT ku.edu>
+1 316 259 2250
- [Coq-Club] Debugging plugins with ocamldebug in Emacs, Tj Barclay, 06/08/2021
- Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs, Gaëtan Gilbert, 06/08/2021
- Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs, Jim Fehrle, 06/08/2021
- Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs, Pierre Courtieu, 06/09/2021
- Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs, Jim Fehrle, 06/08/2021
- Re: [Coq-Club] Debugging plugins with ocamldebug in Emacs, Gaëtan Gilbert, 06/08/2021
Archive powered by MHonArc 2.6.19+.