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

I do hit the breakpoint even when the launch configuration has only a Source Lookup Path. So, this is the first sign of trouble.

In a CDI-based debug session, the call stack is:
Thread [Worker-1] (Suspended (breakpoint at line 758 in org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector))       
         org.eclipse.cdt.debug.ui.sourcelookup.DefaultSourceLocator(org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector).getSourceElement(java.lang.Object) line: 758       
         org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.lookup(java.lang.Object, org.eclipse.debug.core.model.ISourceLocator) line: 148 
         org.eclipse.debug.ui.DebugUITools.lookupSource(java.lang.Object, org.eclipse.debug.core.model.ISourceLocator) line: 777 
         org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter$SourceLookupJob.run(org.eclipse.core.runtime.IProgressMonitor) line: 109 
         org.eclipse.core.internal.jobs.Worker.run() line: 54    

In a DSF-based session, it's
Thread [Worker-1] (Suspended (breakpoint at line 758 in org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector))       
         org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupDirector(org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector).getSourceElement(java.lang.Object) line: 758   
         org.eclipse.cdt.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter$LookupJob.performLookup() line: 192   
         org.eclipse.cdt.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter$LookupJob.run(org.eclipse.core.runtime.IProgressMonitor) line: 175    
         org.eclipse.core.internal.jobs.Worker.run() line: 54    

See if you can figure out why it's not getting in your scenario.
John

At 05:30 PM 3/18/2010, Tim Black wrote:
I tried both ways and wasn't hitting the bkpt. I am having success now, however, after changing my Source Lookup Path back to its Default. I.e. back to the way it was when the debugger was opening the wrong main.cpp. So, I hit the bkpt when Source Lookup Path is

Default
   Absolute File Path
   MyProject

and I don't hit the bkpt when Source Lookup Path is simply

Absolute File Path

OK, so I've hit the breakpoint in getSourceElement(Object element). I stepped over the line

List sources = doSourceLookup(element);

it took about 15 seconds and I can see that sources.elementData[0].path contains a relative path to the WRONG main.cpp file, like this: /projectName/a/b/c/src/main.cpp.

What next?
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top