<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/Shell/Driver, 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] Don't emit .lldbinit warning as an error (#163265)</title>
<updated>2025-10-13T22:43:52+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-10-13T22:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf6880c9970c760f3459a0ec25fac142211e6f78'/>
<id>bf6880c9970c760f3459a0ec25fac142211e6f78</id>
<content type='text'>
Actually emit a warning, rather than an error, when there's an .lldbinit
file in the current directly. Currently, the message is prepended by
"error" which looks rather odd, as the warning refers to itself as a
warning.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Actually emit a warning, rather than an error, when there's an .lldbinit
file in the current directly. Currently, the message is prepended by
"error" which looks rather odd, as the warning refers to itself as a
warning.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Emit an error when using --wait-for without a name or pid (#142424)</title>
<updated>2025-06-03T16:19:50+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-06-03T16:19:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a9032712c453bda70449dedcaf00bead0fea6e88'/>
<id>a9032712c453bda70449dedcaf00bead0fea6e88</id>
<content type='text'>
Emit an error when using --wait-for without a name and correct the help
output to specify a name must be provided, rather than a name or PID.

Motivated by
https://discourse.llvm.org/t/why-is-wait-for-not-attaching/86636</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Emit an error when using --wait-for without a name and correct the help
output to specify a name must be provided, rather than a name or PID.

Motivated by
https://discourse.llvm.org/t/why-is-wait-for-not-attaching/86636</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove lldb-repro utility</title>
<updated>2024-10-31T17:39:48+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-10-31T17:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=88591aa0ca7e4d99da353d49f91ea63e43fb55e0'/>
<id>88591aa0ca7e4d99da353d49f91ea63e43fb55e0</id>
<content type='text'>
Remove lldb-repro which was used to run the test suite against a
reproducer. The corresponding functionality has been removed from LLDB
so there's no need for the tool anymore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove lldb-repro which was used to run the test suite against a
reproducer. The corresponding functionality has been removed from LLDB
so there's no need for the tool anymore.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Change unsupported cat -e to cat -v to work with lit internal shell (#104878)</title>
<updated>2024-08-20T18:54:17+00:00</updated>
<author>
<name>Connie Zhu</name>
<email>60797237+connieyzhu@users.noreply.github.com</email>
</author>
<published>2024-08-20T18:54:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6558e04f02858bff61c01c9ec0900849fc8532f5'/>
<id>6558e04f02858bff61c01c9ec0900849fc8532f5</id>
<content type='text'>
This patch changes the test that uses the `cat -e` option to `cat -v` so
that the test can be run using lit's internal shell. For `cat`, the `-v`
option prints non-printing characters in ^ and M- notation, while the
`-e` option adds `$` to the end of lines in addition to printing
non-printing characters in ^ and M- notation. This is an alternative
patch to https://github.com/llvm/llvm-project/pull/102061, opting to
rewrite the test that uses `cat -e` instead of extending support to the
`-e` option.

Fixes https://github.com/llvm/llvm-project/issues/102377</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the test that uses the `cat -e` option to `cat -v` so
that the test can be run using lit's internal shell. For `cat`, the `-v`
option prints non-printing characters in ^ and M- notation, while the
`-e` option adds `$` to the end of lines in addition to printing
non-printing characters in ^ and M- notation. This is an alternative
patch to https://github.com/llvm/llvm-project/pull/102061, opting to
rewrite the test that uses `cat -e` instead of extending support to the
`-e` option.

Fixes https://github.com/llvm/llvm-project/issues/102377</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove -d(ebug) mode from the lldb driver (#83330)</title>
<updated>2024-02-28T23:23:55+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-28T23:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d3173f4ab61c17337908eb7df3f1c515ddcd428c'/>
<id>d3173f4ab61c17337908eb7df3f1c515ddcd428c</id>
<content type='text'>
The -d(ebug) option broke 5 years ago when I migrated the driver to
libOption. Since then, we were never check if the option is set. We were
incorrectly toggling the internal variable (m_debug_mode) based on
OPT_no_use_colors instead.

Given that the functionality doesn't seem particularly useful and nobody
noticed it has been broken for 5 years, I'm just removing the flag.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The -d(ebug) option broke 5 years ago when I migrated the driver to
libOption. Since then, we were never check if the option is set. We were
incorrectly toggling the internal variable (m_debug_mode) based on
OPT_no_use_colors instead.

Given that the functionality doesn't seem particularly useful and nobody
noticed it has been broken for 5 years, I'm just removing the flag.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Respect empty arguments in target.run-args</title>
<updated>2023-03-07T19:29:27+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-03-07T00:04:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ca8faf8f465962e5c39d145a0e2236648cbcc27d'/>
<id>ca8faf8f465962e5c39d145a0e2236648cbcc27d</id>
<content type='text'>
Currently empty arguments are not respected. They are silently dropped
in two places: (1) when extracting them from the target.run-args
setting and (2) when constructing the lldb-argdumper invocation.

(1) is actually a regression from a few years ago. We did not always
drop empty arguments. See 31d97a5c8ab78c619deada0cdb1fcf64021d25dd.

rdar://106279228

Differential Revision: https://reviews.llvm.org/D145450
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently empty arguments are not respected. They are silently dropped
in two places: (1) when extracting them from the target.run-args
setting and (2) when constructing the lldb-argdumper invocation.

(1) is actually a regression from a few years ago. We did not always
drop empty arguments. See 31d97a5c8ab78c619deada0cdb1fcf64021d25dd.

rdar://106279228

Differential Revision: https://reviews.llvm.org/D145450
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix CommandInterpreter::DidProcessStopAbnormally() with multiple threads</title>
<updated>2022-09-26T08:05:42+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2022-09-16T13:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a3597d73c8f694ca8c991d8cb4bb97a4ac8ba8c'/>
<id>8a3597d73c8f694ca8c991d8cb4bb97a4ac8ba8c</id>
<content type='text'>
If a process has multiple threads, the thread with the stop
info might not be the first one in the thread list.

On Windows, under certain circumstances, processes seem to have
one or more extra threads that haven't been launched by the
executable itself, waiting in NtWaitForWorkViaWorkerFactory. If the
main (stopped) thread isn't the first one in the list (the order
seems nondeterministic), DidProcessStopAbnormally() would return
false prematurely, instead of inspecting later threads.

The main observable effect of DidProcessStopAbnormally() erroneously
returning false, is when running lldb with multiple "-o" parameters
to specify multiple commands to execute on the command line.

After an abnormal stop, lldb would stop executing "-o" parameters
and execute "-k" parameters instead - but due to this issue, it
would instead keep executing "-o" parameters as if there was no
abnormal stop. (If multiple parameters are specified via a script
file via the "-s" option, all of the commands in that file are
executed regardless of whether there's an abnormal stop inbetween.)

Differential Revision: https://reviews.llvm.org/D134037
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a process has multiple threads, the thread with the stop
info might not be the first one in the thread list.

On Windows, under certain circumstances, processes seem to have
one or more extra threads that haven't been launched by the
executable itself, waiting in NtWaitForWorkViaWorkerFactory. If the
main (stopped) thread isn't the first one in the list (the order
seems nondeterministic), DidProcessStopAbnormally() would return
false prematurely, instead of inspecting later threads.

The main observable effect of DidProcessStopAbnormally() erroneously
returning false, is when running lldb with multiple "-o" parameters
to specify multiple commands to execute on the command line.

After an abnormal stop, lldb would stop executing "-o" parameters
and execute "-k" parameters instead - but due to this issue, it
would instead keep executing "-o" parameters as if there was no
abnormal stop. (If multiple parameters are specified via a script
file via the "-s" option, all of the commands in that file are
executed regardless of whether there's an abnormal stop inbetween.)

Differential Revision: https://reviews.llvm.org/D134037
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove LLDB reproducers</title>
<updated>2022-09-19T21:43:31+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-09-19T17:47:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=70599d70273b671b1b2e6a0e0b9c11e413209647'/>
<id>70599d70273b671b1b2e6a0e0b9c11e413209647</id>
<content type='text'>
This patch removes the remaining reproducer code. The SBReproducer class
remains for ABI stability but is just an empty shell. This completes the
removal process outlined on the mailing list [1].

[1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes the remaining reproducer code. The SBReproducer class
remains for ABI stability but is just an empty shell. This completes the
removal process outlined on the mailing list [1].

[1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Fix TestConvenienceVariables.test AArch64/Windows</title>
<updated>2022-07-13T11:46:55+00:00</updated>
<author>
<name>Muhammad Omair Javaid</name>
<email>omair.javaid@linaro.org</email>
</author>
<published>2022-07-13T11:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f827b4b657d5922beef3799337e91ba98fce852e'/>
<id>f827b4b657d5922beef3799337e91ba98fce852e</id>
<content type='text'>
This patch fixes TestConvenienceVariables.test for AArch64 Windows.
Clang/LLD was unable to find printf apparently available as a macro
definition in stdio.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes TestConvenienceVariables.test for AArch64 Windows.
Clang/LLD was unable to find printf apparently available as a macro
definition in stdio.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][bindings] Implement __repr__ instead of __str__</title>
<updated>2022-06-11T17:19:51+00:00</updated>
<author>
<name>Dave Lee</name>
<email>davelee.com@gmail.com</email>
</author>
<published>2022-06-09T15:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c7a56af3072c2fa89f0968d7f00b22f7bff0812b'/>
<id>c7a56af3072c2fa89f0968d7f00b22f7bff0812b</id>
<content type='text'>
When using the `script` Python repl, SB objects are printed in a way that gives
the user no information. The simplest example is:

```
(lldb) script lldb.debugger
&lt;lldb.SBDebugger; proxy of &lt;Swig Object of type 'lldb::SBDebugger *' at 0x1097a5de0&gt; &gt;
```

This output comes from the Python repl printing the `repr()` of an object.

None of the SB classes implement `__repr__`, and all print like the above.
However, many (most?, all?) SB classes implement `__str__`. Because they
implement `__str__`, a more detailed output can be had by `print`ing the
object, for example:

```
(lldb) script print(lldb.debugger)
Debugger (instance: "debugger_1", id: 1)
```

For convenience, this change switches all SB classes that implement to
`__str__` to instead implement `__repr__`. **The result is that `str()` and
`repr()` will produce the same output**. This is because `str` calls `__repr__`
for classes that have  no `__str__` method.

The benefit being that when writing a `script` invocation, you don't need to
remember to wrap in `print()`. If that isn't enough motivation, consider the
case where your Python expression results in a list of SB objects, in that case
you'd have to `map` or use a list comprehension like `[str(x) for x in &lt;expr&gt;]`
in order to see the details of the objects in the list.

For reference, the docs for `repr` say:

&gt; repr(object)
&gt;   Return a string containing a printable representation of an object. For
&gt;   many types, this function makes an attempt to return a string that would
&gt;   yield an object with the same value when passed to eval(); otherwise, the
&gt;   representation is a string enclosed in angle brackets that contains the
&gt;   name of the type of the object together with additional information often
&gt;   including the name and address of the object. A class can control what this
&gt;   function returns for its instances by defining a __repr__() method.

and the docs for `__repr__` say:

&gt; object.__repr__(self)
&gt;   Called by the repr() built-in function to compute the “official” string
&gt;   representation of an object. If at all possible, this should look like a
&gt;   valid Python expression that could be used to recreate an object with the
&gt;   same value (given an appropriate environment). If this is not possible, a
&gt;   string of the form &lt;...some useful description...&gt; should be returned. The
&gt;   return value must be a string object. If a class defines __repr__() but not
&gt;   __str__(), then __repr__() is also used when an “informal” string
&gt;   representation of instances of that class is required.
&gt;
&gt;   This is typically used for debugging, so it is important that the
&gt;   representation is information-rich and unambiguous.

Even if it were convenient to construct Python expressions for SB classes so
that they could be `eval`'d, however for typical lldb usage, I can't think of a
motivating reason to do so. As it stands, the only action the docs say to do,
that this change doesn't do, is wrap the `repr` string in `&lt;&gt;` angle brackets.

An alternative implementation is to change lldb's python repl to apply `str()`
to the top level result. While this would work well in the case of a single SB
object, it doesn't work for a list of SB objects, since `str([x])` uses `repr`
to convert each list element to a string.

Differential Revision: https://reviews.llvm.org/D127458
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using the `script` Python repl, SB objects are printed in a way that gives
the user no information. The simplest example is:

```
(lldb) script lldb.debugger
&lt;lldb.SBDebugger; proxy of &lt;Swig Object of type 'lldb::SBDebugger *' at 0x1097a5de0&gt; &gt;
```

This output comes from the Python repl printing the `repr()` of an object.

None of the SB classes implement `__repr__`, and all print like the above.
However, many (most?, all?) SB classes implement `__str__`. Because they
implement `__str__`, a more detailed output can be had by `print`ing the
object, for example:

```
(lldb) script print(lldb.debugger)
Debugger (instance: "debugger_1", id: 1)
```

For convenience, this change switches all SB classes that implement to
`__str__` to instead implement `__repr__`. **The result is that `str()` and
`repr()` will produce the same output**. This is because `str` calls `__repr__`
for classes that have  no `__str__` method.

The benefit being that when writing a `script` invocation, you don't need to
remember to wrap in `print()`. If that isn't enough motivation, consider the
case where your Python expression results in a list of SB objects, in that case
you'd have to `map` or use a list comprehension like `[str(x) for x in &lt;expr&gt;]`
in order to see the details of the objects in the list.

For reference, the docs for `repr` say:

&gt; repr(object)
&gt;   Return a string containing a printable representation of an object. For
&gt;   many types, this function makes an attempt to return a string that would
&gt;   yield an object with the same value when passed to eval(); otherwise, the
&gt;   representation is a string enclosed in angle brackets that contains the
&gt;   name of the type of the object together with additional information often
&gt;   including the name and address of the object. A class can control what this
&gt;   function returns for its instances by defining a __repr__() method.

and the docs for `__repr__` say:

&gt; object.__repr__(self)
&gt;   Called by the repr() built-in function to compute the “official” string
&gt;   representation of an object. If at all possible, this should look like a
&gt;   valid Python expression that could be used to recreate an object with the
&gt;   same value (given an appropriate environment). If this is not possible, a
&gt;   string of the form &lt;...some useful description...&gt; should be returned. The
&gt;   return value must be a string object. If a class defines __repr__() but not
&gt;   __str__(), then __repr__() is also used when an “informal” string
&gt;   representation of instances of that class is required.
&gt;
&gt;   This is typically used for debugging, so it is important that the
&gt;   representation is information-rich and unambiguous.

Even if it were convenient to construct Python expressions for SB classes so
that they could be `eval`'d, however for typical lldb usage, I can't think of a
motivating reason to do so. As it stands, the only action the docs say to do,
that this change doesn't do, is wrap the `repr` string in `&lt;&gt;` angle brackets.

An alternative implementation is to change lldb's python repl to apply `str()`
to the top level result. While this would work well in the case of a single SB
object, it doesn't work for a list of SB objects, since `str([x])` uses `repr`
to convert each list element to a string.

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