agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot-8003348 Cdiff agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java
agent/src/share/classes/sun/jvm/hotspot/BsdVtblAccess.java
Print this page
8003348: SA can not read core file on OS X
*** 1,7 ****
/*
! * Copyright (c) 2002, 2003, 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) 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 ****
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) {
// old C++ ABI
! vt = "__vt_";
} else {
// new C++ ABI
vt = "_ZTV";
}
}
--- 32,53 ----
private String vt;
public BsdVtblAccess(SymbolLookup symbolLookup,
String[] dllNames) {
super(symbolLookup, dllNames);
! 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