Community
Participate
Working Groups
Currently, DSF-GDB supports debugging a binary that is anywhere on the filesystem. That binary need not be part of a project in Eclipse. However, we still require that the user provide a bogus project. Instead, if the binary is an absolute path, we should not require a project to be specified. The idea is to make it possible and easy for someone to use eclipse to debug something without having to write the code in Eclipse.
+1. We do this today in CDI using number of hacks (as IProject isn't really needed there either...). I suspect you'll need a good test as I've found that assumption on the project being non-null can easily and accidentally be re-added. People seem to do this a lot, so DSF-GDB support would be good.
(In reply to comment #1) > +1. We do this today in CDI using number of hacks (as IProject isn't really > needed there either...). I suspect you'll need a good test as I've found that > assumption on the project being non-null can easily and accidentally be > re-added. > > People seem to do this a lot, so DSF-GDB support would be good. Thanks for the feedback. I'll add a JUnit test for it; however, we don't have UI JUnit tests, and I am also worried that someone will re-introduce such a check. In fact, it happened this year already, for the limited support we already had.
> I'll add a JUnit test for it; however, we don't have UI JUnit tests, and I am > also worried that someone will re-introduce such a check. In fact, it happened > this year already, for the limited support we already had. We have the capability to run UI tests. The build machine has a vncserver that will host the UI. We just need a good UI test strategy. I notice the LinuxTools gang already have one.
Created attachment 194093 [details] Fix This patch allows for project-less debugging for: 1- local session 2- remote session (manual or automatic delegate) 3- postmortem session Attach and remote attach sessions were already providing this feature. Also, I changed the JUnit test delegate to no longer override the checking of the project. Since the JUnit tests don't use a project, we'll know right away if project-less debugging gets broken.
Committed to HEAD. Anyone is welcome to review, but I think Ken was the last one playing around with the launch delegates. Ken, when you have time, can you review?
*** cdt cvs genie on behalf of mkhouzam *** Bug 343861: Project should not be required to perform debugging [*] LaunchUtils.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java?root=Tools_Project&r1=1.18&r2=1.19 [*] GdbLaunchDelegate.java 1.23 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java?root=Tools_Project&r1=1.22&r2=1.23 [*] TestLaunchDelegate.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/launching/TestLaunchDelegate.java?root=Tools_Project&r1=1.4&r2=1.5 [*] CMainTab.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java?root=Tools_Project&r1=1.14&r2=1.15 [*] RemoteCDSFMainTab.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java?root=Tools_Project&r1=1.3&r2=1.4 [*] RemoteGdbLaunchDelegate.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java?root=Tools_Project&r1=1.1&r2=1.2