Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282830

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

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 19
    • core-svc
    • None
    • behavioral
    • minimal
    • This is a new option, so there is no compatibility risk.
    • add/remove/modify command line option
    • JDK

      Summary

      Add jdb support for -R<option>, which will pass <option> when launching the debuggee JVM.

      Problem

      jdb can optionally launch the debuggee process rather than attaching to an already running process. When launching, there are some java command line options the jdb user can choose to pass to the debuggee process. Examples include -classpath and -D<property>. However, this list of supported options is a rather small fixed set that jdb is aware of.

      Solution

      Add support for -R<option> to pass any <option> to the debuggee process. jshell also passes arguments to the debuggee by using -R, so it seems to be a good precedent to follow.

      Specification

      jdb help output for -R:

      -R<option>        forward <option> to debuggee process if launched by jdb, otherwise ignored

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: