On Tue, 3 Mar 2026 04:27:51 GMT, Chris Plummer <[email protected]> wrote:
>> I'm not sure how GHA builds are working. Your suggestions helps, but there >> are other build errors. The is for riscv64 >> >> >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp:60:35: error: >> 'THREAD_CONTEXT_CLASS' was not declared in this scope >> 60 | jclass reg_cls = env->FindClass(THREAD_CONTEXT_CLASS); >> | ^~~~~~~~~~~~~~~~~~~~ >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp:60:10: warning: >> unused variable 'reg_cls' [-Wunused-variable] >> 60 | jclass reg_cls = env->FindClass(THREAD_CONTEXT_CLASS); >> | ^~~~~~~ >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp: In function >> 'jint >> Java_sun_jvm_hotspot_debugger_linux_DwarfParser_getOffsetFromCFA(JNIEnv*, >> jobject, jint)': >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp:181:16: >> warning: unused variable 'parser' [-Wunused-variable] >> 181 | DwarfParser *parser = reinterpret_cast<DwarfParser >> *>(get_dwarf_context(env, this_obj)); >> | ^~~~~~ >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp: In function >> 'jint >> Java_sun_jvm_hotspot_debugger_linux_DwarfParser_getReturnAddressOffsetFromCFA(JNIEnv*, >> jobject)': >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp:228:38: error: >> 'RA' was not declared in this scope >> 228 | return parser->get_offset_from_cfa(RA); >> | ^~ >> src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp: In function >> 'jint >> Java_sun_jvm_hotspot_debugger_linux_DwarfParser_getBasePointerOffsetFromCFA(JNIEnv*, >> jobject)': >> ]src/jdk.hotspot.agent/linux/native/libsaproc/DwarfParser.cpp:240:38: error: >> 'BP' was not declared in this scope >> 240 | return parser->get_offset_from_cfa(BP); >> | ^~ > > It looks like those builds are only building the hotspot target, not the full > JDK, so SA is not getting built. I excluded DwarfParser.cpp and dwarf.cpp from source list when the build runs on unsupported platforms. They will be included Linux AMD64 or AArch64 only. I cannot this change on RISC-V, but I tested they are excluded when `LIBSAPROC_EXCLUDE_FILES` is set. Java classes (DwarfParser.java, DwarfCFrame.java) remains after this change, but it should not be a problem because they should not be used in other CFrames such as LinuxRISCV64CFrame. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29731#discussion_r2877057754
