<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/API/SBCommandReturnObject.cpp, 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] Ensure FILE* access mode is correctly specified when creating a NativeFile. (#167764)</title>
<updated>2025-11-17T18:51:13+00:00</updated>
<author>
<name>John Harrison</name>
<email>harjohn@google.com</email>
</author>
<published>2025-11-17T18:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bb9df2e3bd7ec903f5040ec9e78bdc9e06561d67'/>
<id>bb9df2e3bd7ec903f5040ec9e78bdc9e06561d67</id>
<content type='text'>
If we open a `NativeFile` with a `FILE*`, the OpenOptions default to
`eOpenOptionReadOnly`. This is an issue in python scripts if you try to
write to one of the files like `print("Hi",
file=lldb.debugger.GetOutputFileHandle())`.

To address this, we need to specify the access mode whenever we create a
`NativeFile` from a `FILE*`. I also added an assert on the `NativeFile`
that validates the file is opened with the correct access mode and
updated `NativeFile::Read` and `NativeFile::Write` to check the access
mode.

Before these changes:
```
$ lldb -b -O 'script lldb.debugger.GetOutputFileHandle().write("abc")'
(lldb) script lldb.debugger.GetOutputFileHandle().write("abc")
Traceback (most recent call last):
  File "&lt;input&gt;", line 1, in &lt;module&gt;
io.UnsupportedOperation: not writable
```

After:
```
$ lldb -b -O 'script lldb.debugger.GetOutputFileHandle().write("abc")'
(lldb) script lldb.debugger.GetOutputFileHandle().write("abc")
abc3
```

Fixes #122387</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we open a `NativeFile` with a `FILE*`, the OpenOptions default to
`eOpenOptionReadOnly`. This is an issue in python scripts if you try to
write to one of the files like `print("Hi",
file=lldb.debugger.GetOutputFileHandle())`.

To address this, we need to specify the access mode whenever we create a
`NativeFile` from a `FILE*`. I also added an assert on the `NativeFile`
that validates the file is opened with the correct access mode and
updated `NativeFile::Read` and `NativeFile::Write` to check the access
mode.

Before these changes:
```
$ lldb -b -O 'script lldb.debugger.GetOutputFileHandle().write("abc")'
(lldb) script lldb.debugger.GetOutputFileHandle().write("abc")
Traceback (most recent call last):
  File "&lt;input&gt;", line 1, in &lt;module&gt;
io.UnsupportedOperation: not writable
```

After:
```
$ lldb -b -O 'script lldb.debugger.GetOutputFileHandle().write("abc")'
(lldb) script lldb.debugger.GetOutputFileHandle().write("abc")
abc3
```

Fixes #122387</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Store the return SBValueList in the CommandReturnObject (#127566)</title>
<updated>2025-02-19T23:17:35+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-02-19T23:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f62f13d5db212b4bebe6fc143fb9827703e88dfd'/>
<id>f62f13d5db212b4bebe6fc143fb9827703e88dfd</id>
<content type='text'>
There are a lot of lldb commands whose result is really one or more
ValueObjects that we then print with the ValueObjectPrinter. Now that we
have the ability to access the SBCommandReturnObject through a callback
(#125006), we can store the resultant ValueObjects in the return object,
allowing an IDE to access the SBValues and do its own rich formatting.

rdar://143965453</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a lot of lldb commands whose result is really one or more
ValueObjects that we then print with the ValueObjectPrinter. Now that we
have the ability to access the SBCommandReturnObject through a callback
(#125006), we can store the resultant ValueObjects in the return object,
allowing an IDE to access the SBValues and do its own rich formatting.

rdar://143965453</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Store the command in the CommandReturnObject (#125132)</title>
<updated>2025-02-04T16:55:30+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-02-04T16:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=906eeeda833b30fb7fdc3b7586de34b65d575b45'/>
<id>906eeeda833b30fb7fdc3b7586de34b65d575b45</id>
<content type='text'>
As suggested in #125006. Depending on which PR lands first, I'll update
`TestCommandInterepterPrintCallback.py` to check that the
`CommandReturnObject` passed to the callback has the correct command.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As suggested in #125006. Depending on which PR lands first, I'll update
`TestCommandInterepterPrintCallback.py` to check that the
`CommandReturnObject` passed to the callback has the correct command.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Expose structured command diagnostics via the SBAPI. (#112109)</title>
<updated>2024-10-14T23:29:26+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-10-14T23:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9eddc8b9bf4e4e0b01e2ecc90a71c4b3b4e9c8af'/>
<id>9eddc8b9bf4e4e0b01e2ecc90a71c4b3b4e9c8af</id>
<content type='text'>
This allows IDEs to render LLDB expression diagnostics to their liking
without relying on characterprecise ASCII art from LLDB. It is exposed
as a versioned SBStructuredData object, since it is expected that this
may need to be tweaked based on actual usage.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows IDEs to render LLDB expression diagnostics to their liking
without relying on characterprecise ASCII art from LLDB. It is exposed
as a versioned SBStructuredData object, since it is expected that this
may need to be tweaked based on actual usage.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Rename CommandReturnObject::Get.*Data -&gt; Get.*String (#112062)</title>
<updated>2024-10-12T20:36:33+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-10-12T20:36:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2750807ba2a419425ee90dadda09ad5121517fe'/>
<id>c2750807ba2a419425ee90dadda09ad5121517fe</id>
<content type='text'>
In a later commit, I want to add a method to access diagnostics as
actual structured data, which will make these function names rather
confusing.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a later commit, I want to add a method to access diagnostics as
actual structured data, which will make these function names rather
confusing.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Unify implementation of CommandReturnObject::SetError(NFC) (#110707)</title>
<updated>2024-10-02T16:11:47+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-10-02T16:11:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8789c96698e027b0dd40b6e0475181505d6b8984'/>
<id>8789c96698e027b0dd40b6e0475181505d6b8984</id>
<content type='text'>
This is a cleanup that moves the API towards value semantics.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a cleanup that moves the API towards value semantics.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Remove redundant .c_str() and .get() calls"</title>
<updated>2022-12-19T08:52:10+00:00</updated>
<author>
<name>Muhammad Omair Javaid</name>
<email>omair.javaid@linaro.org</email>
</author>
<published>2022-12-19T08:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58e9cc13e24f668a33abdae201d59a02e10c22c0'/>
<id>58e9cc13e24f668a33abdae201d59a02e10c22c0</id>
<content type='text'>
This reverts commit fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.

This has broken all LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/68/builds/44990
https://lab.llvm.org/buildbot/#/builders/96/builds/33160
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.

This has broken all LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/68/builds/44990
https://lab.llvm.org/buildbot/#/builders/96/builds/33160
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove redundant .c_str() and .get() calls</title>
<updated>2022-12-18T01:15:25+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-12-18T01:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd'/>
<id>fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd</id>
<content type='text'>
Removing .c_str() has a semantics difference, but the use scenarios
likely do not matter as we don't have NUL in the strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing .c_str() has a semantics difference, but the use scenarios
likely do not matter as we don't have NUL in the strings.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Decouple instrumentation from the reproducers</title>
<updated>2022-01-21T02:06:14+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-01-19T19:38:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1755f5b1d7b7871672abdf0fde5ccd091b8dbc04'/>
<id>1755f5b1d7b7871672abdf0fde5ccd091b8dbc04</id>
<content type='text'>
Remove the last remaining references to the reproducers from the
instrumentation. This patch renames the relevant files and macros.

Differential revision: https://reviews.llvm.org/D117712
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the last remaining references to the reproducers from the
instrumentation. This patch renames the relevant files and macros.

Differential revision: https://reviews.llvm.org/D117712
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove LLDB_RECORD_DUMMY_* macros</title>
<updated>2022-01-10T20:05:54+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-01-10T20:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da4b7437f932570227b9debecc031a40875445fa'/>
<id>da4b7437f932570227b9debecc031a40875445fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
