Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 225058

Summary: CDT can not stop at one of breakpoints which are set in two files with the same name
Product: [Tools] CDT Reporter: Benny <benny.wang>
Component: cdt-debug-cdi-gdbAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: benny.wang, elaskavaia.cdt, ken.ryall
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Benny CLA 2008-04-01 05:47:25 EDT
Build ID: M20070921-1145

Steps To Reproduce:
1. Create a Managed Make C++ project.
2. Create a folder named with A inside the project and create a file named with code.cpp inside A which stuff looks like below:

#include <iostream>

using namespace std;

namespace A {

void function() {
	cout << "A::function" << endl;
}


}

3. Create another folder named with B inside the project and create a file named with code.cpp inside B which stuff looks like below:

#include <iostream>

using namespace std;

namespace B {

void function() {
	cout << "B::function" << endl;
}


}

4. Create the main.cpp file inside the project which stuff looks like below:

namespace A {
extern void function();
}

namespace B {
extern void function();
}


int main() {
	A::function();	
	B::function();
	return 0;
}

5. Set line breakpoints in the function() in both code.cpp and start a debug session, CDT won't stop at the second breakpoint which is in B/code.cpp in this scenario.

More information:
I am using Red Hat Enterprise Linux WS release 3 (Taroon Update 7), GNU gdb Red Hat Linux (6.3.0.0-1.90rh)

Debug into CDT, I found the root cause is CDT use the filename:linenumber to set linebreakpoints instead of the full path of the file.
Comment 1 Elena Laskavaia CLA 2008-04-01 09:30:19 EDT
This is duplicate of bug 220045 if you using gdb MI
Comment 2 Ken Ryall CLA 2009-01-05 14:27:23 EST

*** This bug has been marked as a duplicate of bug 33045 ***
Comment 3 Elena Laskavaia CLA 2009-01-05 14:51:34 EST

*** This bug has been marked as a duplicate of bug 220045 ***