| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb/cmake] Use ADDITIONAL_HEADER(_DIR)?S (#142587) Replace (questionable) header globs with an explicit argument supported by llvm_add_library. | 1 年前 | |
[lldb] Refactor away UB in SBValue::GetLoadAddress (#141799) The problem was in calling GetLoadAddress on a value in the error state, where ValueObject::GetLoadAddress could end up accessing the uninitialized "address type" by-ref return value from GetAddressOf. This probably happened because each function expected the other to initialize it. We can guarantee initialization by turning this into a proper return value. I've added a test, but it only (reliably) crashes if lldb is built with ubsan. | 1 年前 | |
[lldb] Add matching based on Python callbacks for data formatters. This patch adds a new matching method for data formatters, in addition to the existing exact typename and regex-based matching. The new method allows users to specify the name of a Python callback function that takes a SBType object and decides whether the type is a match or not. Here is an overview of the changes performed: - Add a new eFormatterMatchCallback matching type, and logic to handle it in TypeMatcher and SBTypeNameSpecifier. - Extend FormattersMatchCandidate instances with a pointer to the current ScriptInterpreter and the TypeImpl corresponding to the candidate type, so we can run registered callbacks and pass the type to them. All matcher search functions now receive a FormattersMatchCandidate instead of a type name. - Add some glue code to ScriptInterpreterPython and the SWIG bindings to allow calling a formatter matching callback. Most of this code is modeled after the equivalent code for watchpoint callback functions. - Add an API test for the new callback-based matching feature. For more context, please check the RFC thread where this feature was originally discussed: https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204/11 Differential Revision: https://reviews.llvm.org/D135648 | 3 年前 | |
[lldb] Print ValueObject when GetObjectDescription fails (#152417) This fixes a few bugs, effectively through a fallback to p when po fails. The motivating bug this fixes is when an error within the compiler causes po to fail. Previously when that happened, only its value (typically an object's address) was printed – and problematically, no compiler diagnostics were shown. With this change, compiler diagnostics are shown, _and_ the object is fully printed (ie p). Another bug this fixes is when po is used on a type that doesn't provide an object description (such as a struct). Again, the normal ValueObject printing is used. Additionally, this also improves how lldb handles an object description method that fails in some way. Now an error will be shown (it wasn't before), and the value will be printed normally. | 11 个月前 | |
[lldb] Remove unnecessary FormatCache::GetEntry (NFC) (#80603) The implementation of FormatCache::Entry &FormatCache::GetEntry(ConstString) is effectively a duplication of std::map::operator[]. This change deletes GetEntry and replaces its use with operator[]. | 2 年前 | |
[lldb][NFC] Fix all formatting errors in .cpp file headers Summary: A *.cpp file header in LLDB (and in LLDB) should like this: //===-- TestUtilities.cpp -------------------------------------------------===// However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator -*- C++ -*- is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing ===// (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258 | 6 年前 | |
[lldb] Add support for displaying __float128 variables (#98369) | 11 个月前 | |
[lldb] Upgrade GetIndexOfChildWithName to use llvm::Expected (#136693) This patch replaces the use of UINT32_MAX as the error return value of GetIndexOfChildWithName with llvm::Expected. # Tasks to do in another PR 1. Replace CalculateNumChildrenIgnoringErrors with CalculateNumChildren. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2056319358). 2. Update lldb_private::formatters::ExtractIndexFromString to use llvm::Expected. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2054217536). 3. Create a new class which carries both user and internal errors. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2056439608). | 1 年前 | |
[lldb] Add a return opcode to the formatter bytecode (#121602) In LLVM we love our early exists and this opcode allows for simpler code generation. | 1 年前 | |
Reland: [lldb] Implement a formatter bytecode interpreter in C++ Compared to the python version, this also does type checking and error handling, so it's slightly longer, however, it's still comfortably under 500 lines. Relanding with more explicit type conversions. | 1 年前 | |
[lldb] Support zero-padding in formatter sections (#119934) | 1 年前 | |
[lldb][Formatters] Use container summary helper for libstdc++ formatters (#147140) This re-uses the LibcxxContainerSummaryProvider for the libstdc++ formatters. There's a couple of containers that aren't making use of it for libstdc++. This patch will make it easier to review when adding those in the future. | 1 年前 | |
[LLDB] Fix compilation with GCC 5 Differential Revision: https://reviews.llvm.org/D74084 | 6 年前 | |
[lldb] Move ValueObject into its own library (NFC) (#113393) ValueObject is part of lldbCore for historical reasons, but conceptually it deserves to be its own library. This does introduce a (link-time) circular dependency between lldbCore and lldbValueObject, which is unfortunate but probably unavoidable because so many things in LLDB rely on ValueObject. We already have cycles and these libraries are never built as dylibs so while this doesn't improve the situation, it also doesn't make things worse. The header includes were updated with the following command: find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \; | 1 年前 | |
[lldb] Add matching based on Python callbacks for data formatters. This patch adds a new matching method for data formatters, in addition to the existing exact typename and regex-based matching. The new method allows users to specify the name of a Python callback function that takes a SBType object and decides whether the type is a match or not. Here is an overview of the changes performed: - Add a new eFormatterMatchCallback matching type, and logic to handle it in TypeMatcher and SBTypeNameSpecifier. - Extend FormattersMatchCandidate instances with a pointer to the current ScriptInterpreter and the TypeImpl corresponding to the candidate type, so we can run registered callbacks and pass the type to them. All matcher search functions now receive a FormattersMatchCandidate instead of a type name. - Add some glue code to ScriptInterpreterPython and the SWIG bindings to allow calling a formatter matching callback. Most of this code is modeled after the equivalent code for watchpoint callback functions. - Add an API test for the new callback-based matching feature. For more context, please check the RFC thread where this feature was originally discussed: https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204/11 Differential Revision: https://reviews.llvm.org/D135648 | 3 年前 | |
[lldb] Use std::make_shared where possible (NFC) (#150714) This is a continuation of 68fd102, which did the same thing but only for StopInfo. Using make_shared is both safer and more efficient: - With make_shared, the object and the control block are allocated together, which is more efficient. - With make_shared, the enable_shared_from_this base class is properly linked to the control block before the constructor finishes, so shared_from_this() will be safe to use (though still not recommended during construction). | 1 年前 | |
[lldb] Refactor away UB in SBValue::GetLoadAddress (#141799) The problem was in calling GetLoadAddress on a value in the error state, where ValueObject::GetLoadAddress could end up accessing the uninitialized "address type" by-ref return value from GetAddressOf. This probably happened because each function expected the other to initialize it. We can guarantee initialization by turning this into a proper return value. I've added a test, but it only (reliably) crashes if lldb is built with ubsan. | 1 年前 | |
[lldb][Formatters] Add --pointer-match-depth option to type summary add command. (#138209) Currently, the type T's summary formatter will be matched for T, T*, T** and so on. This is unexpected in many data formatters. Such unhandled cases could cause the data formatter to crash. An example would be the lldb's built-in data formatter for std::optional: $ cat main.cpp #include <optional> int main() { std::optional<int> o_null; auto po_null = &o_null; auto ppo_null = &po_null; auto pppo_null = &ppo_null; return 0; } $ clang++ -g main.cpp && lldb -o "b 8" -o "r" -o "v pppo_null" [lldb crash] This change adds an options --pointer-match-depth to type summary add command to allow users to specify how many layer of pointers can be dereferenced at most when matching a summary formatter of type T, as Jim suggested [here](https://github.com/llvm/llvm-project/pull/124048/#issuecomment-2611164133). By default, this option has value 1 which means summary formatter for T could also be used for T* but not T** nor beyond. This option is no-op when --skip-pointers is set as well. I didn't add such option for type synthetic add, type format add, type filter add, because it useful for those command. Instead, they all have the pointer match depth of 1. When printing a type T*, lldb never print the children of T even if there is a synthetic formatter registered for T. | 1 年前 | |
[lldb] Show coro_frame in std::coroutine_handle pretty printer (#141516) This commit adjusts the pretty printer for std::coroutine_handle based on recent personal experiences with debugging C++20 coroutines: 1. It adds the coro_frame member. This member exposes the complete coroutine frame contents, including the suspension point id and all internal variables which the compiler decided to persist into the coroutine frame. While this data is highly compiler-specific, inspecting it can help identify the internal state of suspended coroutines. 2. It includes the promise and coro_frame members, even if devirtualization failed and we could not infer the promise type / the coro_frame type. Having them available as void* pointers can still be useful to identify, e.g., which two coroutine handles have the same frame / promise pointers. | 1 年前 | |
[lldb] Print ValueObject when GetObjectDescription fails (#152417) This fixes a few bugs, effectively through a fallback to p when po fails. The motivating bug this fixes is when an error within the compiler causes po to fail. Previously when that happened, only its value (typically an object's address) was printed – and problematically, no compiler diagnostics were shown. With this change, compiler diagnostics are shown, _and_ the object is fully printed (ie p). Another bug this fixes is when po is used on a type that doesn't provide an object description (such as a struct). Again, the normal ValueObject printing is used. Additionally, this also improves how lldb handles an object description method that fails in some way. Now an error will be shown (it wasn't before), and the value will be printed normally. | 11 个月前 | |
[lldb] Add support for displaying __float128 variables (#98369) | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 |