RFR(XS): 7154809 JDI: update JDI/JDB debugee commandline option parsing (allow nested comma delimited options) + sponsor request
Dmitry Samersoff
Dmitry.Samersoff at oracle.com
Tue Mar 27 03:01:12 PDT 2012
On 2012-03-27 13:58, Dmitry Samersoff wrote:
> Markus,
>
> Your changes strip comma in the middle of argument as well:
Sorry mistyping! s/comma/quote/
> Your changes strip quote in the middle of argument as well:
-Dmitry
>
> i.e.
>
> String value="\'Bl\"a\'";
> System.out.println( value.replaceAll("['\"]", "") );
>
> Prints: Bla
>
> Is it intentional?
>
> -Dmitry
>
>
> On 2012-03-27 12:49, Markus Grönlund wrote:
>> Hi all,
>>
>>
>>
>> I would like to ask for a review:
>>
>>
>>
>> Webrev: http://cr.openjdk.java.net/~mgronlun/7154809/webrev01/
>>
>>
>>
>> Bug/CR: 7154809 JDI: update JDI/JDB debugee commandline option parsing
>> (allow nested comma delimited options)
>>
>> (bug is not yet published on bugs.sun.com, I am attaching a copy of the
>> bug description to the mail below)
>>
>>
>>
>> Synopsis: 7154809 JDI: update JDI/JDB debugee commandline option parsing
>> (allow nested comma delimited options)
>>
>>
>>
>> Description:
>>
>> Passing in a double quoted value, such as "-XX:+PrintVMOptions" to the
>> debugee works today. But only because double-quoted options can be
>> passed directly onto the actual VM command-line (where it is stripped by
>> the VM). What does not work is passing the debugee single-quoted values
>> such as '-XX:+PrintVMOptions', although the regexp in VMConnection works
>> ok for proper comma-delimting of option separation. However, single
>> quoted values cannot be passed on directly to the VM, since the VM does
>> not strip these single quotes. Also, values which are contained inside
>> nested quotes like “” value “” and “’ value ‘” will not work for the
>> same reason.
>>
>>
>>
>> To allow for more flexibility in passing delimited values (which needs
>> to be quoted), VMConnection should strip out any quote qualifiers
>> (single and/or double quotes) before passing the options onto the VM.
>> Besides adding more flexibility in option passing, this also allows for
>> more reliable command-line argument handling/processing, as options are
>> always passed non-quoted to the VM.
>>
>>
>>
>> Small fix to VMConnection.java is considered safe and backwards compatible.
>>
>>
>>
>> I would also kindly ask for a sponsor to help me with this putback.
>>
>>
>>
>> Thank you
>>
>> Markus
>>
>>
>>
>>
>>
>
>
--
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...
More information about the serviceability-dev
mailing list