<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-01-15T12:04:04+00:00</updated>
<entry>
<title>[lldb] Add expect_expr function for testing expression evaluation in dotests.</title>
<updated>2020-01-15T12:04:04+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2020-01-15T12:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=13f22f5d5958a46db1212a083a426e339204c783'/>
<id>urn:sha1:13f22f5d5958a46db1212a083a426e339204c783</id>
<content type='text'>
Summary:
This patch adds a new function to lldbtest: `expect_expr`. This function is supposed to replace the current approach
of calling `expect`/`runCmd` with `expr`, `p` etc.

`expect_expr` allows evaluating expressions and matching their value/summary/type/error message without
having to do any string matching that might allow unintended passes (e.g., `self.expect("expr 3+4", substrs=["7"])`
can unexpectedly pass for results like `(Class7) $0 = 7`, `(int) $7 = 22`, `(int) $0 = 77` and so on).

This only uses the function in a few places to test and demonstrate it. I'll migrate the tests in follow up commits.

Reviewers: JDevlieghere, shafik, labath

Reviewed By: labath

Subscribers: christof, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70314
</content>
</entry>
<entry>
<title>[lldb/test] Add test for CMTime data formatter</title>
<updated>2020-01-15T07:11:15+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2020-01-15T07:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=914b551eeed159ba6051852c0aa63a1311ac4e40'/>
<id>urn:sha1:914b551eeed159ba6051852c0aa63a1311ac4e40</id>
<content type='text'>
Add a test for the CMTime data formatter. The coverage report showed
that this code path was untested.
</content>
</entry>
<entry>
<title>[lldb][tests] Cleanup '.categories'</title>
<updated>2020-01-10T13:39:38+00:00</updated>
<author>
<name>Tatyana Krasnukha</name>
<email>tatyana@synopsys.com</email>
</author>
<published>2019-12-11T16:33:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b3af8ab7f83c2a825c584ddedf5cc9207ca66b44'/>
<id>urn:sha1:b3af8ab7f83c2a825c584ddedf5cc9207ca66b44</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Data formatters: Look through array element typedefs</title>
<updated>2020-01-10T10:45:24+00:00</updated>
<author>
<name>Jaroslav Sevcik</name>
<email>jarin@google.com</email>
</author>
<published>2020-01-10T10:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=902974277d507a149e33487d32e4ba58c41451b6'/>
<id>urn:sha1:902974277d507a149e33487d32e4ba58c41451b6</id>
<content type='text'>
Summary:
Motivation: When formatting an array of typedefed chars, we would like to display the array as a string.

The string formatter currently does not trigger because the formatter lookup does not resolve typedefs for array elements (this behavior is inconsistent with pointers, for those we do look through pointee typedefs). This patch tries to make the array formatter lookup somewhat consistent with the pointer formatter lookup.

Reviewers: teemperor, clayborg

Reviewed By: teemperor, clayborg

Subscribers: clayborg, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72133
</content>
</entry>
<entry>
<title>Add prototype for a function we call.</title>
<updated>2019-12-18T22:18:52+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2019-12-18T22:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=997bc8b2e6b973dd8c9b17414310cac822543f79'/>
<id>urn:sha1:997bc8b2e6b973dd8c9b17414310cac822543f79</id>
<content type='text'>
</content>
</entry>
<entry>
<title>LanguageRuntime: Simplify NSException::GetSummary() output</title>
<updated>2019-12-13T20:33:31+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>medismail.bennani@gmail.com</email>
</author>
<published>2019-12-10T23:09:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2c91d5ba83156900944c82bb8feb1e340adb8ae4'/>
<id>urn:sha1:2c91d5ba83156900944c82bb8feb1e340adb8ae4</id>
<content type='text'>
Summary:
Right now, NSException::GetSummary() has the following output:
"name: $exception_name - reason: $exception_reason"

It would be better to simplify the output by removing the name and only
showing the exception's reason. This way, annotations would look nicer in
the editor, and would be a shorter summary in the Variables Inspector.

Accessing the exception's name can still be done by expanding the
NSException object in the Variables Inspector.

rdar://54770115

Signed-off-by: Med Ismail Bennani &lt;medismail.bennani@gmail.com&gt;

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71311

Signed-off-by: Med Ismail Bennani &lt;medismail.bennani@gmail.com&gt;
</content>
</entry>
<entry>
<title>[lldb][NFC] Remove all `setUp` overrides that only call the parent implementation</title>
<updated>2019-12-13T11:34:49+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-13T11:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=9bace26a690a778ec0f09a9aae9537dfbdb6f42f'/>
<id>urn:sha1:9bace26a690a778ec0f09a9aae9537dfbdb6f42f</id>
<content type='text'>
Summary:
A lot of our tests copied the setUp code from our TestSampleTest.py:

```
    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)
```

This code does nothing unless we actually do any setUp work in there, so let's remove all these method definitions.

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71454
</content>
</entry>
<entry>
<title>[lldb][NFC] Remove 'from __future__ import print_function' from all tests that don't actually call 'print()'</title>
<updated>2019-12-13T11:23:04+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-13T11:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a52a11139c0e3db9b00079aa1516080742b79475'/>
<id>urn:sha1:a52a11139c0e3db9b00079aa1516080742b79475</id>
<content type='text'>
Summary:
A lot of tests do this trick but the vast majority of them don't even call `print()`.

Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file.
I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives).
I also corrected the additional empty lines after the import in the files that I manually edited.

Reviewers: JDevlieghere, labath, jfb

Reviewed By: labath

Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71452
</content>
</entry>
<entry>
<title>Do not cache hardcoded formats in FormatManager</title>
<updated>2019-12-10T23:53:40+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-12-10T00:38:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=62a6d9770450f93a2dcdf04710a73341af2f54fa'/>
<id>urn:sha1:62a6d9770450f93a2dcdf04710a73341af2f54fa</id>
<content type='text'>
The cache in FormatCache uses only a type name as key. The hardcoded
formats, synthetic children, etc inspect an entire ValueObject to
determine their eligibility, which isn't modelled in the cache. This
leads to bugs such as the one in this patch (where two similarly named
types in different files have different hardcoded summary
providers). The problem is exaggerated in the Swift language plugin
due to the language's dynamic nature.

rdar://problem/57756763

Differential Revision: https://reviews.llvm.org/D71233
</content>
</entry>
<entry>
<title>[lldb][DataFormatters] Support pretty printing std::string when built with -funsigned-char.</title>
<updated>2019-11-22T18:25:03+00:00</updated>
<author>
<name>Jordan Rupprecht</name>
<email>rupprecht@google.com</email>
</author>
<published>2019-11-22T18:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=506144da04b94d7d492ad34f7d3d81e8368677bb'/>
<id>urn:sha1:506144da04b94d7d492ad34f7d3d81e8368677bb</id>
<content type='text'>
Summary:
When built w/ `-funsigned-char`, `std::string` becomes equivalent to `std::basic_string&lt;unsigned char&gt;`, causing these formatters to not match. This patch adds overloads for both libstdc++ and libc++ string formatters that accepts unsigned char.

Motivated by the following example:

```
$ cat pretty_print.cc

template &lt;typename T&gt;
void print_val(T s) {
  std::cerr &lt;&lt; s &lt;&lt; '\n';  // Set a breakpoint here!
}

int main() {
  std::string val = "hello";
  print_val(val);
  return 0;
}
$ clang++ -stdlib=libc++ -funsigned-char -fstandalone-debug -g pretty_print.cc
$ lldb ./a.out -b -o 'b pretty_print.cc:6' -o r -o 'fr v'
...
(lldb) fr v
(std::__1::basic_string&lt;unsigned char, std::__1::char_traits&lt;unsigned char&gt;, std::__1::allocator&lt;unsigned char&gt; &gt;) s = {
  __r_ = {
    std::__1::__compressed_pair_elem&lt;std::__1::basic_string&lt;unsigned char, std::__1::char_traits&lt;unsigned char&gt;, std::__1::allocator&lt;unsigned char&gt; &gt;::__rep, 0, false&gt; = {
      __value_ = {
         = {
          __l = (__cap_ = 122511465736202, __size_ = 0, __data_ = 0x0000000000000000)
          __s = {
             = (__size_ = '\n', __lx = '\n')
            __data_ = {
              [0] = 'h'
              [1] = 'e'
              [2] = 'l'
              [3] = 'l'
              [4] = 'o'
              [5] = '\0'
...
```

Reviewers: labath, JDevlieghere, shafik

Subscribers: christof, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70517
</content>
</entry>
</feed>
