Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » "Search for duplicate source files on the path" doesn't seem to be working with gdb launch("Search for duplicate source files on the path" doesn't seem to be working with gdb launch config)
"Search for duplicate source files on the path" doesn't seem to be working with gdb launch [message #521270] Tue, 16 March 2010 20:45 Go to next message
Eclipse UserFriend
I have more than one main.cpp under my project root. When I launch my Debug Launch Configuration, eclipse pulls up the wrong main.cpp. I can see that gdb is debugging the correct application, bc the variables and line number in main correspond to the correct main.cpp, but the eclipse debug view just opens the wrong file.

I have "Search for duplicate source files on the path" checked, and have tested this with many launch configs (using gdb, gdb/mi). I have deleted and recreated my workspace and have the same results. Also I can debug the same application from command line gdb w/ no problems.

Any ideas what is going wrong? What I can try to fix or workaround this problem?

Thanks,
Tim
Re: "Search for duplicate source files on the path" doesn't seem to be working with gdb la [message #521272 is a reply to message #521270] Tue, 16 March 2010 20:59 Go to previous messageGo to next message
Eclipse UserFriend
You can try to use DSF-GDB instead. To get to that other GDB integration, click on the hyperlink at the bottom of any of your launch tabs, and select "GDB (DSF) ..."

Or in your current launch's Debugger tab, you can try the "Use full file path to set breakpoints" and see if that helps.

Marc
Re: "Search for duplicate source files on the path" doesn't seem to be working with gdb la [message #521467 is a reply to message #521272] Wed, 17 March 2010 12:50 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Marc. I was using gdb/mi before. I tried checking "Use full file path to set breakpoints" while using the Standard Create Process Launcher. Same problem.

I switched my launcher to use gdb instead of gdb/mi and same problem.

I switched my launcher to use GDB (DSF) Create Process Launcher (which assumes gdb/mi debugger) and same problem.

All along the way, I checked to make sure that "Search for duplicate source files on the path" is checked.

Using any of the above launchers, if I rename the second main.cpp (which is alphabetically hit before the main.cpp I want on the path, and is not part of the executable I'm debugging) and launch, the correct main.cpp is opened.

Seems like "Search for duplicate source files on the path" isn't working, however unlikely. Another clue - I am using shared launcher file, not a local (temp) one. At one point I saved the launcher config file before/after changing "Search for duplicate source files on the path" just to make sure the change was actually reflected in the file and I did see an element added after.

Any more ideas?
Re: "Search for duplicate source files on the path" doesn't seem to be working with gdb la [message #521536 is a reply to message #521467] Wed, 17 March 2010 19:32 Go to previous messageGo to next message
Eclipse UserFriend
I'm not knowledgeable about this duplicate path thing, so if it seems like a bug, I'd open a bug in bugzilla.

Marc
Re: "Search for duplicate source files on the path" doesn't seem to be working with gdb la [message #521757 is a reply to message #521270] Thu, 18 March 2010 12:45 Go to previous message
Eclipse UserFriend
Found another thread here with a non-sensical yet effective workaround that works for me: http://www.eclipse.org/forums/index.php?t=msg&th=75411&a mp;start=0&

Still looking for an explanation, but let's do that on the other thread. I apologize for the redundancy.
Previous Topic:Macro Expansion
Next Topic:Is there a slicker way to build/run/debug external make targets?
Goto Forum:
  


Current Time: Fri Aug 01 12:46:21 EDT 2025

Powered by FUDForum. Page generated in 0.05552 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top