Community
Participate
Working Groups
Build Identifier: Eclipse I20100420-0800, CDT HEAD The is a DSF-CDI parity bug. The DSF Disassembly part does not present interleaved source code when stepping into external library code. When using a DSF launcher, the following error is logged: !ENTRY org.eclipse.cdt.dsf.ui 2 0 2010-04-26 13:15:36.704 !MESSAGE Unable to locate file: /path/to/source/code/outside/workspace/myfile.c I am fairly sure that the older CDI Disassembly view (CDT 6.0) used to present the interleaved source code correctly in these circumstances but I have not verified this. I think this issue may arise because DisassemblyPart#insertSource() does not handle the case where "sourceElement" is an instance of "ExternalTranslationUnit". When using a CDI launcher to debug the same code, I see an exception: !ENTRY org.eclipse.ui 4 0 2010-04-26 13:37:06.891 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.AssertionError: missing support for source element of type class org.eclipse.cdt.internal.core.model.ExternalTranslationUnit) at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3162) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2582) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2546) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2395) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:665) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:658) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) Caused by: java.lang.AssertionError: missing support for source element of type class org.eclipse.cdt.internal.core.model.ExternalTranslationUnit at org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi.insertDisassembly(DisassemblyBackendCdi.java:504) at org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi.access$1(DisassemblyBackendCdi.java:439) at org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi$2.done(DisassemblyBackendCdi.java:275) at org.eclipse.cdt.debug.internal.ui.disassembly.dsf.CDIDisassemblyRetrieval$1.run(CDIDisassemblyRetrieval.java:87) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 23 more I am not clear whether this exception is caused by the same issue as the "Unable to locate file" message or whether it is a separate issue. Reproducible: Always Steps to Reproduce: 1. Build a C/C++ application which uses an external library containing debug symbols. 2. Launch a debug session with a DSF launcher and step into an external library function. 3. Observe no source code in the Disassembly view. 4. Launch a debug session with a CDI launcher and step into an external library function. 5. Observe an exception.
Created attachment 166300 [details] Fix Attached patch adds handling for ITranslationUnits as source element type returned by source lookup. Could you try if this fixes the issue for you?
(In reply to comment #1) > Could you try if this fixes the issue for you? Initial testing indicates that the patch fixes the reported issue for both CDI and DSF launches. Thank you.
Fixed in HEAD.