[PATCH] D132095: [llvm][utils] Make lldb data formatters show both summaries and children

Dave Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 18:54:16 PDT 2022


kastiglione created this revision.
kastiglione added reviewers: jingham, JDevlieghere, mib.
Herald added a project: All.
kastiglione requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When a type has a summary and synthetic child provider, the children are shown
only if `--expand`/`-e` is given.

This updates `lldbDataFormatters.py` to expand children of types that have both
a summary and synthetic children.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132095

Files:
  llvm/utils/lldbDataFormatters.py


Index: llvm/utils/lldbDataFormatters.py
===================================================================
--- llvm/utils/lldbDataFormatters.py
+++ llvm/utils/lldbDataFormatters.py
@@ -13,25 +13,25 @@
                            '-l lldbDataFormatters.SmallVectorSynthProvider '
                            '-x "^llvm::SmallVectorImpl<.+>$"')
     debugger.HandleCommand('type summary add -w llvm '
-                           '-s "size=${svar%#}" '
+                           '-e -s "size=${svar%#}" '
                            '-x "^llvm::SmallVectorImpl<.+>$"')
     debugger.HandleCommand('type synthetic add -w llvm '
                            '-l lldbDataFormatters.SmallVectorSynthProvider '
                            '-x "^llvm::SmallVector<.+,.+>$"')
     debugger.HandleCommand('type summary add -w llvm '
-                           '-s "size=${svar%#}" '
+                           '-e -s "size=${svar%#}" '
                            '-x "^llvm::SmallVector<.+,.+>$"')
     debugger.HandleCommand('type synthetic add -w llvm '
                            '-l lldbDataFormatters.ArrayRefSynthProvider '
                            '-x "^llvm::ArrayRef<.+>$"')
     debugger.HandleCommand('type summary add -w llvm '
-                           '-s "size=${svar%#}" '
+                           '-e -s "size=${svar%#}" '
                            '-x "^llvm::ArrayRef<.+>$"')
     debugger.HandleCommand('type synthetic add -w llvm '
                            '-l lldbDataFormatters.OptionalSynthProvider '
                            '-x "^llvm::Optional<.+>$"')
     debugger.HandleCommand('type summary add -w llvm '
-                           '-F lldbDataFormatters.OptionalSummaryProvider '
+                           '-e -F lldbDataFormatters.OptionalSummaryProvider '
                            '-x "^llvm::Optional<.+>$"')
     debugger.HandleCommand('type summary add -w llvm '
                            '-F lldbDataFormatters.SmallStringSummaryProvider '


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132095.453509.patch
Type: text/x-patch
Size: 1996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220818/933002ab/attachment.bin>


More information about the llvm-commits mailing list