Skip to content

Commit 723a522

Browse files
committed
debug
Signed-off-by: Tobi Ajila <[email protected]>
1 parent cf0437b commit 723a522

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

runtime/cmake/platform/toolcfg/gnu.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
2121
################################################################################
2222

23-
list(APPEND OMR_PLATFORM_COMPILE_OPTIONS -O3 -g -fstack-protector)
23+
list(APPEND OMR_PLATFORM_COMPILE_OPTIONS -O0 -g3 -fstack-protector)
2424
if(OMR_DDR AND NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 11))
2525
# In gcc 11+ the default is to use DWARF version 5 which is not yet
2626
# supported by ddrgen: tell the compiler to use DWARF version 4.

runtime/include/ffi_cfi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#ifndef FFI_CFI_H
88
#define FFI_CFI_H
99

10+
#undef HAVE_AS_CFI_PSEUDO_OP
11+
1012
#ifdef HAVE_AS_CFI_PSEUDO_OP
1113

1214
# define cfi_startproc .cfi_startproc

runtime/jcl/common/com_ibm_oti_vm_VM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jlong JNICALL
168168
Java_com_ibm_oti_vm_VM_getJ9ConstantPoolFromJ9Class(JNIEnv *env, jclass unused, jlong j9clazz)
169169
{
170170
J9Class *clazz = (J9Class *)JLONG_TO_POINTER(j9clazz);
171-
return JLONG_FROM_POINTER(clazz->ramConstantPool);
171+
return (jlong)(UDATA)clazz->ramConstantPool;
172172
}
173173

174174
/**

runtime/jcl/common/java_lang_Access.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ Java_java_lang_Access_getConstantPool(JNIEnv *env, jclass unusedClass, jobject c
6767
vmFunctions->internalEnterVMFromJNI(vmThread);
6868
classObject = J9_JNI_UNWRAP_REFERENCE(classToIntrospect);
6969
if (J9VMJAVALANGCLASS_OR_NULL(vmThread->javaVM) == J9OBJECT_CLAZZ(vmThread, classObject)) {
70-
clazz = J9VM_J9CLASS_FROM_HEAPCLASS(vmThread, classObject);
71-
J9ConstantPool *j9CP = (J9ConstantPool *)clazz->ramConstantPool;
70+
J9ConstantPool *j9CP = NULL;
7271
J9Class *internalConstantPool = J9VMJAVALANGINTERNALCONSTANTPOOL_OR_NULL(vmThread->javaVM);
7372
Assert_JCL_notNull(internalConstantPool);
7473
j9object_t internalConstantPoolObject = gcFunctions->J9AllocateObject(vmThread, internalConstantPool, J9_GC_ALLOCATE_OBJECT_NON_INSTRUMENTABLE);
@@ -77,6 +76,9 @@ Java_java_lang_Access_getConstantPool(JNIEnv *env, jclass unusedClass, jobject c
7776
vmFunctions->internalExitVMToJNI(vmThread);
7877
return NULL;
7978
}
79+
classObject = J9_JNI_UNWRAP_REFERENCE(classToIntrospect);
80+
clazz = J9VM_J9CLASS_FROM_HEAPCLASS(vmThread, classObject);
81+
j9CP = (J9ConstantPool *)clazz->ramConstantPool;
8082
J9VMJAVALANGINTERNALCONSTANTPOOL_SET_VMREF(vmThread, internalConstantPoolObject, j9CP);
8183
J9VMJAVALANGINTERNALCONSTANTPOOL_SET_CLAZZ(vmThread, internalConstantPoolObject, classObject);
8284
classToIntrospect = vmFunctions->j9jni_createLocalRef(env, internalConstantPoolObject);

0 commit comments

Comments
 (0)