diff --git a/vm_dump.c b/vm_dump.c index ad965ca9c9..01f54490fa 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -755,7 +755,7 @@ rb_print_backtrace(void) #define MAX_NATIVE_TRACE 1024 static void *trace[MAX_NATIVE_TRACE]; int n = (int)backtrace(trace, MAX_NATIVE_TRACE); -#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H)) && defined(HAVE_DLADDR) && !defined(__sparc) +#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H)) && defined(HAVE_DLADDR) && !defined(__sparc) && !defined(__riscv) rb_dump_backtrace_with_lines(n, trace); #else char **syms = backtrace_symbols(trace, n);