diff options
| author | Danil Stefaniuc <danilashtefan@gmail.com> | 2021-11-23 14:11:42 -0800 |
|---|---|---|
| committer | Walter Erquinigo <wallace@fb.com> | 2021-11-23 14:18:51 -0800 |
| commit | 9a9d9a9b00af5b60514ab9ada09ba02dfb86945e (patch) | |
| tree | 62471032bba4d5ea19b22229251ea7e88237dc31 /lldb/source/API/SBTarget.cpp | |
| parent | 4961fcfbcf688e5cd9580578b1e4eadce1dfc42e (diff) | |
[formatters] List and forward_list capping_size determination and application
This diff is adding the capping_size determination for the list and forward list, to limit the number of children to be displayed. Also it modifies and unifies tests for libcxx and libstdcpp list data formatter.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D114433
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 98158f457a04..dc79c77fee9e 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1745,6 +1745,16 @@ uint32_t SBTarget::GetCodeByteSize() { return 0; } +uint32_t SBTarget::GetMaximumNumberOfChildrenToDisplay() const { + LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetMaximumNumberOfChildrenToDisplay); + + TargetSP target_sp(GetSP()); + if(target_sp){ + return target_sp->GetMaximumNumberOfChildrenToDisplay(); + } + return 0; +} + uint32_t SBTarget::GetAddressByteSize() { LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBTarget, GetAddressByteSize); @@ -2679,6 +2689,7 @@ void RegisterMethods<SBTarget>(Registry &R) { LLDB_REGISTER_METHOD(const char *, SBTarget, GetTriple, ()); LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetDataByteSize, ()); LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetCodeByteSize, ()); + LLDB_REGISTER_METHOD_CONST(uint32_t, SBTarget, GetMaximumNumberOfChildrenToDisplay,()); LLDB_REGISTER_METHOD(uint32_t, SBTarget, GetAddressByteSize, ()); LLDB_REGISTER_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex, (uint32_t)); |
