$ gdb -v GNU gdb (GDB) 9.0.50.20191210-git Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ cat small.c __attribute__((target_clones("arch=core-avx2","arch=slm","default"))) void foo (float *a, int b) { *a = (float)b; } float a; int main() { int i; for (i = 0; i < 1024; i++) foo (&a, 5); } $gcc -g -fsanitize=undefined small.c $ gdb -q ./a.out Reading symbols from ./a.out... (gdb) break *get_available_features+0x172 Breakpoint 1 at 0x11d2 (gdb) run Starting program: /home/yibiao/tgdb/a.out Breakpoint 1, 0x00005555555551d2 in get_available_features () (gdb) c Continuing. [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff70f2294 in get_available_features (ecx=<optimized out>, edx=<optimized out>, max_cpuid_level=22) at /build/gcc/src/gcc/libgcc/config/i386/cpuinfo.c:409 409 /build/gcc/src/gcc/libgcc/config/i386/cpuinfo.c: No such file or directory. (gdb)
This problem is no longer exists in the latest version of gdb. $ gdb -v GNU gdb (GDB) 11.0.50.20201224-git
Not sure whether this bug is fixed in the latest version.
If it's fixed in 11 then I think this can just be closed.