RFR: 8282691: add jdb "-R" option for passing any argument to the launched debuggee process

Chris Plummer cjplummer at openjdk.java.net
Fri Mar 11 02:15:45 UTC 2022


On Sun, 6 Mar 2022 20:35:04 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>>> `jshell --enable-preview` allows developers to use preview features in the REPL, having `jdb --enable-preview` and passing it through to the launching debugee would be useful too.
>> 
>> Is that the same as `-R--enable-preview` or `-J--enable-preview`? The help output isn't clear. It list the following options, which at first glance look like they would apply to the target process, but than that's also what `-R` is for:
>> 
>>     --class-path <path>   Specify where to find user class files
>>     --module-path <path>  Specify where to find application modules
>>     --add-modules <module>(,<module>)*
>>                           Specify modules to resolve, or all modules on the
>>                             module path if <module> is ALL-MODULE-PATHs
>>     --enable-native-access
>>                           Allow code to run restricted native methods
>>     --enable-preview      Allow code to depend on preview features of this release
>
>> Is that the same as `-R--enable-preview` or `-J--enable-preview`? The help output isn't clear. It list the following options, which at first glance look like they would apply to the target process, but than that's also what `-R` is for:
> 
> jshell compiles code snippets at runtime so it --enable-preview is used with the compile (along with --release or --source I assume) and also added to the options specified to the debuggee, so -R.
> 
> In the case of jdb then I think we want --enable-preview passed through to debuggees that jdb starts launching connectors, so I a bit like jshell -R.

@AlanBateman and @kevinjwalls Could both of you please officially review the `-R` changes. The PR says your review was for the original version of this PR, not the update. Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7708


More information about the serviceability-dev mailing list