添加了库; Borland C++生成器无故暂停
我一直在尝试在 Borland C++ Builder(在 Windows XP 中)的程序中使用 UnderC 库(提供 c++ 脚本功能),但它给我带来了困难,我不知道如何解决。其他出现的问题,我在网上找到了解决方案,但这一个很难用易于搜索的词语来描述。我已经添加(到编译器搜索路径)包含所需文件的文件夹 - “ucdl.h”和“ucc12.lib”(C++ 告诉我需要将 .lib 从 coff 转换为 omf,所以我这样做了;它不再给我那个错误)。我添加了 #include "ucdl.h" 行,现在它不会给我任何错误消息 - 但是当我运行它时,它所做的第一件事就是停止在 cpu 调试窗口的中间,就好像我有设置断点。没有断点。它没有给出任何停止的原因。如果我让它继续运行,它就会给我一个访问冲突错误。有一件事可能有用,也可能没用——如果在 cpu 调试器中,我从暂停的地方备份一行,它会重新解析可见的程序集,然后显示它所在的行早一个字节开始。 据我所知,当代码从停止的地方运行到崩溃的地方时,它(在汇编代码中)从
___CRTL_VCL_初始化到
___CRTL_VCL_Sharemem 进入
__roundToInt64(),位于以下行:
00403204 FF25387B4000 jmp dword ptr [$00407b38]
该行前后有许多类似的行,指向相邻的内存位置。指针包含的地址是0x00009B47,它似乎超出了程序的范围或其他什么,因此给出了错误。我不知道如何解决这个问题,因为它第一次停止时没有给我任何错误(真的很奇怪),没有与它给出错误的位置相关的源代码,并且似乎在VCL初始化区域,我不知道添加库会如何导致这种情况。有什么想法吗?
哦,还有,它似乎在加载 borlndmm.dll 后就暂停了,而正常的程序会不断加载更多的 dll。事件日志显示:
Thread Start: Thread ID: 3028. Process ManualEventLogger.exe (4932)
Process Start: C:\Documents and Settings\Matthew\My Documents\Borland Studio Projects\Cantrips\Manual Event Logger\Debug_Build\ManualEventLogger.exe. Base Address: $00400000. Process ManualEventLogger.exe (4932)
Module Load: ManualEventLogger.exe. Has Debug Info. Base Address: $00400000. Process ManualEventLogger.exe (4932)
Module Load: ntdll.dll. No Debug Info. Base Address: $7C900000. Process ManualEventLogger.exe (4932)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $7C800000. Process ManualEventLogger.exe (4932)
Module Load: vcl100.bpl. No Debug Info. Base Address: $52000000. Process ManualEventLogger.exe (4932)
Module Load: rtl100.bpl. No Debug Info. Base Address: $51F20000. Process ManualEventLogger.exe (4932)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $77120000. Process ManualEventLogger.exe (4932)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $77DD0000. Process ManualEventLogger.exe (4932)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77E70000. Process ManualEventLogger.exe (4932)
Module Load: Secur32.dll. No Debug Info. Base Address: $77FE0000. Process ManualEventLogger.exe (4932)
Module Load: GDI32.dll. No Debug Info. Base Address: $77F10000. Process ManualEventLogger.exe (4932)
Module Load: USER32.dll. No Debug Info. Base Address: $7E410000. Process ManualEventLogger.exe (4932)
Module Load: msvcrt.dll. No Debug Info. Base Address: $77C10000. Process ManualEventLogger.exe (4932)
Module Load: ole32.dll. No Debug Info. Base Address: $774E0000. Process ManualEventLogger.exe (4932)
Module Load: VERSION.dll. No Debug Info. Base Address: $77C00000. Process ManualEventLogger.exe (4932)
Module Load: MPR.dll. No Debug Info. Base Address: $71B20000. Process ManualEventLogger.exe (4932)
Module Load: IMAGEHLP.dll. No Debug Info. Base Address: $76C90000. Process ManualEventLogger.exe (4932)
Module Load: WSOCK32.dll. No Debug Info. Base Address: $71AD0000. Process ManualEventLogger.exe (4932)
Module Load: WS2_32.dll. No Debug Info. Base Address: $71AB0000. Process ManualEventLogger.exe (4932)
Module Load: WS2HELP.dll. No Debug Info. Base Address: $71AA0000. Process ManualEventLogger.exe (4932)
Module Load: OLEACC.dll. No Debug Info. Base Address: $74C80000. Process ManualEventLogger.exe (4932)
Module Load: MSVCP60.dll. No Debug Info. Base Address: $76080000. Process ManualEventLogger.exe (4932)
Module Load: MSIMG32.dll. No Debug Info. Base Address: $76380000. Process ManualEventLogger.exe (4932)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $5D090000. Process ManualEventLogger.exe (4932)
Module Load: SHELL32.dll. No Debug Info. Base Address: $7C9C0000. Process ManualEventLogger.exe (4932)
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $77F60000. Process ManualEventLogger.exe (4932)
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $73000000. Process ManualEventLogger.exe (4932)
Module Load: comdlg32.dll. No Debug Info. Base Address: $763B0000. Process ManualEventLogger.exe (4932)
Module Load: oledlg.dll. No Debug Info. Base Address: $7DF70000. Process ManualEventLogger.exe (4932)
Module Load: borlndmm.dll. No Debug Info. Base Address: $21670000. Process ManualEventLogger.exe (4932)
I've been trying to use the UnderC library (gives c++ scripting functionality) in a program in Borland C++ Builder (in Windows XP), but it's giving me difficulties that I'm not sure how to fix. Other problems that've come up, I found solutions to them online, but this one is hard to describe with easily searchable words. I've added (to the compiler search path) the folder that contains the files needed - "ucdl.h" and "ucc12.lib" (C++ told me I needed to convert the .lib from coff to omf, so I did; it stopped giving me that error). I added the line #include "ucdl.h", and now it doesn't give me any error messages - but when I run it, the first thing it does is stop in the middle of the cpu debugging window, as though I had set a breakpoint. There are no break points. It doesn't give any reason as to why it stopped. If I have it continue running, it then gives me an access violation error. One thing that may or may not be useful - if, in the cpu debugger, I back up a line from where it paused, it reparses the visible assembly, and the line it was on is then shown to begin a byte earlier.
As the code runs from where it stops, as far as I can tell, to get to where it crashes, it goes (in the assembly code) from
___CRTL_VCL_Init into
___CRTL_VCL_Sharemem into
__roundToInt64(), at the following line:
00403204 FF25387B4000 jmp dword ptr [$00407b38]
This line is preceded and followed by many similar lines, pointing to adjacent memory locations. The address contained by the pointer is 0x00009B47, which appears to be out of the program's range or whatever, and thus gives an error. I'm not sure how to address this problem, since it doesn't give me any errors when it first stops (really weird), there's no source code associated with where it gives the error, and it seems to give the error in a VCL initialization area, and I don't know how the addition of a library would cause that. Any ideas, anyone?
Oh, also, it appears to pause just after loading borlndmm.dll, whereas a normal program keeps loading more dlls. The event log shows:
Thread Start: Thread ID: 3028. Process ManualEventLogger.exe (4932)
Process Start: C:\Documents and Settings\Matthew\My Documents\Borland Studio Projects\Cantrips\Manual Event Logger\Debug_Build\ManualEventLogger.exe. Base Address: $00400000. Process ManualEventLogger.exe (4932)
Module Load: ManualEventLogger.exe. Has Debug Info. Base Address: $00400000. Process ManualEventLogger.exe (4932)
Module Load: ntdll.dll. No Debug Info. Base Address: $7C900000. Process ManualEventLogger.exe (4932)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $7C800000. Process ManualEventLogger.exe (4932)
Module Load: vcl100.bpl. No Debug Info. Base Address: $52000000. Process ManualEventLogger.exe (4932)
Module Load: rtl100.bpl. No Debug Info. Base Address: $51F20000. Process ManualEventLogger.exe (4932)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $77120000. Process ManualEventLogger.exe (4932)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $77DD0000. Process ManualEventLogger.exe (4932)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77E70000. Process ManualEventLogger.exe (4932)
Module Load: Secur32.dll. No Debug Info. Base Address: $77FE0000. Process ManualEventLogger.exe (4932)
Module Load: GDI32.dll. No Debug Info. Base Address: $77F10000. Process ManualEventLogger.exe (4932)
Module Load: USER32.dll. No Debug Info. Base Address: $7E410000. Process ManualEventLogger.exe (4932)
Module Load: msvcrt.dll. No Debug Info. Base Address: $77C10000. Process ManualEventLogger.exe (4932)
Module Load: ole32.dll. No Debug Info. Base Address: $774E0000. Process ManualEventLogger.exe (4932)
Module Load: VERSION.dll. No Debug Info. Base Address: $77C00000. Process ManualEventLogger.exe (4932)
Module Load: MPR.dll. No Debug Info. Base Address: $71B20000. Process ManualEventLogger.exe (4932)
Module Load: IMAGEHLP.dll. No Debug Info. Base Address: $76C90000. Process ManualEventLogger.exe (4932)
Module Load: WSOCK32.dll. No Debug Info. Base Address: $71AD0000. Process ManualEventLogger.exe (4932)
Module Load: WS2_32.dll. No Debug Info. Base Address: $71AB0000. Process ManualEventLogger.exe (4932)
Module Load: WS2HELP.dll. No Debug Info. Base Address: $71AA0000. Process ManualEventLogger.exe (4932)
Module Load: OLEACC.dll. No Debug Info. Base Address: $74C80000. Process ManualEventLogger.exe (4932)
Module Load: MSVCP60.dll. No Debug Info. Base Address: $76080000. Process ManualEventLogger.exe (4932)
Module Load: MSIMG32.dll. No Debug Info. Base Address: $76380000. Process ManualEventLogger.exe (4932)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $5D090000. Process ManualEventLogger.exe (4932)
Module Load: SHELL32.dll. No Debug Info. Base Address: $7C9C0000. Process ManualEventLogger.exe (4932)
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $77F60000. Process ManualEventLogger.exe (4932)
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $73000000. Process ManualEventLogger.exe (4932)
Module Load: comdlg32.dll. No Debug Info. Base Address: $763B0000. Process ManualEventLogger.exe (4932)
Module Load: oledlg.dll. No Debug Info. Base Address: $7DF70000. Process ManualEventLogger.exe (4932)
Module Load: borlndmm.dll. No Debug Info. Base Address: $21670000. Process ManualEventLogger.exe (4932)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧...我搞乱了设置,我在 ucc12.dll (而不是 .lib)上使用了“将文件添加到您的项目”,然后选中了“复制本地”,它将文件复制到程序的本地目录...当时程序运行良好。所以,它现在起作用了……但我仍然不知道为什么会起作用,或者到底是什么导致了之前非常奇怪的行为。如果有人对此有任何想法,我很想知道。但至少现在该程序正在运行。
Ok...I was messing with the settings, and I used "add a file to your project" on ucc12.dll (as opposed to .lib), and then checked "copy local", which copies the file to the program's local directory...and the program worked fine that time. So, it works now...but I still have no idea why that worked, or what exactly was causing the very odd behavior before. If anybody has any ideas about that, I'd be interested to know. But at least the program's working, now.