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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to