agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8000973 Cdiff agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java

agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java

Print this page
8000973: SA on windows thread inspection is broken

*** 1,7 **** /* ! * Copyright (c) 2005, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2005, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 32,55 **** private WindbgDebugger debugger; private long sysId; private boolean gotID; private long id; ! /** The address argument must be the address of the HANDLE of the ! desired thread in the target process. */ WindbgAMD64Thread(WindbgDebugger debugger, Address addr) { this.debugger = debugger; ! // 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. ! ! // another hack here is that we use sys thread id instead of handle. ! // windbg can't get details based on handles it seems. ! // I assume that osThread_win32 thread struct has _thread_id (which ! // sys thread id) just after handle field. ! ! this.sysId = (int) addr.addOffsetTo(debugger.getAddressSize()).getCIntegerAt(0, 4, true); gotID = false; } WindbgAMD64Thread(WindbgDebugger debugger, long sysId) { this.debugger = debugger; --- 32,45 ---- private WindbgDebugger debugger; private long sysId; private boolean gotID; private long id; ! // The address argument must be the address of the OSThread::_thread_id WindbgAMD64Thread(WindbgDebugger debugger, Address addr) { this.debugger = debugger; ! this.sysId = (long)addr.getCIntegerAt(0, 4, true); gotID = false; } WindbgAMD64Thread(WindbgDebugger debugger, long sysId) { this.debugger = debugger;
agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File