首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我在Windows 7 64位(使用Eclipse/Photran/Cygwin)上使用GDB调试Fortran代码时会丢失DLL错误?

为什么我在Windows 7 64位(使用Eclipse/Photran/Cygwin)上使用GDB调试Fortran代码时会丢失DLL错误?
EN

Stack Overflow用户
提问于 2010-10-20 20:51:29
回答 1查看 3.2K关注 0票数 2

我的设置如下:

  • 操作系统: Windows 7家庭高级64位
  • Eclipse:带有CDT和Photran的Helios 3.6.1 64位
  • Java运行时环境: 1.6.0_21
  • Java热点:64位服务器VM (构建17.0-b17,混合模式)
  • Cygwin 1.7.2 (32位)

我的初始测试Fortran应用程序只需打印“Hello!”和出口。代码构建并运行良好,尽管Eclipse中的Problems选项卡中有以下两个警告

代码语言:javascript
复制
Description Resource    Path    Location    Type
Error launching external scanner info generator (gcc -E -P -v -dD C:/Users/Joe/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)  HelloFortran    Unknown C/C++ Problem
Error launching external scanner info generator (gcc -E -P -v -dD C:/Users/Joe/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)  HelloFortran    Unknown C/C++ Problem

当尝试将应用程序调试为Local应用程序时出现了此问题,该应用程序导致了以下错误:

代码语言:javascript
复制
cygwin warning:
  MS-DOS style path detected: C:\Users\Joe\workspace\HelloFortran
  Preferred POSIX equivalent is: /cygdrive/c/Users/Joe/workspace/HelloFortran
.gdbinit: No such file or directory.
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
auto-solib-add on
Undefined command: "auto-solib-add".  Try "help".
Error: dll starting at 0x76ba0000 not found.
Error: dll starting at 0x75230000 not found.
Error: dll starting at 0x76ba0000 not found.
Error: dll starting at 0x76aa0000 not found.
[New thread 7060.0x10dc]
[New thread 7060.0x16c0]

我猜没有找到入口点,因为它期望32-/64位DLL并得到另一种类型(如果我错了,请纠正我)。全球开发银行的版本如下:

代码语言:javascript
复制
GNU gdb 6.8.20080328 (cygwin-special)
GDB configured as "i686-pc-cygwin"

从命令行运行GDB将提供:

代码语言:javascript
复制
[New thread 5768.0x15a0]
Error: dll starting at 0x76ba0000 not found.
Error: dll starting at 0x75230000 not found.
Error: dll starting at 0x76ba0000 not found.
Error: dll starting at 0x76aa0000 not found.
[New thread 5768.0x46c]
hellofortran () at ../HelloFortran.f90:1
1    program HelloFortran
Current language: auto; currently fortran

如果我正确地阅读了GDB中的应用程序,并且我能够逐步完成它,那么缺少的DLL错误是关于什么的呢?

Dependency为我的HelloFortran.exe提供了以下错误

代码语言:javascript
复制
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

缺少的DLL似乎是IESHIMS.DLL (2),从我的快速研究来看,这似乎不是一个大问题,但我不认为我的应用程序需要引用这个DLL的任何理由,所以我不认为这会导致GDB中的错误。

所有模块的CPU类型都是x64,但以下情况除外:

代码语言:javascript
复制
CYGGCC_S-1.DLL
CYGGFORTRAN-3.DLL
CYGWIN1.DLL
HELLOFORTRAN.EXE

它的CPU类型为x86。

我担心缺少的DLL错误可能会损害我正确调试程序的能力(尽管程序最终将在基于Unix的HPC上运行,所以我不应该在那里遇到这些问题,因为所有这些DLL似乎都与Cygwin有关)。

我的问题:

  • 为什么我会丢失DLL错误?(切换到Eclipse/JVM等的32位版本会修复这个问题吗?)
  • 我是否可以继续,还是应该解决缺少的DLL错误(如果是,如何解决)?

编辑:我的测试程序如下:

代码语言:javascript
复制
program HelloFortran
    ! Force variable declaration
    implicit none

    ! Print 'Hello World!' to the main output
    write (*,*) 'Hello World!'

    ! End program
end program HelloFortran
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-10-21 06:42:23

为什么我会丢失DLL错误?

当Win/x64向32位进程发送有关该进程一部分的64位DLL的DebugEvent时,它必然会截断加载地址(64位加载地址不适合32位LPVOID)。最终结果是调试器会看到DLL加载事件,但无法在该地址找到任何DLL;因此警告您。

(切换到Eclipse/JVM等的32位版本会修复这个问题吗?)

否:这是在x64上调试任何32位进程的基础(至少使用32位调试器)。如果您使用x64版本的GDB,我想您可以消除警告,但我不确定GDB/x64是否可以在x86_64上调试32位进程(x86_64 GDB对Linux上的i386进程没有什么问题,因为“多拱”支持;我不知道Windows中是否存在“多重arch”)。

我担心缺少DLL错误会损害我正确调试程序的能力

你不应该这样。

我不认为我的应用程序需要引用IESHIMS.DLL

是什么让你觉得是IESHIMS.DLL

更有可能的是你看到的是WoW64.dll和朋友。在Win/x64上运行的每一个32位应用程序都引用WoW64

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3982194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档