JJonas Devlieghere[NFC][Py Reformat] Reformat python files in lldb
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb][DataFormatter] Fix libcxx std::deque formatter for references and pointers (Addresses GH#62153) The SBType APIs to retrieve details about template arguments, such as GetTemplateArgumentType or GetTemplateArgumentKind don't "desugar" LValueReferences/RValueReferences or pointers. So when we try to format a std::deque&, the python call to GetTemplateArgumentType fails to get a type, leading to an element_size of 0 and a division-by-zero python exception (which gets caught by the summary provider silently). This leads to the contents of such std::deque& to be printed incorrectly. This patch dereferences the reference/pointer before calling into the above SBAPIs. **Testing** * Add API test Differential Revision: https://reviews.llvm.org/D148531 | 3 年前 | |
[NFC][Py Reformat] Reformat python files in lldb This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460 | 3 年前 | |
[lldb][DataFormatter] Fix libcxx std::deque formatter for references and pointers (Addresses GH#62153) The SBType APIs to retrieve details about template arguments, such as GetTemplateArgumentType or GetTemplateArgumentKind don't "desugar" LValueReferences/RValueReferences or pointers. So when we try to format a std::deque&, the python call to GetTemplateArgumentType fails to get a type, leading to an element_size of 0 and a division-by-zero python exception (which gets caught by the summary provider silently). This leads to the contents of such std::deque& to be printed incorrectly. This patch dereferences the reference/pointer before calling into the above SBAPIs. **Testing** * Add API test Differential Revision: https://reviews.llvm.org/D148531 | 3 年前 |