代码之家  ›  专栏  ›  技术社区  ›  Joseph Earl

为什么在Windows 7 64位(使用Eclipse/Photran/Cygwin)上使用GDB调试Fortran代码时会出现缺少DLL的错误?

  •  1
  • Joseph Earl  · 技术社区  · 15 年前

    我的设置如下:

    • Eclipse:Helios 3.6.1 64位,带CDT 还有Photran
    • 环境:1.6.0_21
    • (构建17.0-b17,混合模式)
    • Cygwin 1.7.2(32位)

    代码构建和运行良好,尽管在Eclipse的Problems选项卡中出现了以下两个警告

    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
    

    当尝试将应用程序调试为本地Fortran应用程序时出现问题,这将导致以下错误:

    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并得到另一种类型(如果我错了,请纠正我)。GDB版本如下:

    GNU gdb 6.8.20080328 (cygwin-special)
    GDB configured as "i686-pc-cygwin"
    

    从命令行运行GDB可以得到:

    [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错误是什么?

    依赖项Walker为我的HelloFortran.exe提供了以下错误

    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,除了:

    CYGGCC_S-1.DLL
    CYGGFORTRAN-3.DLL
    CYGWIN1.DLL
    HELLOFORTRAN.EXE
    

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

    我的问题:

    • 为什么会出现缺少DLL的错误?(切换到32位版本的Eclipse/JVM等会解决这个问题吗?)
    • 好的继续,还是我来解决 缺少的DLL错误(如果是,

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

    program HelloFortran
        ! Force variable declaration
        implicit none
    
        ! Print 'Hello World!' to the main output
        write (*,*) 'Hello World!'
    
        ! End program
    end program HelloFortran
    
    1 回复  |  直到 15 年前
        1
  •  2
  •   Employed Russian    15 年前

    为什么会出现缺少DLL的错误?

    DebugEvent 对于作为该进程一部分的64位DLL的32位进程,它必须截断加载地址(64位加载地址不适合32位 LPVOID ). 最终的结果是调试器看到一个DLL加载事件,但在该地址找不到任何DLL;因此警告您。

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

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

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

    你不应该这样。

    IESHIMS.DLL

    是什么让你觉得 IESHIMS.DLL

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

    推荐文章