Bug 345685 - Open wrong file when debugging if there is a file with same name of source file in workspace
Summary: Open wrong file when debugging if there is a file with same name of source fi...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 7.0.2   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 02:08 EDT by harry gao CLA
Modified: 2020-09-04 15:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description harry gao CLA 2011-05-13 02:08:49 EDT
if there is a file with same name of source file in workspace like below, the debugging process will open that file, which not belongs the current project, instead of the source file in project.

cpp                               [the workspace]
|-- HelloDebug                    [the project]
|   |-- Debug
|   |   |-- HelloDebug
|   |   |-- makefile
|   |   |-- objects.mk
|   |   |-- sources.mk
|   |   `-- src
|   |       |-- HelloDebug.d
|   |       |-- HelloDebug.o
|   |       `-- subdir.mk
|   `-- src
|       `-- HelloDebug.c          [the source file]
`-- src                           [not belongs to any project]
    `-- HelloDebug.c              [the file has same name with source file in the project]

Steps to reproduce:
(1)Create a new C Project (HelloDebug in the above)
(2)Copy the src folder out to the workspace
(3)Insert a breakpoint and start debug
(4)The file outside the project will be open

Note:
If change the outside folder's name (src to src2 or whatever else), then everything seems to be fine again.