Page MenuHomePhabricator

Move argument globbing to Target::Launch from Platform::LaunchProcess.

Authored by sivachandra on Feb 18 2015, 5:38 PM.



This way, the process will recieve globbed arguments even if it was
launched via the process plugin.

Diff Detail

Event Timeline

sivachandra retitled this revision from to Move argument globbing to Target::Launch from Platform::LaunchProcess..
sivachandra updated this object.
sivachandra edited the test plan for this revision. (Show Details)
sivachandra added a subscriber: Unknown Object (MLST).
zturner edited edge metadata.Feb 18 2015, 6:01 PM

Will let Enrico comment on the overall correctness of this. I'll just mention that I pushed a change to the original version of this that added some stuff for fixing Windows paths. You'll likely get a merge conflict when you rebase. Please make sure the changes I made stay in, because they will be needed for Windows even with this patch.

emaste added a subscriber: emaste.Feb 18 2015, 7:12 PM
ovyalov accepted this revision.Feb 19 2015, 9:38 AM
ovyalov edited edge metadata.

Looks good to me - could you check whether this test passes remotely Linux<->Linux?

This revision is now accepted and ready to land.Feb 19 2015, 9:38 AM

Thanks for the review ovyalov and zturner.

I will test remote Linux->Linux and report.

sivachandra edited edge metadata.

Rebase to take in windows related changes.

Per the current design, the globbing feature will not work for remote debugging. Enrico has mentioned that he is working on the generalizing this feature. Until then, I do not see any harm in putting this in. Will commit shortly.

Enrico, will your planned changes address the original issue? Namely, that
if a process is launched through the process plugin with the
eLaunchFlagGlobArguments flag set, after your changes will the arguments
correctly go through the globber first?

I saw Zach's question while I typing a similar one.

There's currently a lot of ways to launch processes, and the interactions
that lead to specific methods being chosen can be a bit confusing sometimes.

Out of curiosity, if a plugin supports launching under a debugger directly,
why is the separate start stopped / attach / resume algorithm used? It
seems more straightforward.

If someone gets themselves through that codepath, argdumper won't be used.
Which is confusing if you're outside looking in at the API. From the
outside you just see the process gets launched using a supported mechanism
for launching processes, and it ignores the flag.

sivachandra abandoned this revision.Feb 20 2015, 2:39 PM

Abandoning this in favor other solutions proposed on the mailing list.