<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/lldb/packages/Python, 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-28T13:24:36+00:00</updated>
<entry>
<title>[lldb] Fix nondeterminism in TestCppBitfields</title>
<updated>2020-01-28T13:24:36+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2020-01-24T11:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=54b022d344412fc9f1dfe37ee05de934a01e1ea4'/>
<id>urn:sha1:54b022d344412fc9f1dfe37ee05de934a01e1ea4</id>
<content type='text'>
The test was printing a char[3] variable without a terminating nul. The
memory after that variable (an unnamed bitfield) was not initialized. If
the memory happened to be nonzero, the summary provider for the variable
would run off into the next field.

This is probably not the right behavior (it should stop at the end of
the array), but this is not the purpose of this test. I have filed
pr44649 for this bug, and fixed the test to not depend on this behavior.

(cherry picked from commit 77cedb0cdb8623ff9eb22dbf3b9302ee4d9f8a20)
</content>
</entry>
<entry>
<title>[LLDB] Fix the handling of unnamed bit-fields when parsing DWARF</title>
<updated>2020-01-27T14:10:11+00:00</updated>
<author>
<name>shafik</name>
<email>syaghmour@apple.com</email>
</author>
<published>2020-01-23T22:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b5cf892651812003e64c4a8f0dbf81f74a499016'/>
<id>urn:sha1:b5cf892651812003e64c4a8f0dbf81f74a499016</id>
<content type='text'>
We ran into an assert when debugging clang and performing an expression on a class derived from DeclContext. The assert was indicating we were getting the offsets wrong for RecordDeclBitfields. We were getting both the size and offset of unnamed bit-field members wrong. We could fix this case with a quick change but as I extended the test suite to include more combinations we kept finding more cases that were being handled incorrectly. A fix that handled all the new cases as well as the cases already covered required a refactor of the existing technique.

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

(cherry picked from commit fcaf5f6c01a09f23b948afb8c91c4dd951d4525e)
</content>
</entry>
<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>dotest.py: Add option to pass extra lldb settings to dotest</title>
<updated>2020-01-14T20:35:24+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2020-01-14T20:34:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b53d44b17a1685e405415cd32c4b6eb89cc4c3a1'/>
<id>urn:sha1:b53d44b17a1685e405415cd32c4b6eb89cc4c3a1</id>
<content type='text'>
The primary motivation for this is to add another dimension to the
Swift LLDB test matrix, but this seems generally useful.

Differential Revision: https://reviews.llvm.org/D72662
</content>
</entry>
<entry>
<title>[lldb/test] test_breakpoints_func_full from TestNamespace.NamespaceBreakpointTestCase is now passing on Windows</title>
<updated>2020-01-14T19:15:48+00:00</updated>
<author>
<name>Stella Stamenova</name>
<email>stilis@microsoft.com</email>
</author>
<published>2020-01-14T19:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=ab72db7fc85266f094cc6b9452dd01f175c04cab'/>
<id>urn:sha1:ab72db7fc85266f094cc6b9452dd01f175c04cab</id>
<content type='text'>
After https://reviews.llvm.org/D70846, the test is now passing on Windows
</content>
</entry>
<entry>
<title>Expression eval lookup speedup by not returning methods in ManualDWARFIndex::GetFunctions</title>
<updated>2020-01-14T13:59:56+00:00</updated>
<author>
<name>Levon Ter-Grigoryan</name>
<email>patriosthegreat@protonmail.ch</email>
</author>
<published>2020-01-14T13:33:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a705cf1acbe94498f7fcca4e89be6d4820271227'/>
<id>urn:sha1:a705cf1acbe94498f7fcca4e89be6d4820271227</id>
<content type='text'>
Summary:
This change is connected with
https://reviews.llvm.org/D69843

In large codebases, we sometimes see Module::FindFunctions (when called from
ClangExpressionDeclMap::FindExternalVisibleDecls) returning huge amounts of
functions.

In current fix I trying to return only function_fullnames from ManualDWARFIndex::GetFunctions when eFunctionNameTypeFull is passed as argument.

Reviewers: labath, jarin, aprantl

Reviewed By: labath

Subscribers: shafik, clayborg, teemperor, arphaman, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70846
</content>
</entry>
<entry>
<title>[lldb/Expression] Improve interpreter error message with a non-running target</title>
<updated>2020-01-14T12:06:58+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>medismail.bennani@gmail.com</email>
</author>
<published>2020-01-14T11:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=877723b7ce813d25fc4a358b7d2cb90468733a72'/>
<id>urn:sha1:877723b7ce813d25fc4a358b7d2cb90468733a72</id>
<content type='text'>
When trying to interpret an expression with a function call, if the
process hasn't been launched, the expression fails to be interpreted
and the user gets the following  error message:

```error: Can't run the expression locally```

This message doesn't explain why the expression failed to be
interpreted, that's why this patch improves the error message that is
displayed when trying to run an expression while no process is running.

rdar://11991708

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

Signed-off-by: Med Ismail Bennani &lt;medismail.bennani@gmail.com&gt;
</content>
</entry>
<entry>
<title>[lldb][NFC] Rewrite python_api/rdar-12481949 test</title>
<updated>2020-01-14T09:10:24+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2020-01-14T09:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d8ffd601d523fa0c0a55e25e62af9ffaa618629d'/>
<id>urn:sha1:d8ffd601d523fa0c0a55e25e62af9ffaa618629d</id>
<content type='text'>
Summary:
This renames the test `rdar-12481949` to `get-value-32bit-int` as it just tests that we return the
correct result get calling GetValueAsSigned/GetValueAsUnsigned on 32-bit integers.

It also deletes all the strange things going on in this test including resetting the data formatters (which are to my
knowledge not used to calculate scalar values) and testing Python's long integers (let's just assume that our Python
distribution works correctly). Also modernises the setup code.

Reviewers: labath, aprantl

Reviewed By: aprantl

Subscribers: JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72593
</content>
</entry>
<entry>
<title>[lldb] Fix that SBThread.GetStopDescription is returning strings with uninitialized memory at the end.</title>
<updated>2020-01-14T08:34:32+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2020-01-14T08:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=61b6a4e82653e1209126404d33ad20a268f55db1'/>
<id>urn:sha1:61b6a4e82653e1209126404d33ad20a268f55db1</id>
<content type='text'>
Summary:
`SBThread.GetStopDescription` is a curious API as it takes a buffer length as a parameter that specifies
how many bytes the buffer we pass has. Then we fill the buffer until the specified length (or the length
of the stop description string) and return the string length. If the buffer is a nullptr however, we instead
return how many bytes we would have written to the buffer so that the user can allocate a buffer with
the right size and pass that size to a subsequent `SBThread.GetStopDescription` call.

Funnily enough, it is not possible to pass a nullptr via the Python SWIG bindings, so that might be the
first API in LLDB that is not only hard to use correctly but impossible to use correctly. The only way to
call this function via Python is to throw in a large size limit that is hopefully large enough to contain the
stop description (otherwise we only get the truncated stop description).

Currently passing a size limit that is smaller than the returned stop description doesn't cause the
Python bindings to return the stop description but instead the truncated stop description + uninitialized characters
at the end of the string. The reason for this is that we return the result of `snprintf` from the method
which returns the amount of bytes that *would* have been written (which is larger than the buffer).
This causes our Python bindings to return a string that is as large as full stop description but the
buffer that has been filled is only as large as the passed in buffer size.

This patch fixes this issue by just recalculating the string length in our buffer instead of relying on the wrong
return value. We also have to do this in a new type map as the old type map is also used for all methods
with the given argument pair `char *dst, size_t dst_len` (e.g. SBProcess.GetSTDOUT`). These methods have
different semantics for these arguments and don't null-terminate the returned buffer (they instead return the
size in bytes) so we can't change the existing typemap without breaking them.

Reviewers: labath, jingham

Reviewed By: labath

Subscribers: clayborg, shafik, abidh, JDevlieghere, lldb-commits

Tags: #lldb

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