Improve LLDB and platform compatibility #82
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depending on the OS and the LLDB version, casting between different struct types can fail. The rule of thumb is to always cast between pointer types first and dereference later (
GetChildMemberWithName()should handle this transparentely and remove the need for derefs in most cases).Similarly, more care should be taken when casting between different variants of the
PyUnicodeObjecttype that all have different size: we should always start with the "base" object that they all have in common (i.e.PyASCIIObject) and use the internal state to figure out which variant of the struct is being inspected.Finally, debugging symbols may resolve the CPython object type as
_objectinstead ofPyObjectin some cases, but the two are synonymous.This fixes pretty-printing of
PyObjecttypes on Windows (though, we will need to start running tests on that platform before we can claim it is supported).