On Tue, 3 Mar 2026 02:06:50 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> src/jdk.hotspot.agent/linux/native/libsaproc/dwarf.hpp line 45:
>> 
>>> 43: 
>>> 44:   DWARF_REGLIST
>>> 45:   DWARF_PSEUDO_REGLIST
>> 
>> This won't compile on platforms other than x64 and aarch64. Is there a way 
>> to keep all the other CPU ports building without you having to do a full 
>> port to each of them?
>> 
>> 
>> src/jdk.hotspot.agent/linux/native/libsaproc/dwarf.hpp:45:3: error: expected 
>> '}' before 'DWARF_PSEUDO_REGLIST'
>>     45 |   DWARF_PSEUDO_REGLIST
>>        |   ^~~~~~~~~~~~~~~~~~~~
>> src/jdk.hotspot.agent/linux/native/libsaproc/dwarf.hpp:39:21: note: to match 
>> this '{'
>>     39 | enum DWARF_Register {
>
> 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);
       |                                      ^~

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29731#discussion_r2875889958

Reply via email to