Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343861 - Project should not be required to perform debugging
Summary: Project should not be required to perform debugging
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 10:49 EDT by Marc Khouzam CLA
Modified: 2011-04-26 16:23 EDT (History)
3 users (show)

See Also:
marc.khouzam: review? (ken.ryall)


Attachments
Fix (11.21 KB, patch)
2011-04-26 15:27 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-04-26 10:49:43 EDT
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.
Comment 1 James Blackburn CLA 2011-04-26 14:04:50 EDT
+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.
Comment 2 Marc Khouzam CLA 2011-04-26 14:07:41 EDT
(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.
Comment 3 Doug Schaefer CLA 2011-04-26 15:01:32 EDT
> 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.
Comment 4 Marc Khouzam CLA 2011-04-26 15:27:12 EDT
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.
Comment 5 Marc Khouzam CLA 2011-04-26 15:29:53 EDT
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?