<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/lldb/source/Breakpoint, 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>2019-12-06T08:40:42+00:00</updated>
<entry>
<title>[lldb][NFC] Migrate FileSpec::Dump to raw_ostream</title>
<updated>2019-12-06T08:40:42+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-06T07:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4dac97eb1e6563750e682e482e68f29ac076a4f7'/>
<id>urn:sha1:4dac97eb1e6563750e682e482e68f29ac076a4f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change Target::FindBreakpointsByName to return Expected&lt;vector&gt;</title>
<updated>2019-12-04T14:57:15+00:00</updated>
<author>
<name>Joseph Tremoulet</name>
<email>jotrem@microsoft.com</email>
</author>
<published>2019-11-22T17:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=95b2e516bd3e4587953e44bf062054ff84f2b057'/>
<id>urn:sha1:95b2e516bd3e4587953e44bf062054ff84f2b057</id>
<content type='text'>
Summary:
Using a BreakpointList corrupts the breakpoints' IDs because
BreakpointList::Add sets the ID, so use a vector instead, and
update the signature to return the vector wrapped in an
llvm::Expected which can propagate any error from the inner
call to StringIsBreakpointName.

Note that, despite the similar name, SBTarget::FindBreakpointsByName
doesn't suffer the same problem, because it uses a SBBreakpointList,
which is more like a BreakpointIDList than a BreakpointList under the
covers.

Add a check to TestBreakpointNames that, without this fix, notices the
ID getting mutated and fails.

Reviewers: jingham, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70907
</content>
</entry>
<entry>
<title>[lldb] s/FileSpec::Equal/FileSpec::Match</title>
<updated>2019-12-04T09:42:32+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2019-11-29T10:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=532290e69fcb0e1f2005853241bc2cac6941e0f7'/>
<id>urn:sha1:532290e69fcb0e1f2005853241bc2cac6941e0f7</id>
<content type='text'>
Summary:
The FileSpec class is often used as a sort of a pattern -- one specifies
a bare file name to search, and we check if in matches the full file
name of an existing module (for example).

These comparisons used FileSpec::Equal, which had some support for it
(via the full=false argument), but it was not a good fit for this job.

For one, it did a symmetric comparison, which makes sense for a function
called "equal", but not for typical searches (when searching for
"/foo/bar.so", we don't want to find a module whose name is just
"bar.so"). This resulted in patterns like:
    if (FileSpec::Equal(pattern, file, pattern.GetDirectory()))
which would request a "full" match only if the pattern really contained
a directory. This worked, but the intended behavior was very unobvious.

On top of that, a lot of the code wanted to handle the case of an
"empty" pattern, and treat it as matching everything. This resulted in
conditions like:
    if (pattern &amp;&amp; !FileSpec::Equal(pattern, file, pattern.GetDirectory())
which are nearly impossible to decipher.

This patch introduces a FileSpec::Match function, which does exactly
what most of FileSpec::Equal callers want, an asymmetric match between a
"pattern" FileSpec and a an actual FileSpec. Empty paterns match
everything, filename-only patterns match only the filename component.

I've tried to update all callers of FileSpec::Equal to use a simpler
interface. Those that hardcoded full=true have been changed to use
operator==. Those passing full=pattern.GetDirectory() have been changed
to use FileSpec::Match.

There was also a handful of places which hardcoded full=false. I've
changed these to use FileSpec::Match too. This is a slight change in
semantics, but it does not look like that was ever intended, and it was
more likely a result of a misunderstanding of the "proper" way to use
FileSpec::Equal.

[In an ideal world a "FileSpec" and a "FileSpec pattern" would be two
different types, but given how widespread FileSpec is, it is unlikely
we'll get there in one go. This at least provides a good starting point
by centralizing all matching behavior.]

Reviewers: teemperor, JDevlieghere, jdoerfert

Subscribers: emaste, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70851
</content>
</entry>
<entry>
<title>[lldb][NFC] Use raw_ostream instead of Stream in Baton::GetDescription</title>
<updated>2019-12-02T12:27:21+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>risemann@apple.com</email>
</author>
<published>2019-11-30T14:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4f728bfc13c45bc744bfdbfc3086bed74a8cbb4c'/>
<id>urn:sha1:4f728bfc13c45bc744bfdbfc3086bed74a8cbb4c</id>
<content type='text'>
Removing raw_ostream here is getting us closer to removing LLDB's Stream
class.
</content>
</entry>
<entry>
<title>[lldb] Remove FileSpec-&gt;CompileUnit inheritance</title>
<updated>2019-11-29T10:44:45+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2019-11-28T15:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=38870af8594726edf32aa0fd8fd9e8916df333af'/>
<id>urn:sha1:38870af8594726edf32aa0fd8fd9e8916df333af</id>
<content type='text'>
Summary:
CompileUnit is a complicated class. Having it be implicitly convertible
to a FileSpec makes reasoning about it even harder.

This patch replaces the inheritance by a simple member and an accessor
function. This avoid the need for casting in places where one needed to
force a CompileUnit to be treated as a FileSpec, and does not add much
verbosity elsewhere.

It also fixes a bug where we were wrongly comparing CompileUnit&amp; and a
CompileUnit*, which compiled due to a combination of this inheritance
and the FileSpec*-&gt;FileSpec implicit constructor.

Reviewers: teemperor, JDevlieghere, jdoerfert

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70827
</content>
</entry>
<entry>
<title>Modernize the rest of the Find.* API (NFC)</title>
<updated>2019-10-17T19:56:40+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-10-17T19:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1ad655e255090620705eb4ce85d869a54d971912'/>
<id>urn:sha1:1ad655e255090620705eb4ce85d869a54d971912</id>
<content type='text'>
This patch removes the size_t return value and the append parameter
from the remainder of the Find.* functions in LLDB's internal API. As
in the previous patches, this is motivated by the fact that these
parameters aren't really used, and in the case of the append parameter
were frequently implemented incorrectly.

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

llvm-svn: 375160
</content>
</entry>
<entry>
<title>Implement serializing scripted breakpoints and their extra args.</title>
<updated>2019-10-10T17:44:50+00:00</updated>
<author>
<name>Jim Ingham</name>
<email>jingham@apple.com</email>
</author>
<published>2019-10-10T17:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=47b33dcc0df8220a5708ff57210c9b44b764bb8e'/>
<id>urn:sha1:47b33dcc0df8220a5708ff57210c9b44b764bb8e</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D68750

llvm-svn: 374394
</content>
</entry>
<entry>
<title>[lldb][NFC] Remove strange bool parameter from Searcher::SearchCallback</title>
<updated>2019-10-10T11:26:51+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-10-10T11:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=95e264fc8a9335acec624c64a8352fb87a0dfa01'/>
<id>urn:sha1:95e264fc8a9335acec624c64a8352fb87a0dfa01</id>
<content type='text'>
Summary:
The SearchCallback has a bool parameter that we always set to false, we never use in any callback implementation and that also changes its name
from one file to the other (either `containing` and `complete`). It was added in the original LLDB check in, so there isn't any history what
this was supposed to be, so let's just remove it.

Reviewers: jingham, JDevlieghere, labath

Reviewed By: jingham, labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 374313
</content>
</entry>
<entry>
<title>[lldb] Avoid resource leak</title>
<updated>2019-10-08T15:56:02+00:00</updated>
<author>
<name>Konrad Kleine</name>
<email>kkleine@redhat.com</email>
</author>
<published>2019-10-08T15:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a'/>
<id>urn:sha1:6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a</id>
<content type='text'>
Summary:
Before the pointer variable `args_dict` was assigned the result of an
allocation with `new` and then `args_dict` is passed to
`GetValueForKeyAsDictionary` which immediatly and unconditionally
assigns `args_dict` to `nullptr`:

```
    bool GetValueForKeyAsDictionary(llvm::StringRef key,
                                    Dictionary *&amp;result) const {
      result = nullptr;
```

This caused a memory leak which was found in my coverity scan instance
under CID 224753: https://scan.coverity.com/projects/kwk-llvm-project.

Reviewers: jankratochvil, teemperor

Reviewed By: teemperor

Subscribers: teemperor, lldb-commits

Tags: #lldb

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

llvm-svn: 374071
</content>
</entry>
<entry>
<title>[lldb][NFC] Remove ArgEntry::ref member</title>
<updated>2019-09-13T11:26:48+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-09-13T11:26:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=0d9a201e2624998922f825ebbe01aae0cce4bbd5'/>
<id>urn:sha1:0d9a201e2624998922f825ebbe01aae0cce4bbd5</id>
<content type='text'>
The StringRef should always be identical to the C string, so we
might as well just create the StringRef from the C-string. This
might be slightly slower until we implement the storage of ArgEntry
with a string instead of a std::unique_ptr&lt;char[]&gt;. Until then we
have to do the additional strlen on the C string to construct the
StringRef.

llvm-svn: 371842
</content>
</entry>
</feed>
