Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Debugger Source File Lookup

Tim,

I don't understand how you could have this problem. Can you try to reproduce it with a simple project using stock CDT?

When the debugger looks for a file, it does so by using source locators. The source locators used for a debug session are the ones in the launch configuration (and any defined in the global preferences). The Absolute File Path is a locator which finds the file by looking for it at exactly the location specified in the specification. So if the specification is an absolute path, that locator looks for it at exactly that location.

The locators are used in the order in which they appear in the GUI, and the Absolute one is first, so your problem doesn't make sense to me. Thus, if you could help us reproduce it here, we can take a look and see if there's a bug abound.

Yes. You should be able to successfully share the .launch files if there are no absolute paths in it.

John

At 12:08 PM 3/18/2010, Tim Black wrote:
I had multiple main.cpp files in the project, and regardless of which launcher/debugger I used, eclipse always brought up the wrong file, one that appeared earlier alphabetically in the project structure. I found a workaround here: http://www.eclipse.org/forums/index.php?t=msg&&th=75411&goto=235528#msg_235528 . It seems the only way to fix it is if the ONLY entry in the Source Lookup Path in the Launch Configuration is Absolute File Path. If I subsequently add the project root to the Source Lookup Path, either before or after Absolute File Path, the problem returns.

I had thought that Source - "Search for duplicate source files on the path" or Debugger - "Use full file path to set breakpoints" would have corrected this lookup problem, but it didn't. http://www.eclipse.org/forums/index.php?t=msg&&th=164595&goto=521270#msg_521270 Should these settings be responsible for correcting the problem of resolving duplicate source file names in the debugger, instead of having to change the Default Source Lookup Path to Absolute File Path?

What does this Absolute File Path entry mean?

Why would source file resolution only work when it is the only item in the list?

I was leery of accepting anything mentioning an "absolute file path" bc my team shares eclipse project files and launch configuration files. I don't see any paths in the .launch files, so it appears safe to share .launch files with this setting. Do you agree?

Thanks!
Tim
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top