当前位置: 动力学知识库 > 问答 > 编程问答 >

gdb - Debugging C++ in Eclipse with files with same name

问题描述:

In my source tree, I have some files with duplicate names. Not really a problem since they are isolated per platform, i.e. "FileReader.cpp" exists in android/ and linux/ but when building for linux, the android/ directory is never touched.

Now, when debugging within Eclipse (on Linux) Eclipse opens up the wrong file! Not quite sure how, since it seems that GDB is sending the full pathname.

Any ideas ? I know I can get around this by renaming the file, but I'd rather not.

网友答案:

You probably worked this out by now :)

The correct answer is here http://www.eclipse.org/forums/index.php/m/636687/:

In your Debug Launch Configuration in the Source tab you should remove the Default source lookup path. And then add Absolute path. This will ensure that Eclipse use absolut filenames to set breakpoints.

分享给朋友:
您可能感兴趣的文章:
随机阅读: