关于将windbg用于从Labview调用的dll的问题

发布于 2024-08-09 16:39:52 字数 425 浏览 9 评论 0原文

我正在尝试调试由 Labview 应用程序调用的 dll。我有正确的符号文件(从微软下载),用于 ntdll.dll 等。当然,我还有 DLL 的 pdb 文件。显然,我没有任何用于labview的符号文件;因为据我所知,National Instruments 没有发布。

我尝试了一个简单的测试应用程序,从windbg.exe 中调用dll。这效果很好。当我将labview添加到混合中时,windbg当然开始给出错误:未找到所有labview内容的符号文件。我确信我设置了正确的符号文件目录,并且也设置了源文件夹。我是 Windbg 的新手,但我开始收集它,除非您拥有所有需要使用它的符号文件。这是正确的吗?如果是这样,我想它又回到了 fprintf 和有限的调试。

我不想使用 Visual Studio,因为这是半嵌入式应用程序,它根本没有磁盘空间/空间来容纳所有 Visual Studio。

I am attempting to debug a dll that is called by a Labview application. I have the right symbol files (downloaded from microsoft) for things like ntdll.dll and others. I of course also have the pdb file for my DLL. What I don't have, obviously, is any symbol files for labview; since as far as I know National Instruments does not release.

I have tried a simple test app calling a dll from within windbg.exe. This works well. When I add labview into the mix windbg of course starts giving ERROR: Symbol file not found for all the labview stuff. I am sure I have the right symbol file directories set and source folders are set as well. I am sort of a newb to windbg, but I'm starting to gather that unless you have ALL the symbol files you're hosed on using it. Is that correct? If so I guess it's back to fprintf and limited debugging.

I don't want to use visual studio because this is for a semi embedded application and it simply doesn't have the disk space/room for holding all of visual studio.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

染墨丶若流云 2024-08-16 16:39:53

如果您只打算在 DLL 中设置断点和其他内容,那么您不一定会被淹没。那应该可以正常工作。从 DLL 回到 LabVIEW 图像的堆栈跟踪将开始抱怨,但希望这是您不感兴趣的东西,您可以忽略它。

You won't necessarily be hosed if you're only planning on setting breakpoints and whatever in your DLL. That should work fine. Stack traces from your DLL back into the LabVIEW image will start complaining, but hopefully it's stuff you're not interested in anyway and you can just ignore it.

你在我安 2024-08-16 16:39:53

您需要将windbg附加到LabVIEW进程,然后在DLL代码中设置断点。这样,只有当它到达您的代码时才会中断。这就是它在 Visual Studio 中的工作方式,快速搜索似乎表明它也可以与 Windbg 一起工作。

You need to attach the windbg to the LabVIEW process, then set a breakpoint in your DLL code. This way, you will only break when it gets to your code. This is how it works from Visual Studio and a quick search seems to suggest it will work with windbg as well.

掐死时间 2024-08-16 16:39:53

您还可以在 Windbg 中设置断点,以便在加载 DLL 后立即中断。为此,请将windbg附加到Labview进程并使用以下命令:sxe ld foo(其中foo是您的dll的名称)。这告诉调试器在 dll 加载事件发生时中断,特别是对于您的 dll。请参阅 http://msdn.microsoft.com/en-us/library/cc266379 .aspx 了解更多信息。当您遇到此断点时,您可以找出要在代码中中断的符号以进行调试。

You can also set a breakpoint in windbg to break as soon as your DLL is loaded. To do this, attach windbg to the Labview process and use the following command: sxe ld foo(where foo is the name of your dll). This tells the debugger to break when the dll load event occurs, specifically for your dll. See http://msdn.microsoft.com/en-us/library/cc266379.aspx for more info. When you hit this breakpoint you can then figure out which symbol you would like to break on within your code to debug.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文