[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 12 10:48:28 PDT 2024


================
@@ -1,7 +1,13 @@
 // Test that the lldb command `statistics` works.
+#include <string>
+
+void foo() {
+  std::string str = "hello world";
----------------
clayborg wrote:

We should also test a type that uses a template as some summary providers match based on a regex like:
```
std::vector<int> ints = {1, 2, 3};
std::vector<float> floats = {1.0, 2.0, 3.0};
```
>From debugging we can see:
```
(lldb) type summary info ints
summary applied to (std::vector<int>) ints is:  (show children) (hide value) libc++ std::vector summary provider
```
And the summary definition looks like:
```
(lldb) type summary list
...
^std::vector<.+>(( )?&)?$: `size=${svar%#}` (show children) (hide value)
...
```

So the summary name we want to see in our resulting map is probably `"^std::vector<.+>(( )?&)?$"`

https://github.com/llvm/llvm-project/pull/102708


More information about the lldb-commits mailing list