agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java	Wed Mar 13 23:31:47 2013
--- new/agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java	Wed Mar 13 23:31:47 2013

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2002, 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,46 **** --- 32,53 ---- private String vt; public BsdVtblAccess(SymbolLookup symbolLookup, String[] dllNames) { super(symbolLookup, dllNames); if (symbolLookup.lookup("libjvm.so", "__vt_10JavaThread") != null || symbolLookup.lookup("libjvm_g.so", "__vt_10JavaThread") != null) { + boolean oldVT = false; + boolean isDarwin = dllNames[0].lastIndexOf(".dylib") != -1; + String vtJavaThread = isDarwin ? "_vt_10JavaThread" : "__vt_10JavaThread"; + for (String dllName : dllNames) { + if (symbolLookup.lookup(dllName, vtJavaThread) != null) { + oldVT = true; + break; + } + } + if (oldVT) { // old C++ ABI ! vt = isDarwin ? "_vt_" : "__vt_"; } else { // new C++ ABI vt = "_ZTV"; } }

agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File