<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Expression/REPL.cpp, branch users/nico/python-1</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] Synchronize the debuggers output &amp; error streams</title>
<updated>2025-02-20T04:32:00+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-02-20T04:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58279d1ee1b567e8ca793d6d1eb6e0f1d5e7279e'/>
<id>58279d1ee1b567e8ca793d6d1eb6e0f1d5e7279e</id>
<content type='text'>
This patch improves the synchronization of the debugger's output and error
streams using two new abstractions: `LockableStreamFile` and
`LockedStreamFile`.

 - `LockableStreamFile` is a wrapper around a `StreamFile` and a mutex. Client
   cannot use the `StreamFile` without calling `Lock`, which returns a
   `LockedStreamFile`.

 - `LockedStreamFile` is an RAII object that locks the stream for the duration
   of its existence.  As long as you hold on to the returned object you are
   permitted to write to the stream. The destruction of the object
   automatically flush the output stream.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch improves the synchronization of the debugger's output and error
streams using two new abstractions: `LockableStreamFile` and
`LockedStreamFile`.

 - `LockableStreamFile` is a wrapper around a `StreamFile` and a mutex. Client
   cannot use the `StreamFile` without calling `Lock`, which returns a
   `LockedStreamFile`.

 - `LockedStreamFile` is an RAII object that locks the stream for the duration
   of its existence.  As long as you hold on to the returned object you are
   permitted to write to the stream. The destruction of the object
   automatically flush the output stream.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Refactor UserExpression::Evaluate to only have one error channel. (#117186)</title>
<updated>2024-11-21T23:37:04+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-11-21T23:37:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a8a4d51a4415aa453b79f999bed411bad6c3723'/>
<id>6a8a4d51a4415aa453b79f999bed411bad6c3723</id>
<content type='text'>
Prior to this patch, the function returned an exit status, sometimes a
ValueObject with an error and a Status object. This patch removes the
Status object and ensures the error is consistently returned as the
error of the ValueObject.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this patch, the function returned an exit status, sometimes a
ValueObject with an error and a Status object. This patch removes the
Status object and ensures the error is consistently returned as the
error of the ValueObject.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Deal with SupportFiles in SourceManager (NFC) (#106740)</title>
<updated>2024-08-30T17:58:32+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-08-30T17:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=130eddf7a13f15c9c48b7fa7faf60e9bbee4f703'/>
<id>130eddf7a13f15c9c48b7fa7faf60e9bbee4f703</id>
<content type='text'>
To support detecting MD5 checksum mismatches, deal with SupportFiles
rather than a plain FileSpecs in the SourceManager.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To support detecting MD5 checksum mismatches, deal with SupportFiles
rather than a plain FileSpecs in the SourceManager.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use StringRef::{starts,ends}_with (NFC)</title>
<updated>2023-12-16T22:39:37+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-16T22:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=744f38913fa380580431df0ae89ef5fb3df30240'/>
<id>744f38913fa380580431df0ae89ef5fb3df30240</id>
<content type='text'>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Fix IOHandlerEditline::GetCurrentLines()</title>
<updated>2023-09-02T00:52:00+00:00</updated>
<author>
<name>walter erquinigo</name>
<email>walter@modular.com</email>
</author>
<published>2023-08-30T14:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f9cd6377f3d972ed8cf814225a02a353d6cc545'/>
<id>2f9cd6377f3d972ed8cf814225a02a353d6cc545</id>
<content type='text'>
This method was working as expected if LLDB_ENABLE_LIBEDIT is false, however, if it was true, then the variable m_current_lines_ptr was always pointing to an empty list, because Editline only updates its contents once the full input has been completed (see https://github.com/llvm/llvm-project/blob/main/lldb/source/Host/common/Editline.cpp#L1576).

A simple fix is to invoke Editline::GetInputAsStringList() from GetCurrentLines(), which is already used in many places as the common way to get the full input list.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This method was working as expected if LLDB_ENABLE_LIBEDIT is false, however, if it was true, then the variable m_current_lines_ptr was always pointing to an empty list, because Editline only updates its contents once the full input has been completed (see https://github.com/llvm/llvm-project/blob/main/lldb/source/Host/common/Editline.cpp#L1576).

A simple fix is to invoke Editline::GetInputAsStringList() from GetCurrentLines(), which is already used in many places as the common way to get the full input list.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Sink StreamFile into lldbHost</title>
<updated>2023-08-10T00:17:18+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-08-09T00:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f2d32ddcec82c20582c6aa32558b82ca7c3d3c50'/>
<id>f2d32ddcec82c20582c6aa32558b82ca7c3d3c50</id>
<content type='text'>
StreamFile subclasses Stream (from lldbUtility) and is backed by a File
(from lldbHost). It does not depend on anything from lldbCore or any of its
sibling libraries, so I think it makes sense for this to live in
lldbHost instead.

Differential Revision: https://reviews.llvm.org/D157460
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StreamFile subclasses Stream (from lldbUtility) and is backed by a File
(from lldbHost). It does not depend on anything from lldbCore or any of its
sibling libraries, so I think it makes sense for this to live in
lldbHost instead.

Differential Revision: https://reviews.llvm.org/D157460
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFCI] Remove use of ConstString from IOHandler</title>
<updated>2023-06-15T21:57:20+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-05-26T22:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e29cc5216a8608b026e390b69022878b2ec3071a'/>
<id>e29cc5216a8608b026e390b69022878b2ec3071a</id>
<content type='text'>
None of these need to be in the ConstString StringPool. For the most
part they are constant strings and do not require fast comparisons.

I did change IOHandlerDelegateMultiline slightly -- specifically, the
`m_end_line` member always has a `\n` at the end of it now. This was so
that `IOHandlerGetControlSequence` can always return a StringRef. This
did require a slight change to `IOHandlerIsInputComplete` where we must
drop the newline before comparing it against the input parameter.

Differential Revision: https://reviews.llvm.org/D151597
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
None of these need to be in the ConstString StringPool. For the most
part they are constant strings and do not require fast comparisons.

I did change IOHandlerDelegateMultiline slightly -- specifically, the
`m_end_line` member always has a `\n` at the end of it now. This was so
that `IOHandlerGetControlSequence` can always return a StringRef. This
did require a slight change to `IOHandlerIsInputComplete` where we must
drop the newline before comparing it against the input parameter.

Differential Revision: https://reviews.llvm.org/D151597
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFCI] Change return type of REPL::GetSourceFileBasename</title>
<updated>2023-06-05T19:52:38+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-06-02T01:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0bb6f832fbf8ae022063c07e2090f07832136bd4'/>
<id>0bb6f832fbf8ae022063c07e2090f07832136bd4</id>
<content type='text'>
These don't really need to be in the ConstString StringPool. I've
changed the return type to StringRef because on llvm.org and downstream
in the swift fork, this returns a constant value. We could change it to
return a std::string or something else if it needs to be able to change
between calls.

Differential Revision: https://reviews.llvm.org/D151962
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These don't really need to be in the ConstString StringPool. I've
changed the return type to StringRef because on llvm.org and downstream
in the swift fork, this returns a constant value. We could change it to
return a std::string or something else if it needs to be able to change
between calls.

Differential Revision: https://reviews.llvm.org/D151962
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Add some declarations related to REPL support for mojo</title>
<updated>2023-05-23T18:39:43+00:00</updated>
<author>
<name>walter erquinigo</name>
<email>walter@modular.com</email>
</author>
<published>2023-05-10T20:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f237513cda8e6ec32579ff047b008e22422db2ff'/>
<id>f237513cda8e6ec32579ff047b008e22422db2ff</id>
<content type='text'>
This simple diff declares some enum values needed to create a REPL for the mojo language.

Differential Revision: https://reviews.llvm.org/D150303
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This simple diff declares some enum values needed to create a REPL for the mojo language.

Differential Revision: https://reviews.llvm.org/D150303
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Add a hook to notify REPLs that an expression was evaluated</title>
<updated>2023-05-04T19:44:03+00:00</updated>
<author>
<name>walter erquinigo</name>
<email>walter@modular.com</email>
</author>
<published>2023-05-03T02:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bfb7c99f3aeab09236adf1f684f7144f384c6dd7'/>
<id>bfb7c99f3aeab09236adf1f684f7144f384c6dd7</id>
<content type='text'>
REPL implementations don't have an easy way to know that an expression has been evaluated, so I'm adding a simple function for that. In the future we can add another hook for meta commands.

Differential Revision: https://reviews.llvm.org/D149719
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
REPL implementations don't have an easy way to know that an expression has been evaluated, so I'm adding a simple function for that. In the future we can add another hook for meta commands.

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