summaryrefslogtreecommitdiff
path: root/lldb/scripts
AgeCommit message (Collapse)Author
2025-09-12[lldb] Change directory creation logic in framework-header-fix (#158355)Alex Langford
It's possible for this logic to fail if the build system runs this script in parallel. One instance could create the directory in between another instance's checking of its existence and attempt at creation. Instead, always try to create it and ignore any FileExistsErrors. rdar://160120161
2025-08-11[lldb][framework] Remove original framework fixup script (#153052)Chelsea Cassanova
The original version of the framework fixup script is no longer being used and should be able to be removed.
2025-07-30[lldb][rpc] Only use guard names in framework script (#151391)Chelsea Cassanova
Removes the U that comes before the guards passed into the framework fixup script.
2025-07-18[lldb][framework] Glob headers from source for framework (#148736)Chelsea Cassanova
When gathering the headers to fix up and place in LLDB.framework, we were previously globbing the header files from a location in the build directory. This commit changes this to glob from the source directory instead, as we were globbing from the build directory without ensuring that the necessary files were actually in that location before globbing.
2025-07-03[lldb][framework] Correctly place framework files in framework with script ↵Chelsea Cassanova
(#146425) There's 2 bugs that this commit fixes: 1. Calculate the correct file path for the output file by appending the basename of the input header instead of appending the entire input header's path to the framework path. 2. In the script, create the framework's header directory if it does not exist.
2025-06-26[lldb][scripts] Use named args in versioning script (#145993)Chelsea Cassanova
Using named args means that you don't need to keep track of 5 positional args.
2025-06-26[lldb][scripts] Fix bugs in framework fix script (#145961)Chelsea Cassanova
The script used to fix up LLDB's header for use in the macOS framework contained 2 bugs that this commit addreses: 1. The output contents were appended to the output file multiple times instead of only being written once. 2. The script was not considering LLDB includes that were *not* from the SB API. This commit addresses and fixes both of these bugs and updates the corresponding test to match.
2025-06-23[lldb][rpc] Fix bug in convert script for RPC (#145419)Chelsea Cassanova
In the script that's used by RPC to convert LLDB headers to LLDB RPC headers, there's a bug with how it converts namespace usage. An overeager regex pattern caused *all* text before any `lldb::` namespace usage to get replaced with `lldb_rpc::` instead of just the namespace itself. This commit changes that regex pattern to be less overeager and modifies one of the shell tests for this script to actually check that the namespace usage replacement is working correctly. rdar://154126268
2025-06-12Reland "[lldb][headers] Create Python script to fix up framework head… ↵Chelsea Cassanova
(#143945) …ers" (#143941) Reland the script that converts lldb headers to RPC headers. The RPC test was failing due to the incorrect input filepath being used. Original commit message: This commit replaces the shell script that fixes up includes for the LLDB framework with a Python script. This script will also be used when fixing up includes for the LLDBRPC.framework.
2025-06-12Revert "[lldb][headers] Create Python script to fix up framework headers" ↵Chelsea Cassanova
(#143941) Reverts llvm/llvm-project#142051
2025-06-12[lldb][headers] Create Python script to fix up framework headers (#142051)Chelsea Cassanova
This commit replaces the shell script that fixes up includes for the LLDB framework with a Python script. This script will also be used when fixing up includes for the LLDBRPC.framework.
2025-06-11[lldb][RPC] Upstream LLDB to RPC converstion Python script (#138028)Chelsea Cassanova
As part of upstreaming LLDB RPC, this commit adds a python script that is used by LLDB RPC to modify the public lldb header files for use with RPC. https://discourse.llvm.org/t/rfc-upstreaming-lldb-rpc/85804
2025-06-10Reland "[lldb][headers] Create script to fix up versioning" (#142864)" (#142871)Chelsea Cassanova
This relands the original commit for the versioning script in LLDB. This commit uses '>' for output from `unifdef` for platforms that have that executable but do not have the `-o` option. It also fixes the Xcode build by adding a dependency between the liblldb-header-staging target in the source/API/CMakeLists.txt the `liblldb-resource-headers` target in LLDBFramework.cmake. Original patch: https://github.com/llvm/llvm-project/pull/141116
2025-06-04Revert "[lldb][headers] Create script to fix up versioning" (#142864)Chelsea Cassanova
Reverts llvm/llvm-project#141116. It's breaking the Xcode build as well as the build on AIX.
2025-06-03[lldb][headers] Create script to fix up versioning (#141116)Chelsea Cassanova
This commit creates a Python script that fixes up the versioning information in lldb-defines.h. It also moves the build logic for fixing up the lldb headers from being in the framework only to being in the same location that we create the liblldb target.
2025-04-13[lldb] Remove vestigial remnants of reproducers (#135361)Pavel Labath
Not touching the SB API.
2024-10-09[lldb] Add missing include to SBLanguages.h (#111763)Chelsea Cassanova
SBLanguages.h uses a uint16_t but is missing the include for `<cstdint>`, if any file includes this without including that it will cause a build error so this commit adds this include.
2024-05-10[lldb] Put SBSourceLanguageName in lldb namespace (#91685)Alex Langford
2024-05-08lldb create API folder if it does not exist, before creating SBLangua… ↵Nicklas Boman
(#91128) Create API folder if it does not exist, before creating SBLanguages.h
2024-05-01Fix the regex in the sbapi python scriptAdrian Prantl
2024-05-01[lldb] Use Python script to generate SBLanguages.h (#90753)Jonas Devlieghere
Use a Python script to generate SBLanguages.h instead of piggybacking on LLDB TableGen. This addresses Nico Weber's post-commit feedback.
2023-10-31[lldb] Replace the usage of module imp with module importlib (#70443)Tulio Magno Quites Machado Filho
imp got removed in Python 3.12 [1] and the community recommends using importlib in newer Python versions. [1] https://docs.python.org/3.12/whatsnew/3.12.html#imp
2023-09-30[lldb][windows] Cover more symbols in LLDB_EXPORT_ALL_SYMBOLSRiver Riddle
Followup to #67628 that relaxes the symbol regex a bit to cover more lldb_private symbols.
2023-09-29[lldb] Add windows support for LLDB_EXPORT_ALL_SYMBOLS (#67628)River Riddle
LLDB_EXPORT_ALL_SYMBOLS is useful when building out-of-tree plugins and extensions that rely on LLDB's internal symbols. For example, this is how the Mojo language provides its REPL and debugger support. Supporting this on windows is kind of tricky because this is normally expected to be done using dllexport/dllimport, but lldb uses these with the public api. This PR takes an approach similar to what LLVM does with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS, and what chromium does for [abseil](https://github.com/chromium/chromium/blob/253d14e20fdc0cab05e5516770dceca18f9bddaf/third_party/abseil-cpp/generate_def_files.py), and uses a python script to extract the necessary symbols by looking at the symbol table for the various lldb libraries.
2023-09-14[lldb] Format Python files in scripts and utils (#66053)David Spickett
Using: black --exclude "third_party/" ./lldb/
2023-08-14[lldb] Remove use of __future__ in pythonAlex Langford
These were useful primarily for the Python 2 to 3 transition. Python 2 is no longer supported so these are no longer necessary. Differential Revision: https://reviews.llvm.org/D157759
2023-06-14[lldb][AArch64] Add Scalable Matrix Extension option to QEMU launch scriptDavid Spickett
The Scalable Matrix Extension (SME) does not require extra options beyond setting the cpu to "max". https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html#sme-cpu-property-examples SME depends on SVE, so that will be enabled too even if you don't ask for it by name. --sve --sme -> SVE and SME --sme -> SVE and SME --sve -> Only SVE Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D152519
2023-04-21[lldb] Update QEMU git URL in setup.shDavid Spickett
The old name was maintained for a while but now it has been changed to gitlab.
2023-03-23[lldb][AArch64] Fix run-qemu.sh when only MTE is enabled.David Spickett
SVE and MTE both require a CPU with that feature before you can use the other options, but we only added the "max" cpu when SVE was enabled too.
2021-02-25Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awkHarmen Stoppels
Allow users to use a non-system version of perl, python and awk, which is useful in certain package managers. Reviewed By: JDevlieghere, MaskRay Differential Revision: https://reviews.llvm.org/D95119
2020-11-20[lldb][AArch64/Linux] Show memory tagged memory regionsDavid Spickett
This extends the "memory region" command to show tagged regions on AArch64 Linux when the MTE extension is enabled. (lldb) memory region the_page [0x0000fffff7ff8000-0x0000fffff7ff9000) rw- memory tagging: enabled This is done by adding an optional "flags" field to the qMemoryRegion packet. The only supported flag is "mt" but this can be extended. This "mt" flag is read from /proc/{pid}/smaps on Linux, other platforms will leave out the "flags" field. Where this "mt" flag is received "memory region" will show that it is enabled. If it is not or the target doesn't support memory tagging, the line is not shown. (since majority of the time tagging will not be enabled) Testing is added for the existing /proc/{pid}/maps parsing and the new smaps parsing. Minidump parsing has been updated where needed, though it only uses maps not smaps. Target specific tests can be run with QEMU and I have added MTE flags to the existing helper scripts. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D87442
2020-10-29[lldb] Correct --help output for qemu rootfs scriptDavid Spickett
It was printing "Usage:" twice. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D90225
2020-10-06[LLDB] Add QEMU testing environment setup guide for SVE testingMuhammad Omair Javaid
This patch adds a HowTo document to lldb docs which gives instruction for setting up a virtual environment based on QEMU emulator for LLDB testing. Instruction in this document are tested on Arm and AArch64 targets but can easily be duplicated for other targets supported by QEMU. This helps test LLDB in absence for modern AArch64 features not released in publicly available hardware till date. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D82064
2020-07-16Harmonize Python shebangserge-sans-paille
Differential Revision: https://reviews.llvm.org/D83857
2020-07-15[lldb][test] Prevent infinite loop while looking for use_lldb_suite_root.py.Jordan Rupprecht
Several scripts (two copies of use_lldb_suite.py, and an __init__.py) look for use_lldb_suite_root.py by checking parent directories. If for some reason it doesn't exist, it keeps checking parent directories until it finds it. However, this only breaks when the parent directory is None, but at least on Linux, dirname('/') == '/', so this will never be None. This changes the lookup to stop if the dirname(lldb_root) is unchanged. This was previously fixed in 67f6d842fab6d3ac8c949721be8e131cf6b17578, but only in one copy of this script. Additionally, this makes the failure mode more visible -- if the root is not found, it complains loudly instead of silently failing, and having later modules that need lldb_root fail. Differential Revision: https://reviews.llvm.org/D83840
2020-06-30[lldb/Scripts]Pavel Labath
Fix analyze-project-deps.py. "lldb/Plugins" (home of Plugins.def) does not depend on anything. Make sure this does not crash the script.
2020-04-21[lldb/Scripts] proc.returncode is set in proc.communicateJonas Devlieghere
Make sure proc.returncode has been assigned before we compare it to 0.
2020-04-20[lldb/Scripts] Add verbose and failure only mode to replay script.Jonas Devlieghere
Add two modes to the reproducer replay script that make debugging a little easier. Verbose mode prints stdout and stderr, regardless of whether replay was successful. When --failure-only is passed, output is limited to tests that failed to replay.
2020-04-15[lldb/Scripts] Add script to replay multiple reproducersJonas Devlieghere
Script to replay reproducers in parallel using the command line driver. This is used for active replay (stage 1 as described in the RFC on lldb-dev [1]). [1] http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html Differential revision: https://reviews.llvm.org/D77608
2020-04-07[lldb] NFC: Fix trivial typo in comments, documents, and messagesKazuaki Ishizaki
Differential Revision: https://reviews.llvm.org/D77460
2020-01-16[lldb/Scripts] Remove swig_bot_lib/__init__.pyJonas Devlieghere
2020-01-13[lldb/Scripts] Remove SWIG botJonas Devlieghere
This is no longer used or maintained. Differential revision: https://reviews.llvm.org/D72539
2020-01-10[lldb/Scripts] Move android script from underneath Python dirJonas Devlieghere
The scripts root directory already contains python scripts. No need to keep this one nested under a dedicated Python directory.
2020-01-10[lldb/Scripts] Remove remote-build.pyJonas Devlieghere
With Xcode gone this is no longer relevant.
2020-01-10[lldb/Scripts] Remove buildbot.pyJonas Devlieghere
This file is outdated and still references SVN. Buildbots are configured through the zorg repository.
2020-01-09[lldb/Bindings] Move bindings into their own subdirectoryJonas Devlieghere
All the code required to generate the language bindings for Python and Lua lives under scripts, even though the majority of this code aren't scripts at all, and surrounded by scripts that are totally unrelated. I've reorganized these files and moved everything related to the language bindings into a new top-level directory named bindings. This makes the corresponding files self contained and much more discoverable. Differential revision: https://reviews.llvm.org/D72437
2020-01-09[lldb/SWIG] Add missing '\' in macros againJonas Devlieghere
Making the string conversion operator a macro unintentionally dropped the backslash before '\n' and '\r' and was therefore incorrectly stripping 'n' and 'r' from the object description.
2020-01-08[lldb/SWIG] Refactor extensions to be non Python-specific (3/3)Jonas Devlieghere
The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. It uses a SWIG macro to reduce code duplication. Differential revision: https://reviews.llvm.org/D72377
2020-01-08[lldb/SWIG] Refactor extensions to be non Python-specific (2/2)Jonas Devlieghere
The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. It uses a SWIG macro to reduce code duplication. Differential revision: https://reviews.llvm.org/D72377
2020-01-08[lldb/SWIG] Refactor extensions to be non Python-specificJonas Devlieghere
The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. Differential revision: https://reviews.llvm.org/D72377