On Tue, 17 Oct 2023 19:54:24 GMT, Johannes Bechberger <jbechber...@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 test/jdk/com/sun/jdi/JdwpOnThrowTest.java line 121: > 119: private static String ATTACH_CONNECTOR = "com.sun.jdi.SocketAttach"; > 120: // cache socket attaching connector > 121: private static AttachingConnector attachingConnector; I would have expected a ListeningConnector to be used, so I'm a bit unsure how the attaching is working here and who is listening and who is initiating the connection. I don't understand some of these finer details of connectors and their args that well, but I would think that when using `onthrow` you would tell the debuggee what debugger port it should open the socket on, and the debugger would be listening on that port. Instead it seems you are telling the debuggee what port to listen on and the debugger is opening a socket on that port. Does that mean the open is done by the debugger before the debuggee even throws the exception, and that just leaves the debugger blocked on the open until the debuggee does an accept? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16145#discussion_r1362941211