3 Commits

Author SHA1 Message Date
Nerixyz
a2c9146da1
[lldb][NativePDB] Handle S_DEFRANGE_REGISTER_REL_INDIR (#190336)
Since #189401, LLVM and Clang generate `S_DEFRANGE_REGISTER_REL_INDIR`
for indirect locations. This adds support in LLDB.

The offset added after dereferencing is signed here - unlike in
`S_REGREL32_INDIR` (at least that's the assumption). So I updated
`MakeRegisterBasedIndirectLocationExpressionInternal` to handle the
signedness. This is the reason the MSVC test was changed here.

I didn't find a test case where LLVM emits the record with the `VFRAME`
register. Other than that, the clang test is similar to the MSVC one
except that the locations are slightly different.
2026-04-06 21:21:47 +02:00
Nerixyz
1f9b32ba06
[lldb][NativePDB] Require target-windows for MSVC test (#186578)
Fixes the failure on the lldb-remote-linux-win buildbot
(https://github.com/llvm/llvm-project/pull/186124#issuecomment-4060098881).

The test runs MSVC to produce an executable that only runs on Windows.
2026-03-14 09:47:06 +00:00
Nerixyz
80d6e0b8ea
[LLDB][NativePDB] Add support for S_REGREL32_INDIR (#186124)
In #183172, I added support for reading `S_REGREL32_INDIR` records. This
adds support in LLDB. The record is emitted by MSVC for structured
bindings and in the compiler generated coroutine stubs.

It describes a location at `*(Register + Offset) + OffsetInUdt`.
Equivalent to
```
DW_OP_breg{reg} {Offset}
DW_OP_deref
DW_OP_plus_uconst {OffsetInUdt}
```

LLVM doesn't create this record - it only creates `S_LOCAL`s for local
variables. We'll probably need `S_DEFRANGE_REGISTER_REL_INDIR` for this
- should be simple to figure out the structure, but I haven't seen that
record emitted yet.
2026-03-13 20:22:29 +01:00