Control: retitle -1 gdb: x86-64: "cannot find thread-local variables on this target"
Further experimentation indicates that this is a problem with thread-local variables in general and there's something special about 'errno' that makes it appear to work; the Python interface is not the problem. For instance: $ cat test.c #include <stdio.h> #include <errno.h> static _Thread_local int foo; int main(void) { printf("%d %d\n", errno, foo); } $ gcc -g test.c $ gdb ./a.out ... (gdb) b main Breakpoint 1 at 0x749: file test.c, line 6. (gdb) r Starting program: /home/zack/a.out Breakpoint 1, main () at test.c:6 6 printf("%d %d\n", errno, foo); (gdb) p errno $1 = 0 (gdb) p foo Cannot find thread-local storage for process 13090, executable file /home/zack/a.out: Cannot find thread-local variables on this target