On Wed, 7 Sep 2022 06:35:23 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java line 
>> 600:
>> 
>>> 598:             case JDWP.Error.THREAD_NOT_ALIVE:
>>> 599:                 throw new IncompatibleThreadStateException(
>>> 600:                                      "Thread has not started or has 
>>> finished");
>> 
>> When doing anything here we have to take into account that the debugger (or 
>> JDI tool) may be connected to a target VM on an older or newer release. So 
>> if I read the issue correctly, the reply to the 
>> ThreadReference/ForceEarlyReturn command never returned THREAD_NOT_ALIVE so 
>> it's okay to remove the mapping to IncompatibleThreadStateException.
>
>> So if I read the issue correctly, the reply to the 
>> ThreadReference/ForceEarlyReturn command never returned THREAD_NOT_ALIVE so 
>> it's okay to remove the mapping to IncompatibleThreadStateException.
> 
> It was not some recent change in the debug agent that eliminated returning 
> THREAD_NOT_ALIVE.  However, I can't say for sure that it has never returned 
> it. In fact I would assume at some point it did return it, but that could be 
> as far back as the JVMDI days.

BTW, if any command gets a THREAD_NOT_ALIVE, the following is done:

`                return new InternalException("Unexpected JDWP Error: " + 
errorCode, errorCode);`

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

PR: https://git.openjdk.org/jdk/pull/10189

Reply via email to