emacs - 带有 emacs 和 F* 的 Gdb
问题描述
我想使用 Emacs fstar-mode 和 gdb 调试简单的 F* 程序。在 fstar-mode https://github.com/FStarLang/fstar-mode.el的 wiki 的最后是信息:
The fstar-gdb command (M-x) attaches GDB to the current F* process and launches Emacs' GDB-mi interface
没有进一步的解释。
在 Emacs 中(假设我正在编辑 Test.fst 文件)我调用fstar-gdb
命令并继续到gdb
控制台我正在尝试使用命令file Test
和run
. 他们工作正常,但是break 3
(或任何其他行)说它main.c
(显然)找不到第 3 行。
如何gdb
与 F* 一起使用?
解决方案
fstar-gdb 命令旨在调试 F* 编译器本身,而不是使用 F* 编译的程序。
对于 F* 程序,最好的可能是:
- ocamldebug 如果您使用的是字节编译器
- OCaml 程序的 GDB 调试的常用程序(参见https://ocaml.org/meetings/ocaml/2012/slides/oud2012-paper5-slides.pdf;这是因为大多数 F* 程序在编译之前被提取到 OCaml) .
- 如果您使用的是 Low*,则通常用于调试 C 程序的 GDB 调试过程。
推荐阅读
- fortran - 为什么我的参数(包括矩阵)在 Fortran 子程序中不断变化?
- javascript - 将 Outlook .msg 文件上传到 S3
- python - 在列表中的空白处将值插入到 html 表中
- javascript - 为什么状态变量的值没有被更新?
- html - 如何将我的传单地图从 R 输出到 Sharepoint 站点
- java - 为什么当我将一个元素压入堆栈时会得到一个奇怪的结果?
- javascript - 检查选定的文本是否被点击
- python - Django覆盖模型表单中外键字段的显示名称
- python - 在熊猫数据框中,如何在不使用循环的情况下根据一列的数据设置其他列的值?
- python - 使用 Pandas 从列中删除第一个单词,有时是第二个单词