RFR: 8282691: add jdb "-R" option for passing any argument to the launched debuggee process [v2]
Chris Plummer
cjplummer at openjdk.java.net
Tue Mar 8 19:41:00 UTC 2022
On Tue, 8 Mar 2022 19:16:54 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java line 480:
>>
>>> 478: " -tclient run the application in the HotSpot(TM) Client Compiler\n" +
>>> 479: " -tserver run the application in the HotSpot(TM) Server Compiler\n" +
>>> 480: " -R<option> Forward <option> to debuggee process\n" +
>>
>> The existing description start with a lowercase character so probably best to keep that consistent.
>>
>> Also maybe it should make it clear that the options are forwarded to the debuggee then it is launched by jdb, the option is otherwise ignored.
>
>> There is some magic that lets us add "--add-modules", then "jdk.attach" separately, but retrieve them later as "--add-modules=jdk.attach" in the test. I don't see what is doing that, so I ran it and verified the test works.
>
> Yes, there is some magic. No, I don't know where it's done. It seems it must be done by the launcher somewhere, but I can't find it. But the hotspot arguments.cpp does expect it:
>
>
> } else if (match_option(option, "--add-modules=", &tail)) {
> if (!create_numbered_module_property("jdk.module.addmods", tail, addmods_count++)) {
> return JNI_ENOMEM;
> }
>
> I don't see any checks for `--add-modules` without the `=`.
ok
-------------
PR: https://git.openjdk.java.net/jdk/pull/7708
More information about the serviceability-dev
mailing list