| Issue |
178953
|
| Summary |
[LLDB] LLDB does not acknowledge TLS variables
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
k4lizen
|
LLDB does not acknowledge TLS variables.
Repro (assumes you are on a glibc system):
```bash
lldb /bin/sh
(lldb) b main
(lldb) run
(lldb) p &errno
˄
╰─ error: use of undeclared identifier 'errno'
```
whereas in gdb:
```bash
gdb /bin/sh
gdb> b main
gdb> run
gdb> p &errno
$1 = 0
```
It's defined here:
https://elixir.bootlin.com/glibc/glibc-2.41/source/csu/errno.c#L32
It's a dynamic/exported symbol so it's always available even on a stripped glibc.
In LLDB ELF parsing:
https://github.com/llvm/llvm-project/blob/9dde0a803bbc761cb6a6e785412a00652053861e/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp#L2207 . The SST_TLS type is not handled: https://github.com/llvm/llvm-project/blob/9dde0a803bbc761cb6a6e785412a00652053861e/llvm/include/llvm/BinaryFormat/ELF.h#L1422
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs