GNAT - GVD:不是可执行格式:无法识别文件格式
我在运行 GNU Visual Debugger 1.2.6 的 XP 虚拟机上尝试打开 Ada 文件 (.adb),但不断收到以下错误:
不是可执行格式:文件格式 无法识别
我还应该提到我已经安装了 GNAT 3.14p 的 Ada 编译器套件和 win32 工具。
此后,我尝试从 GVD 甚至 .c 文件打开其他 .adb 文件,但都得到了与上述相同的满意响应。
知道为什么会发生这种情况吗?
I'm on an XP Virtual Machine running the GNU Visual Debugger 1.2.6, trying to open an Ada file (.adb), but keep getting the following error:
not in executable format: File format
not recognized
I should also mention that I've installed both the Ada compiler kit and win32 tools for GNAT 3.14p.
I've since tried opening other .adb files from the GVD and even .c files, but all with the same happy response above.
Any idea why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GVD 不采用源文件作为参数,它采用可执行程序。跳过很多 if this 和 if that,要调试 foo.adb,您可能希望将 foo.exe 传递给调试器。
但这是艾达,你不应该在这里。 ;-) 如果您编译源程序并生成可执行文件,则很少需要运行调试器。我还记得上次使用带有 GNAT 的调试器是什么时候,以及为什么。 (Solaris 中的一个错误,解决方法是将常量更改为变量 - Solaris 覆盖传入的值而不是使用临时值。)但这是什么?五年前?
放入一些调试代码(请参阅 GNAT 文档中的 pragma Debug),然后在必要时使用调试标志运行程序要容易得多。
哦,最重要的是。您可能需要查看 C:\GNAT\2010\share\doc\ 来查找 GNAT 附带的所有文档。阅读它。或者至少弄清楚如何搜索您需要的内容。 ;-)
GVD does not take a source file as an argument, it takes an executable program. Skipping a lot of if this and if that, to debug foo.adb you probably want to pass foo.exe to the debugger.
But this is Ada, and you shouldn't be here. ;-) If you got your source program to compile and produce an executable, you very seldom need to run the debugger. I can remember the last time I used the debugger with GNAT, and why. (A bug in Solaris, the workaround was change a constant to a variable--Solaris was overwriting the value passed in instead of using a temp.) But that was what? Five years ago?
It is much easier to put in some debugging code (see pragma Debug in the GNAT documentation), then run the program with the debug flag if necessary.
Oh, most important. You may need to look in C:\GNAT\2010\share\doc\ to find all the documentation that came with GNAT. Read it. Or at least figure out how to search it for what you need. ;-)