On Tue, 3 Mar 2026 03:38:33 GMT, Chris Plummer <[email protected]> wrote:
>> Maybe we can avoid this error like following:
>>
>>
>> #ifndef DWARF_REGLIST
>> #define DWARF_REGLIST
>> #endif
>>
>> #ifndef DWARF_PSEUDO_REGLIST
>> #define DWARF_PSEUDO_REGLIST
>> #endif
>>
>> enum DWARF_Register {
>>
>>
>> However I wonder why this happen on your environment because cross compiles
>> on GHA were succeeded:
>> https://github.com/openjdk/jdk/pull/29731/checks?check_run_id=65356511363
>> I can apply this change, but I couldn't test because I can't see the error
>> on GHA.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29731#discussion_r2876022309