RFR: 8262520: Add CLHSDB command to connect to debug server
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Mon Mar 1 23:57:41 UTC 2021
On Mon, 1 Mar 2021 21:06:34 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> You'll need a CSR for this.
Ok, I will add it after this discussion ( `coonect` or `attach` )
> Will `jhsdb clhsdb --connect debugserver` work? If not, it should to be consistent with the other commands.
It does not work. CLHSDB and HSDB do not accept '--connect'. I plan to add it after this PR.
> Does `detach` undo the `connect`?
Yes.
> It's not very symetric if we do since we already had `attach` + `detach` and now you added `connect` + `detach`. Since you can `attach` to a pid or a core file, maybe instead of adding `connect` you should just put the debugd support in `attach`.
I thought `connect` command is easy to understand because it is similar with `--connect` option in jhsdb, and also the change is smaller than adding to `attach` because `attach` already has 1 string argument (PID).
I'm not familiar of network, but I concern hostname which is configured by numeric chars only - I'm not sure it is allowed, but [RFC 1123](https://tools.ietf.org/html/rfc1123) allows digit character at the first.
The syntax of a legal Internet host name was specified in RFC-952
[DNS:4]. One aspect of host name syntax is hereby changed: the
restriction on the first character is relaxed to allow either a
letter or a digit. Host software MUST support this more liberal
syntax.
If digit hostname (e.g. 1234) is allowed, we cannot add debugd support to `attach` because we cannot distinguish it is PID or hostname. If so, it is reasonable to add `connect` command for this purpose.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2773
More information about the serviceability-dev
mailing list