Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337687 - Support for MI command -exec-arguments
Summary: Support for MI command -exec-arguments
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: 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-02-21 03:38 EST by Abeer Bagul CLA
Modified: 2011-02-25 16:23 EST (History)
4 users (show)

See Also:


Attachments
Initial patch (3.49 KB, patch)
2011-02-21 03:43 EST, Abeer Bagul CLA
no flags Details | Diff
Patch with @since 4.0 tags (3.52 KB, patch)
2011-02-22 23:08 EST, Abeer Bagul CLA
no flags Details | Diff
Patch using IMIContainerDMContext (3.48 KB, patch)
2011-02-25 04:29 EST, Abeer Bagul CLA
marc.khouzam: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Abeer Bagul CLA 2011-02-21 03:38:14 EST
DSF-GDB is missing support for a MI command which was supported in CDI:
-exec-arguments

The corresponding CDI class was org.eclipse.cdt.debug.mi.core.command.MIExecArguments, and we need a similar class in DSF.

The accompanying patch contains a class org.eclipse.cdt.dsf.mi.service.command.commands.MIExecArguments and a corresponding method createMIExecArguments() in CommandFactory.

Could not figure out what should be the value of the @since tag, some help would be very appreciated.

This bug can also be classified under the CDI - DSF feature parity effort.
Comment 1 Abeer Bagul CLA 2011-02-21 03:43:55 EST
Created attachment 189395 [details]
Initial patch
Comment 2 Marc Khouzam CLA 2011-02-21 09:18:50 EST
I have nothing against this, but I'm just curious to know if there is a reason you don't want to use MIGDBSetArgs.  That is what we use in DSF-GDB and looking at the GDB source code, it is identical to -exec-arguments.

To be honest, I don't why DSF-GDB uses -gdb-set args instead of -exec-arguments.

For the patch, -exec-arguments should be made process-specific (using a IMIContainerDMContext instead of IControlDMC).  This is a very recent change I have made to MIGDBSetArgs
Comment 3 Marc Khouzam CLA 2011-02-21 09:39:08 EST
(In reply to comment #2)
> For the patch, -exec-arguments should be made process-specific (using a
> IMIContainerDMContext instead of IControlDMC).  This is a very recent change I
> have made to MIGDBSetArgs

See Bug 337602 about this.
Comment 4 Abeer Bagul CLA 2011-02-22 06:17:12 EST
Actually, I noticed MIGDBSetArgs exactly after filing this bug. Wanted to have MIExecArguments because we are porting our old launches based on CDI to DSF, and the old launches use MIExecArguments (the CDI one).

If both these commands are identical, guess it would be perfectly fine to use MIGDBSetArgs instead. 

Lack of MIExecArguments will only be noticed by people trying to port their launch from CDI to DSF, since MIGDBSetArgs is not available in CDI. Maybe there can be some documentation by which we can come to know that MIGDBSetArgs can be used in place of MIExecArguments.

If you are ok with having MIExecArguments also, I will update the patch to use IMIContainerDMContext.
Comment 5 Marc Khouzam CLA 2011-02-22 09:18:35 EST
(In reply to comment #4)

> If you are ok with having MIExecArguments also, I will update the patch to use
> IMIContainerDMContext.

What I like about -gdb-set args is that there is a corresponding -gdb-show args, which is useful when debugging.  Although -gdb-show args can be used with -exec-arguments, I just felt that it made more sense to use -gdb-set args.

That being said, I think it is fine to add the class MIExecArguments, and put a comment in the javadoc to say MIGDBSetArgs does the same thing.  That will give users the choice.

If you can update the patch, I will commit it.
Please put your copyright name and bug number at the top of each file.

Thanks
Comment 6 Abeer Bagul CLA 2011-02-22 23:08:58 EST
Created attachment 189573 [details]
Patch with @since 4.0 tags
Comment 7 Abeer Bagul CLA 2011-02-22 23:10:29 EST
Have updated the patch with @since 4.0 tags, copyright name and bug number.
Comment 8 Marc Khouzam CLA 2011-02-23 08:55:49 EST
(In reply to comment #7)
> Have updated the patch with @since 4.0 tags, copyright name and bug number.

You didn't want to change the patch to use IMIContainerDMContext?
Comment 9 Abeer Bagul CLA 2011-02-25 04:29:44 EST
Created attachment 189781 [details]
Patch using IMIContainerDMContext

Sorry for the oversight. 
Updated the patch to use IMIContainerDMContext instead of ICommandControlDMContext.
Comment 10 Marc Khouzam CLA 2011-02-25 15:26:43 EST
Committed to HEAD.

Thanks Abeer.