RFR: 8262520: Add SA Command Line Debugger support to connect to debug server [v5]

Chris Plummer cjplummer at openjdk.java.net
Fri Mar 5 08:08:49 UTC 2021


On Fri, 5 Mar 2021 07:36:26 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> test/hotspot/jtreg/serviceability/sa/sadebugd/ClhsdbAttachToDebugServer.java line 95:
>> 
>>> 93:             out.shouldMatch("^java/lang/Object @0x[0-9a-f]+$"); // for "class java.lang.Object"
>>> 94:             out.shouldMatch("^java/lang/String @0x[0-9a-f]+$"); // for "class java.lang.String"
>>> 95:             out.shouldHaveExitValue(0);
>> 
>> I think you should do more error checking here. If you look at ClhsdbLauncher you will see:
>>         // This will detect most SA failures, including during the attach.
>>         oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$");
>>         // This will detect unexpected exceptions, like NPEs and asserts, that are caught
>>         // by sun.jvm.hotspot.CommandProcessor.
>>         oa.shouldNotMatch("^Error: .*$");
>> I think you could use something similar here.
>
> I added them in new commit.
> BTW I found out to check warnings which relate to `-Xcheck:jni` at ClhsdbLauncher. I did not add them to ClhsdbAttachToDebugServer because they are not the issue which relates to debug server. Is it ok?

No need for the `-Xcheck:jni` checks. I added that recently because we did have a bug, but I think we get more than enough testing with it already when running the ClhsdbLauncher tests.

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

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


More information about the serviceability-dev mailing list