<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/functionalities/completion, 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] Add more command option mnemonics (#155705)</title>
<updated>2025-09-04T20:21:24+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-09-04T20:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2498f0bcf5ddb08da7290d7bf211120236627b81'/>
<id>2498f0bcf5ddb08da7290d7bf211120236627b81</id>
<content type='text'>
Add a bunch of mnemonics to the command options now that they're
highlighted in the help output. This uncovered two issues:

 - We had an instance where we weren't applying the ANSI formatting.
 - We had a place where we were now incorrectly computing the column
   width.

Both are fixed by this PR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a bunch of mnemonics to the command options now that they're
highlighted in the help output. This uncovered two issues:

 - We had an instance where we weren't applying the ANSI formatting.
 - We had a place where we were now incorrectly computing the column
   width.

Both are fixed by this PR.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix term settings completion tests (#139447)</title>
<updated>2025-05-11T21:47:21+00:00</updated>
<author>
<name>Emmanuel Ferdman</name>
<email>emmanuelferdman@gmail.com</email>
</author>
<published>2025-05-11T21:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2ccfb99d81d9fa9be6b0be02649d987106797979'/>
<id>2ccfb99d81d9fa9be6b0be02649d987106797979</id>
<content type='text'>
# PR Summary
Small PR - Several test functions for `term-width/height` completions
had identical names, causing silent overriding. This gives them distinct
_width/_height suffixes to ensure all tests run.

Signed-off-by: Emmanuel Ferdman &lt;emmanuelferdman@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
# PR Summary
Small PR - Several test functions for `term-width/height` completions
had identical names, causing silent overriding. This gives them distinct
_width/_height suffixes to ensure all tests run.

Signed-off-by: Emmanuel Ferdman &lt;emmanuelferdman@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use the terminal height for paging editline completions (#119914)</title>
<updated>2024-12-16T19:11:17+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-12-16T19:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3dfc1d9b0bc41eaf63e551ca357b44a71636b152'/>
<id>3dfc1d9b0bc41eaf63e551ca357b44a71636b152</id>
<content type='text'>
Currently, we arbitrarily paginate editline completions to 40 elements.
On large terminals, that leaves some real-estate unused. On small
terminals, it's pretty annoying to not see the first completions. We can
address both issues by using the terminal height for pagination.

This builds on the improvements of #116456.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we arbitrarily paginate editline completions to 40 elements.
On large terminals, that leaves some real-estate unused. On small
terminals, it's pretty annoying to not see the first completions. We can
address both issues by using the terminal height for pagination.

This builds on the improvements of #116456.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Support tests with nested make invocations on Windows 1/2 (#112342)</title>
<updated>2024-10-15T12:22:12+00:00</updated>
<author>
<name>Stefan Gränitz</name>
<email>stefan.graenitz@gmail.com</email>
</author>
<published>2024-10-15T12:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4367d2d136420f562f64e7731b9393fb609f3fc'/>
<id>a4367d2d136420f562f64e7731b9393fb609f3fc</id>
<content type='text'>
In recent PR https://github.com/llvm/llvm-project/pull/111531 for
Windows support, we enabled tests that require the `make` tool. On
Windows, default install directories likely contain spaces, in this case
e.g. `C:\Program Files (x86)\GnuWin32\bin\make.exe`. It's typically
handled well by CMake, so that today invocations from `dotest.py` don't
cause issues. However, we also have nested invocations from a number of
Makefiles themselves. These still failed if the path to the `make` tool
contains spaces.

This patch attempts to fix the functionalities/completion test by adding
quotes in the respective Makefile. If it keeps passing on the bots, we can
roll out the fix to all affected tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In recent PR https://github.com/llvm/llvm-project/pull/111531 for
Windows support, we enabled tests that require the `make` tool. On
Windows, default install directories likely contain spaces, in this case
e.g. `C:\Program Files (x86)\GnuWin32\bin\make.exe`. It's typically
handled well by CMake, so that today invocations from `dotest.py` don't
cause issues. However, we also have nested invocations from a number of
Makefiles themselves. These still failed if the path to the `make` tool
contains spaces.

This patch attempts to fix the functionalities/completion test by adding
quotes in the respective Makefile. If it keeps passing on the bots, we can
roll out the fix to all affected tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add frame recognizers for libc++ `std::invoke` (#105695)</title>
<updated>2024-08-27T17:15:42+00:00</updated>
<author>
<name>Adrian Vogelsgesang</name>
<email>avogelsgesang@salesforce.com</email>
</author>
<published>2024-08-27T17:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dd060bdede8edec18ad5ca122e15cc24a821e3fe'/>
<id>dd060bdede8edec18ad5ca122e15cc24a821e3fe</id>
<content type='text'>
With this commit, we also hide the implementation details of
`std::invoke`. To do so, the `LibCXXFrameRecognizer` got a couple more
regular expressions.

The regular expression passed into `AddRecognizer` became problematic,
as it was evaluated on the demangled name. Those names also included
result types for C++ symbols. For `std::__invoke` the return type is a
huge `decltype(...)`, making the regular expresison really hard to
write.

Instead, I added support to `AddRecognizer` for matching on the
demangled names without result type and argument types.

By hiding the implementation details of `invoke`, also the back traces
for `std::function` become even nicer, because `std::function` is using
`__invoke` internally.

Co-authored-by: Adrian Prantl &lt;aprantl@apple.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this commit, we also hide the implementation details of
`std::invoke`. To do so, the `LibCXXFrameRecognizer` got a couple more
regular expressions.

The regular expression passed into `AddRecognizer` became problematic,
as it was evaluated on the demangled name. Those names also included
result types for C++ symbols. For `std::__invoke` the return type is a
huge `decltype(...)`, making the regular expresison really hard to
write.

Instead, I added support to `AddRecognizer` for matching on the
demangled names without result type and argument types.

By hiding the implementation details of `invoke`, also the back traces
for `std::function` become even nicer, because `std::function` is using
`__invoke` internally.

Co-authored-by: Adrian Prantl &lt;aprantl@apple.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Remove duplicate testcase names in API test-suite (#97043)</title>
<updated>2024-06-28T19:08:53+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2024-06-28T19:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4c18137d84bc48df49ee0101bef465a955e62ac'/>
<id>a4c18137d84bc48df49ee0101bef465a955e62ac</id>
<content type='text'>
In one of my recent PRs I mistakenly had two test-cases with the same
name, preventing one of them to run. Since it's an easy mistake to make
(e.g., copy pasting existing test-cases), I ran following sanity-check
script over `lldb/test/API`, which found couple of tests which were
losing coverage because of this (or in some cases simply had duplicate
tests):
```
import ast
import sys

filename = sys.argv[1]
print(f'Checking {filename}...')
tree = ast.parse(open(filename, 'r').read())

for node in ast.walk(tree):
    if not isinstance(node, ast.ClassDef):
        continue

    func_names = []
    for child in ast.iter_child_nodes(node):
        if isinstance(child, ast.FunctionDef):
            func_names.append(child.name)

    seen_func_names = set()
    duplicate_func_names = []
    for name in func_names:
        if name in seen_func_names:
            duplicate_func_names.append(name)
        else:
            seen_func_names.add(name)

    if len(duplicate_func_names) != 0:
        print(f'Multiple func names found:\n\t{duplicate_func_names}\n\tclass {node.name}\n\tfile: {filename}')
```

This patch fixes these cases.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In one of my recent PRs I mistakenly had two test-cases with the same
name, preventing one of them to run. Since it's an easy mistake to make
(e.g., copy pasting existing test-cases), I ran following sanity-check
script over `lldb/test/API`, which found couple of tests which were
losing coverage because of this (or in some cases simply had duplicate
tests):
```
import ast
import sys

filename = sys.argv[1]
print(f'Checking {filename}...')
tree = ast.parse(open(filename, 'r').read())

for node in ast.walk(tree):
    if not isinstance(node, ast.ClassDef):
        continue

    func_names = []
    for child in ast.iter_child_nodes(node):
        if isinstance(child, ast.FunctionDef):
            func_names.append(child.name)

    seen_func_names = set()
    duplicate_func_names = []
    for name in func_names:
        if name in seen_func_names:
            duplicate_func_names.append(name)
        else:
            seen_func_names.add(name)

    if len(duplicate_func_names) != 0:
        print(f'Multiple func names found:\n\t{duplicate_func_names}\n\tclass {node.name}\n\tfile: {filename}')
```

This patch fixes these cases.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Attempt to fix TestCompletion on macos</title>
<updated>2024-05-30T15:28:13+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-05-30T15:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a2bcb932f3130c3c18ceb06872da9002f6845c4b'/>
<id>a2bcb932f3130c3c18ceb06872da9002f6845c4b</id>
<content type='text'>
Macos will automatically load dependent modules when creating a target,
resulting in more modules than the test expects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Macos will automatically load dependent modules when creating a target,
resulting in more modules than the test expects.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix module name tab completion (#93458)</title>
<updated>2024-05-30T07:57:13+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-05-30T07:57:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d554f2379b427505907ba52b8b9270c0b436224f'/>
<id>d554f2379b427505907ba52b8b9270c0b436224f</id>
<content type='text'>
Module names can be matched either by a full path or just their
basename. The completion machinery tried to do both, but had several
bugs:
- it always inserted the basename as a completion candidate, even if the
string being completed was a full path
- due to FileSpec canonicalization, it lost information about trailing
slashes (it treated "lib/&lt;TAB&gt;" as "lib&lt;TAB&gt;", even though it's clear
the former was trying to complete a directory name)
- due to both of the previous issues, the completion candidates could
end up being shorter than the string being completed, which caused
crashes (string out of range errors) when attempting to substitute the
results.

This patch rewrites to logic to remove these kinds of issues:
- basename and full path completion are handled separately
- full path completion is attempted always, basename only if the input
string does not contain a slash
- the code remembers both the canonical and original spelling or the
completed argument. The canonical arg is used for matching, while the
original spelling is used for completion. This way "/foo///.//b&lt;TAB&gt;"
can still match "/foo/bar", but it will complete to "/foo///.//bar".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Module names can be matched either by a full path or just their
basename. The completion machinery tried to do both, but had several
bugs:
- it always inserted the basename as a completion candidate, even if the
string being completed was a full path
- due to FileSpec canonicalization, it lost information about trailing
slashes (it treated "lib/&lt;TAB&gt;" as "lib&lt;TAB&gt;", even though it's clear
the former was trying to complete a directory name)
- due to both of the previous issues, the completion candidates could
end up being shorter than the string being completed, which caused
crashes (string out of range errors) when attempting to substitute the
results.

This patch rewrites to logic to remove these kinds of issues:
- basename and full path completion are handled separately
- full path completion is attempted always, basename only if the input
string does not contain a slash
- the code remembers both the canonical and original spelling or the
completed argument. The canonical arg is used for matching, while the
original spelling is used for completion. This way "/foo///.//b&lt;TAB&gt;"
can still match "/foo/bar", but it will complete to "/foo///.//bar".</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Avoid modifying the source tree in TestCompletion.py</title>
<updated>2024-05-17T07:33:26+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-05-17T07:32:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b27eb0ae8280675fc8fb249d39f1ccafa3ee2187'/>
<id>b27eb0ae8280675fc8fb249d39f1ccafa3ee2187</id>
<content type='text'>
This was a side-effect of the "optimization" in #92281. Deoptimize the
code slightly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was a side-effect of the "optimization" in #92281. Deoptimize the
code slightly.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fixed the TestCompletion test running on a remote target (#92281)</title>
<updated>2024-05-15T17:03:15+00:00</updated>
<author>
<name>Dmitry Vasilyev</name>
<email>dvassiliev@accesssoftek.com</email>
</author>
<published>2024-05-15T17:03:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb822dc25853299ea81166f9bb8a43436ab8b0c8'/>
<id>eb822dc25853299ea81166f9bb8a43436ab8b0c8</id>
<content type='text'>
Install the image to the remote target if necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Install the image to the remote target if necessary.</pre>
</div>
</content>
</entry>
</feed>
