<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/functionalities/data-formatter/root-reference-children, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Support ordered patterns in lldbtest.expect (#131475)</title>
<updated>2025-03-17T21:30:39+00:00</updated>
<author>
<name>Dave Lee</name>
<email>davelee.com@gmail.com</email>
</author>
<published>2025-03-17T21:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6d2b8285b3f5f4d8f2ce184aeb14e791400a726d'/>
<id>6d2b8285b3f5f4d8f2ce184aeb14e791400a726d</id>
<content type='text'>
Change `lldbtest.expect` to require the regexes in `patterns` be found in order – when the
`ordered` parameter is true. This matches the behavior of `substrs`.

The `ordered` parameter is true by default, so this change also fixes tests by either
tweaking the patterns to work in order, or by setting `ordered=False`.

I have often wanted to test with `patterns` and also verify the order. This change
allows that.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change `lldbtest.expect` to require the regexes in `patterns` be found in order – when the
`ordered` parameter is true. This matches the behavior of `substrs`.

The `ordered` parameter is true by default, so this change also fixes tests by either
tweaking the patterns to work in order, or by setting `ordered=False`.

I have often wanted to test with `patterns` and also verify the order. This change
allows that.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Consult summary provider before printing children of root references</title>
<updated>2023-05-30T22:35:03+00:00</updated>
<author>
<name>Dave Lee</name>
<email>davelee.com@gmail.com</email>
</author>
<published>2023-05-30T17:31:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c7eb1b07470b9babfcd258f014df3661e5f84b30'/>
<id>c7eb1b07470b9babfcd258f014df3661e5f84b30</id>
<content type='text'>
When printing the root of a value, if it's a reference its children are unconditionally
printed - in contrast to pointers whose children are only printed if a sufficient
pointer depth is given.

However, the children are printed even when there's a summary provider that says not to.
If a summary provider exists, this change consults it to determine if children should be
printed.

For example, given a variable of type `std::string &amp;`, this change has the following
effect:

Before:

```
(lldb) p string_ref
(std::string &amp;) string_ref = "one two three four five six seven eight nine ten": {
  __r_ = {
    std::__1::__compressed_pair_elem&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;::__rep, 0, false&gt; = {
      __value_ = {
         = {
          __l = (__data_ = "one two three four five six seven eight nine ten", __size_ = 48, __cap_ = 64, __is_long_ = 1)
          __s = (__data_ = "@\0p\U00000001\0`\0\00\0\0\0\0\0\0\0@", __padding_ = "\x80t&lt;", __size_ = '\0', __is_long_ = '\x01')
          __r = {
            __words ={...}
          }
        }
      }
    }
  }
}
```

After:

```
(lldb) p string_ref
(std::string &amp;) string_ref = "one two three four five six seven eight nine ten"
```

rdar://73248786

Differential Revision: https://reviews.llvm.org/D151748
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When printing the root of a value, if it's a reference its children are unconditionally
printed - in contrast to pointers whose children are only printed if a sufficient
pointer depth is given.

However, the children are printed even when there's a summary provider that says not to.
If a summary provider exists, this change consults it to determine if children should be
printed.

For example, given a variable of type `std::string &amp;`, this change has the following
effect:

Before:

```
(lldb) p string_ref
(std::string &amp;) string_ref = "one two three four five six seven eight nine ten": {
  __r_ = {
    std::__1::__compressed_pair_elem&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;::__rep, 0, false&gt; = {
      __value_ = {
         = {
          __l = (__data_ = "one two three four five six seven eight nine ten", __size_ = 48, __cap_ = 64, __is_long_ = 1)
          __s = (__data_ = "@\0p\U00000001\0`\0\00\0\0\0\0\0\0\0@", __padding_ = "\x80t&lt;", __size_ = '\0', __is_long_ = '\x01')
          __r = {
            __words ={...}
          }
        }
      }
    }
  }
}
```

After:

```
(lldb) p string_ref
(std::string &amp;) string_ref = "one two three four five six seven eight nine ten"
```

rdar://73248786

Differential Revision: https://reviews.llvm.org/D151748
</pre>
</div>
</content>
</entry>
</feed>
