__thread tls_var1;
00000000000010d4 g .tbss 0000000000000004 tls_var1
0000000000000000 g .tdata 0000000000000004 tls_var2
I am able to use tls_var1 and tls_var2, to view the variables via gdb i have to add $tp + <Offset>. see the expected data.
Question :
How can i view the variable in gdb using just the symbol i.e
gdb > p/x tls_var1
"Cannot find thread-local variables on this target"
it will help debug better if GDB can be made aware of TLS. Please let me know if i am missing anything my compiler or GDB setup ?
Compiler
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
Target: riscv64-unknown-unknown-elf
Thread model: posix
GDB
GNU gdb (GDB) 11.0.50.20210206-git
Thanks,
Anitha