Files
Bar SoloveychikandBar Soloveychik 4c85bfbf3b [LLDB] Expose and display GDB remote register union values (#224147)
- Builds Clang union types from parsed GDB target description metadata.
- Supports nested unions, union/vector combinations, pointer-sized
members, and validated Clang type layouts.
- Exposes union members through SBValue children, expression paths, and
typed SBData.
- Adds typed register read output and member paths while preserving
explicit format overrides.
- Rejects malformed and out-of-bounds register paths.
 
GDB XML reference:
https://sourceware.org/gdb/download/onlinedocs/gdb.html/Target-Description-Format.html
```
(lldb) register info u0
       Name: u0
       Size: 16 bytes (128 bits)
    In sets: General Purpose Registers (index 0)

  Union members:
    f32 (ieee_single, 4 bytes)
    f64 (ieee_double, 8 bytes)
    s64 (int64, 8 bytes)
    u64 (uint64, 8 bytes)
    raw (uint128, 16 bytes)
(lldb) register read u0
  u0 = 0x0000000000000000ffffffff3fc00000
     = (f32 = 1.5, f64 = NaN, s64 = -3225419776, u64 = 18446744070484131840, raw = 18446744070484131840)
(lldb) register read u0.f32
  u0.f32 = 1.5
(lldb) register read $u0.f64
  u0.f64 = NaN
(lldb) register read u1.floats[2]
  u1.floats[2] = 3.5
(lldb) register read n0.f32_view.lanes[3]
  n0.f32_view.lanes[3] = 4.5
(lldb) register read b0.c[16]
  b0.c[16] = '\x10'
(lldb) register read vu0[2].f32
  vu0[2].f32 = 3
(lldb) register read v3
  v3 = {0x00 0x00 0xc0 0x3f 0x00 0x00 0x20 0x40 0x00 0x00 0x60 0x40}
     = ([0] = 1.5, [1] = 2.5, [2] = 3.5)
(lldb) register read u0 --format X
  u0 = 0x0000000000000000FFFFFFFF3FC00000
(lldb) register read u0.u64 --format X
  u0.u64 = 0xFFFFFFFF3FC00000
```

---------

Co-authored-by: Bar Soloveychik <barsolo@fb.com>
2026-10-20 10:18:54 +03:00
..