RFR: JDK-8317920: JDWP-agent sends broken exception event with onthrow option [v6]

Chris Plummer cjplummer at openjdk.org
Wed Oct 18 20:09:53 UTC 2023


On Tue, 17 Oct 2023 19:54:24 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> Fix `onthrow` issue by passing the event info to the `initialize` method.
>> 
>> This prevents `jdb` from receiving a broken exception event and throwing an internal NullPointerException, upon attaching to the JDWP-agent.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add suggested modification

Changes look good. I'm approving, but I think also @RealCLanger should re-review since a lot has changed since his review, including the addition of the test.

test/jdk/com/sun/jdi/JdwpOnThrowTest.java line 64:

> 62:         int port = findFreePort();
> 63:         try (Debuggee debuggee = Debuggee.launcher("ThrowCaughtException").setAddress("localhost:" + port)
> 64:                                          .enableOnThrow("Ex", "Start").setSuspended(true).launch()) {

It's interesting that Debuggee.enableOnThrow() was already implemented for you, but there are no other users of it.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16145#pullrequestreview-1686045894
PR Review Comment: https://git.openjdk.org/jdk/pull/16145#discussion_r1364475589


More information about the serviceability-dev mailing list