[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
Prevent GetNumChildren from transitively walking pointer chainsSummary:This is an attempt to fix https://bugs.llvm.org/show_bug.cgi?id=45988,where SBValue::GetNumChildren returns 2, but SBValue:
Prevent GetNumChildren from transitively walking pointer chainsSummary:This is an attempt to fix https://bugs.llvm.org/show_bug.cgi?id=45988,where SBValue::GetNumChildren returns 2, but SBValue::GetChildAtIndex(1) returnsan invalid value sentinel.The root cause of this seems to be that GetNumChildren can return the number ofchildren of a wrong value. In particular, for pointers GetNumChildren justrecursively calls itself on the pointee type, so it effectively walks chains ofpointers. This is different from the logic of GetChildAtIndex, which onlyrecurses if pointee.IsAggregateType() returns true (IsAggregateType is false forpointers and references), so it never follows chain of pointers.This patch aims to make GetNumChildren (more) consistent with GetChildAtIndex byonly recursively calling GetNumChildren for aggregate types.Ideally, GetNumChildren and GetChildAtIndex would share the code that decideswhich pointers/references are followed, but that is a bit more invasive change.Reviewers: teemperor, jingham, clayborgReviewed By: teemperor, clayborgSubscribers: clayborg, labath, shafik, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D80254