On Sat, 17 Oct 2026 02:44:46 GMT, Yasumasa Suenaga <[email protected]> wrote:

> I guess older toolchain for RISC-V generates DWARF into `.debug_frame` if we 
> need `-fasynchronous-unwind-tables`. I've created PR for it as #33375 . It 
> might be better to wait and to test it after that. I expect your PR works 
> without ` -fasynchronous-unwind-tables` after that.

Thanks, @YaSuenag! I tried https://github.com/openjdk/jdk/pull/33375 together 
with this PR on RISC-V hardware with GCC 12.3.1, which doesn't enable unwind 
tables by default. You're right that the CFI then goes to `.debug_frame`, and 
with the `.debuginfo` files next to the libraries all threads unwind to 
`thread_native_entry` and the mixed jstack tests pass.

However, with the default `--with-native-debug-symbols=external`, release 
builds don't put the `.debuginfo` files into images/jdk (only into 
images/symbols). With images/jdk, unwinding stops at the first libjvm frame , 
and `TestJhsdbJstackMixedCore` fails because the crashing thread stops at 
`os::abort`. The same applies to the release bundles and to 
`--with-native-debug-symbols=none/zipped`. So I think we still need 
`-fasynchronous-unwind-tables` on riscv64; it only matters for GCC < 13 and 
Clang < 17, since newer compilers enable it by default.

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

PR Comment: https://git.openjdk.org/jdk/pull/33374#issuecomment-6233542667

Reply via email to