On Wed, Nov 26, 2025, at 6:35 AM, Mark Wielaard wrote:
>> -/* TODO: Need to generalize the code beyond x86 architectures. */
>> +/* TODO: Need to generalize the code beyond x86 architectures.
>> +   eu-stacktrace currently disabled by configury
>> +   unless _ASM_X86_PERF_REGS_H is detected. */
>>  #include <asm/perf_regs.h>
>>  #ifndef _ASM_X86_PERF_REGS_H
>>  #error "eu-stacktrace is currently limited to x86 architectures"
>
> Shouldn't this also be guarded like the other includes:
>
> #ifdef HAVE_PERF_REGS_H
> #  include <asm/perf_regs.h>
> #endif
>
> Or is there some other mechanism that prevents stacktrace.c to be
> compiled if asm/perf_regs.h isn't available?
Yes, eu-stacktrace is currently auto-disabled if a configury check
fails to see asm/perf_regs.h and _ASM_X86_PERF_REGS_H.
That's what the expanded comment was attempting to clarify,
seems I should clarify the comment further :-P

The additional #ifndef is more a diagnostic for someone who
overrides that configury to try to build eu-stacktrace anyways....

Still need to test the fix on a suitably exotic system...
will send a revised patch (cf Aaron's comments) once I've done that.

Reply via email to