SBValues that are synthetic has API issues when trying to get the child by name:

3 int main(int argc, const char **argv) {
   4 std::atomic<int> ai;
   5 ai = argc;
-> 6 ai = argc + 1;
   7 return 0;
   8 }

(lldb) fr var ai
(std::atomic<int>) ai = {
  Value = 1
}
(lldb) frame var --raw ai
(std::__1::atomic<int>) ai = {
  std::__1::__atomic_base<int, true> = {
    std::__1::__atomic_base<int, false> = {
      __a_ = 1
    }
  }
}

So we have a synthetic child provider. But if we do:

(lldb) script

v = lldb.frame.FindVariable('ai')
print(v.GetNumChildren())

1

print(v.GetChildAtIndex(0))

(int) Value = 1

But if we ask for it by name it doesn't work:

print(v.GetChildMemberWithName('Value'))

No value

Bug? Intentional?

Definitely a bug. ValueObjectSynthetic overrides both GetChildMemberWithName and GetIndexOfChildWithName so that if you have a synthetic value, it will look in the synthetic children to match the name, not in the underlying value's type. Not sure why this isn’t working.

Jim