[Lldb-commits] [lldb] [lldb/DWARF] Downgrade the "parent of variable is not CU" error (PR #108806)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 16 04:39:47 PDT 2024
Michael137 wrote:
Ahh thanks for the clarification. Makes sense.
Sounds like a situation where this would arise is:
```
struct Foo {
static int bar;
};
int Foo::bar = 5;
int main() {
static bool bar = false
__builtin_debugtrap();
}
```
Doing `(lldb) target var bar` would produce this error. Which I agree doesn't seem right.
I guess the alternative would be to suppress the error message only if the parent is a `DW_TAG_subprogram`. But that wouldn't really be a complete check either since local variables wouldn't be distinguishable.
So LGTM.
https://github.com/llvm/llvm-project/pull/108806
More information about the lldb-commits
mailing list