[clang] [DebugInfo] Add bit size to _BitInt name in debug info (PR #165583)
Orlando Cazalet-Hyams via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 30 01:50:23 PDT 2025
OCHyams wrote:
FWIW LLDB support seems limited currently as the type is printed as `short` and `a`'s value displayed as `32639` rather than `-129` (I don't think it's taking into account the DW_AT_bit_size here).
```c
$ cat test.c -n
1 #include <string.h>
2
3 int main() {
4 _BitInt(15) a;
5 memset(&a, 0x7f, 2);
6 return 0; // GDB: b 6, p a
7 }
```
```c
* thread #1, name = 'test.elf', stop reason = breakpoint 1.1
frame #0: 0x0000555555555162 test.elf`main at test.c:6:3
3 int main() {
4 _BitInt(15) a;
5 memset(&a, 0x7f, 2);
-> 6 return 0; // GDB: b 6, p a
7 }
(lldb) p a
(short) 32639
(lldb) im lookup -t _BitInt(15)
Best match found in /home/och/scratch/test.elf:
id = {0x00000042}, name = "_BitInt(15)", qualified = "short", byte-size = 2, compiler_type = "short"
```
If there's any LLDB testing I can do on my side please let me know
https://github.com/llvm/llvm-project/pull/165583
More information about the cfe-commits
mailing list