使用GDB调试Intel编译的项目 [英] Debugging Intel Compiled Project with GDB

查看:64
本文介绍了使用GDB调试Intel编译的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Code :: Blocks IDE中有一个简单的Hello World项目,我正在使用Intel C ++编译器进行编译.

I've got a simple Hello World project in the Code::Blocks IDE which I'm compiling using the Intel C++ compiler.

我已经在项目构建设置"中设置了编译器选项"/Zi",以便可以使用断点调试应用程序.但是,永远不会达到断点. 看来在对象中找不到调试符号.

I've set the compiler option '/Zi' in the projects Build Settings so I can debug the application with breakpoints. However no breakpoints are ever reached. It appears that no debugging symbols can be found within the object.

但是,当我更改为使用gcc编译器时,它们可以正确到达.

They are correctly reached when I change to use the gcc compiler however.

我在这里想念什么?这不应该按原样工作吗?

What am I missing here? Shouldn't this work as is?

[更新]

似乎可以在Linux上运行,但不能在Windows上运行.我使用英特尔编译器和正确的编译器选项对一个简单的项目进行了相同的测试,并且可以达到断点. Windows是否有某些原因会造成问题?

Seems to work on Linux but not on Windows. I ran the same sort of test a simple project with Intel compiler and the correct compiler option and I could reach breakpoints. Is there some reason Windows would have a problem?

推荐答案

Windows是否有某些原因会导致问题?

Is there some reason Windows would have a problem?

在UNIX上,调试信息通常是完整记录的,并且通常是标准的(例如Linux使用 DWARF ).

On UNIX, the debug info is usually completely documented, and often standard (e.g. Linux uses DWARF).

在Windows上,Microsoft编译器使用.PDB文件(程序数据库),这些文件完全没有记录和专有. GDB无法使用它们.

On Windows, Microsoft compilers use .PDB (Program Database) files, which are completely undocumented and proprietary. GDB can't use them.

我不知道英特尔编译器会生成哪种调试信息格式,但是idb只能理解 格式.

I don't know what debug info format Intel compiler generates, but chances are that format is only understood by idb.

有效地,您不能将GDB与任何Microsoft或Intel编译器混合使用.

Effectively then, you can't mix and match GDB with any of the Microsoft or Intel compilers.

这篇关于使用GDB调试Intel编译的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆