--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThread.java 2018-06-28 21:55:40.724312906 +0900 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThread.java 2018-06-28 21:55:40.527317561 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,15 @@ // FIXME: size of data fetched here should be configurable. // However, making it so would produce a dependency on the "types" // package from the debugger package, which is not desired. - this.lwp_id = (int) addr.getCIntegerAt(0, 4, true); + int pid = (int)addr.getCIntegerAt(0, 4, true); + if (debugger instanceof LinuxDebuggerLocal) { + int hostPID = ((LinuxDebuggerLocal)debugger).getHostPID(pid); + if (hostPID != -1) { + pid = hostPID; + } + } + this.lwp_id = pid; + } LinuxThread(LinuxDebugger debugger, long id) {