summaryrefslogtreecommitdiff
path: root/lldb/test/API/lua_api
AgeCommit message (Collapse)Author
2025-10-30[lldb] Add alternative SBThread::GetStopDescription (#165379)Ebuka Ezike
the function signature for `GetStopDescription` is `lldb::SBThread::GetStopDescription(char *dst_or_null, size_t len)`. To get a description you need to call the function first time to get the buffer size. a second time to get the description. This is little worse from the python size as the signature is `lldb.SBThread.GetStopDescription(int: len) -> list[str]` the user has to pass the max size as possible with no way of checking if it is enough. This patch adds a new api `lldb.SBThread.GetStopDescription(desc: lldb.SBStream()) -> bool` `bool lldb::SBThread::GetStopDescription(lldb::SBStream &description)` which handles this case. Adds new Test case for lua.
2025-10-25[lldb][test] skip Lua tests when the Lua interpreter is not found (#164793)Vincent Palatin
When SWIG is installed but not any Lua interpreter, the cmake script in `lldb/cmake/modules/FindLuaAndSwig.cmake` will execute `find_program(LUA_EXECUTABLE, ...)` and this will set the `LUA_EXECUTABLE` variable to `LUA_EXECUTABLE-NOTFOUND`. Ensure that in this case we are skipping the Lua tests requiring the interpreter.
2024-11-11[lldb] Support both Lua 5.3 and Lua 5.4 (#115500)Jonas Devlieghere
Lua 5.3 and Lua 5.4 are similar enough that we can easily support both in LLDB. This patch adds support for building LLDB with both and updates the documentation accordingly.
2024-11-08[lldb] Fix TestFileHandle.luaJonas Devlieghere
- Explicitly create an `SBFile`. - Add missing call to `close`. - Use `SetErrorFile` in TestLegacyFileErr.
2024-06-26[lldb] fix(lldb/**.py): fix comparison to None (#94017)Eisuke Kawashima
from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or is not, never the equality operators. Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-02-21[lldb][test] Modernize asserts (#82503)Jordan Rupprecht
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts, as recommended by the [unittest release notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3). For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`. This produces better error messages, e.g. `error: unexpectedly found 1 and 2 to be different` instead of `error: False`.
2024-02-16[lldb] Replace assertEquals with assertEqual (NFC) (#82073)Jonas Devlieghere
assertEquals is a deprecated alias for assertEqual and has been removed in Python 3.12. This wasn't an issue previously because we used a vendored version of the unittest module. Now that we use the built-in version this gets updated together with the Python version used to run the test suite.
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2023-01-25[lldb][test] Replace use of p with expression (NFC)Dave Lee
In API tests, replace use of the `p` alias with the `expression` command. To avoid conflating tests of the alias with tests of the expression command, this patch canonicalizes to the use `expression`. Differential Revision: https://reviews.llvm.org/D141539
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2021-10-12[lldb/lua] Supplement Lua bindings for lldb moduleSiger Yang
Add necessary typemaps for Lua bindings, together with some other files. Signed-off-by: Siger Yang <sigeryeung@gmail.com> Reviewed By: tammela Differential Revision: https://reviews.llvm.org/D108090