RFR (L): 8241214: Test debugging of hidden classes using jdb
Please, review a fix for the sub-task: https://bugs.openjdk.java.net/browse/JDK-8241214 This fix has already been reviewed internally (in Vlahalla project) by Mandy, Chris and Alex. This RFR is to collect more comments (if there are any) before push. Webrev: http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/valhalla-hidden-jdb.7/ Summary: We want to be able to debug hidden classes with the debuggers. One way to test the JDI/JDWP is by using the JDB, so we want the JDB to support hidden classes. The PatternReferenceTypeSpec::checkClassName is used to check if the class is valid when a event requests is set in jdb. Good example is to set a breakpoint which can be deferred. The fix is to accept hidden class names as valid to be able to debug hidden classes with the JDB. New test is to provide basic coverage for JDB (amd JDI as well). It verifies that the following JDB commands handle hidden classes correctly: - class, classes - fields and methods - stop in, watch, unwatch - where, up and down - eval, print and dump for fields (both positive and negative checks) Testing: Mach5 test run of the vmTestbase_nsk_jdb is in progress. Thanks, Serguei
Re: RFR (L): 8241214: Test debugging of hidden classes using jdb
Looks good, Here are several comments, mostly about code style/compliance. No another review is needed if you want to fix them. http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/valhalla-hidden-jdb.7/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java.html 36 interface HC_Interface { The name HC_Interface is not "CamelCase". 82 log = new PrintStream("Debuggee.log"); This PrintStream is not closed. Should not be a problem int this case, just good style. Leonid On 4/22/20 11:22 AM, serguei.spit...@oracle.com wrote: Please, review a fix for the sub-task: https://bugs.openjdk.java.net/browse/JDK-8241214 This fix has already been reviewed internally (in Vlahalla project) by Mandy, Chris and Alex. This RFR is to collect more comments (if there are any) before push. Webrev: http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/valhalla-hidden-jdb.7/ Summary: We want to be able to debug hidden classes with the debuggers. One way to test the JDI/JDWP is by using the JDB, so we want the JDB to support hidden classes. The PatternReferenceTypeSpec::checkClassName is used to check if the class is valid when a event requests is set in jdb. Good example is to set a breakpoint which can be deferred. The fix is to accept hidden class names as valid to be able to debug hidden classes with the JDB. New test is to provide basic coverage for JDB (amd JDI as well). It verifies that the following JDB commands handle hidden classes correctly: - class, classes - fields and methods - stop in, watch, unwatch - where, up and down - eval, print and dump for fields (both positive and negative checks) Testing: Mach5 test run of the vmTestbase_nsk_jdb is in progress. Thanks, Serguei
Re: RFR (L): 8241214: Test debugging of hidden classes using jdb
Hi Leonid, Thank you for the review! I'll address your comments. Thanks, Serguei On 4/22/20 13:06, Leonid Mesnik wrote: Looks good, Here are several comments, mostly about code style/compliance. No another review is needed if you want to fix them. http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/valhalla-hidden-jdb.7/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java.html 36 interface HC_Interface { The name HC_Interface is not "CamelCase". 82 log = new PrintStream("Debuggee.log"); This PrintStream is not closed. Should not be a problem int this case, just good style. Leonid On 4/22/20 11:22 AM, serguei.spit...@oracle.com wrote: Please, review a fix for the sub-task: https://bugs.openjdk.java.net/browse/JDK-8241214 This fix has already been reviewed internally (in Vlahalla project) by Mandy, Chris and Alex. This RFR is to collect more comments (if there are any) before push. Webrev: http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/valhalla-hidden-jdb.7/ Summary: We want to be able to debug hidden classes with the debuggers. One way to test the JDI/JDWP is by using the JDB, so we want the JDB to support hidden classes. The PatternReferenceTypeSpec::checkClassName is used to check if the class is valid when a event requests is set in jdb. Good example is to set a breakpoint which can be deferred. The fix is to accept hidden class names as valid to be able to debug hidden classes with the JDB. New test is to provide basic coverage for JDB (amd JDI as well). It verifies that the following JDB commands handle hidden classes correctly: - class, classes - fields and methods - stop in, watch, unwatch - where, up and down - eval, print and dump for fields (both positive and negative checks) Testing: Mach5 test run of the vmTestbase_nsk_jdb is in progress. Thanks, Serguei