Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Debugging a Cmake project

Andrea,

I just installed Ubuntu 10.10 and tried again. It seems to work fine. Which JRE are you using? Also, can you try using the Generic Remote Launch resource manager instead of MPICH2?

Thanks,
Greg


On Dec 22, 2010, at 9:56 AM, Andrea Maesani wrote:

Hi Greg,

yes I'm using Linux (Ubuntu 11.04, kernel 2.6.35-23-generic).
I tried your test, I get exactly the same problem as using Cmake,
The text editor cannot find the source file.

Regards,
Andrea

2010/12/22 Greg Watson <g.watson@xxxxxxxxxxxx>
Hi Andrea,

Are you using Linux?

I tried the following:

1. Create a directory with build and src subdirs.
2. Create test.c in src and Makefile in build. The Makefile contains:

all:
       gcc -g -o test ../src/test.c

3. cd build, then run make
4. Import into Eclipse using "Existing Code as a MakefileProject" import wizard
5. Create a debug configuration and launch

This works fine for me.

Can you check that the -g option is being used for the build?

Regards,
Greg

On Dec 22, 2010, at 8:16 AM, Andrea Maesani wrote:

> Hello,
>
> I have a problem debugging a Cmake project with the Parallel Debugger.
>
> The structure of the project folders is as follows:
> /build
> /src (source code)
>
> I created the eclipse project from the /build folder calling
> # cd build
> # cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../src
> and then importing the project in Eclipse.
>
> I try to debug the project using a local installation of MPICH2.
> Whenever I try to debug my project, the debugger starts, but the IDE throws an error
> "Could not open the editor: Editor could not be initialized."
> It seems that the parallel debugger has problems finding the source files.
>
> Compiling and debugging the example C++ "MPI Pi C++ project" works fine for me,
> so probably it's a specific problem with the project file generated by cmake.
>
> The cmake version i have installed is 2.8.2.
> Eclipse Version: Helios Service Release 1, Build id: 20100917-0705
> PTP 4.0.5.201011100956
>
> The following exception appears in the text editor:
> java.lang.NullPointerException
>     at org.eclipse.cdt.internal.ui.
> editor.CEditor.updateScalabilityMode(CEditor.java:1412)
>     at org.eclipse.cdt.internal.ui.editor.CEditor.doSetInput(CEditor.java:1359)
>     at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
>     at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
>     at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
>     at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
>     at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>     at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
>     at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
>     at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
>     at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
>     at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
>     at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
>     at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
>     at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
>     at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
>     at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
>     at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
>     at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
>     at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
>     at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>     at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
>     at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
>     at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$1.run(SourceLookupFacility.java:352)
>     at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>     at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:362)
>     at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:276)
>     at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display(SourceLookupFacility.java:219)
>     at org.eclipse.debug.ui.DebugUITools.displaySource(DebugUITools.java:792)
>     at org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter$SourceDisplayJob.runInUIThread(StackFrameSourceDisplayAdapter.java:155)
>     at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
>     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>     at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
>     at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
>     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
>     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
>     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
>     at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
>     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)
>
> Thanks,
> Andrea
> _______________________________________________
> ptp-user mailing list
> ptp-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-user

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user


Back to the top