{"id":13645407,"url":"https://github.com/lldb-tools/lldb-mi","last_synced_at":"2025-04-21T14:30:56.494Z","repository":{"id":44256174,"uuid":"195439849","full_name":"lldb-tools/lldb-mi","owner":"lldb-tools","description":"LLDB's machine interface driver","archived":false,"fork":false,"pushed_at":"2024-03-01T13:21:48.000Z","size":350,"stargazers_count":162,"open_issues_count":21,"forks_count":53,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-08-02T01:25:22.956Z","etag":null,"topics":["debugging","gdb-mi","lldb","llvm","mi"],"latest_commit_sha":null,"homepage":"https://lldb.llvm.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lldb-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-05T16:35:34.000Z","updated_at":"2024-08-01T17:03:04.000Z","dependencies_parsed_at":"2024-05-29T16:25:17.281Z","dependency_job_id":null,"html_url":"https://github.com/lldb-tools/lldb-mi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lldb-tools%2Flldb-mi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lldb-tools%2Flldb-mi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lldb-tools%2Flldb-mi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lldb-tools%2Flldb-mi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lldb-tools","download_url":"https://codeload.github.com/lldb-tools/lldb-mi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223868147,"owners_count":17217039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","gdb-mi","lldb","llvm","mi"],"created_at":"2024-08-02T01:02:34.610Z","updated_at":"2024-11-09T18:31:14.030Z","avatar_url":"https://github.com/lldb-tools.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# lldb-mi\n\nLLDB's machine interface driver.\n\n# Build\n\nlldb-mi uses CMake to build. The only dependencies needed for lldb-mi are a C++17 (since LLVM 16) compiler and LLDB itself (including its dependencies: Clang and LLVM). These dependencies should be installed in a way that they can be found via CMake's [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) functionality. You need both the LLDB/Clang/LLVM headers and their compiled libraries for the build to work, but not the respective source files.\n\n# Building against system LLDB\n\nIf your distribution or operating system already ships a correctly configured LLDB/Clang/LLVM installation, lldb-mi can be built by simply running:\n\n\n```bash\ncmake .\ncmake --build .\n```\n\n# Building against custom LLDB\n\nYou can also build lldb-mi against a LLDB that you compiled yourself. For that, compile LLDB as described [here](https://lldb.llvm.org/resources/build.html) but set `CMAKE_INSTALL_PREFIX` to a local directory and build the LLVM shared library by passing `-DLLVM_BUILD_LLVM_DYLIB=On` to CMake. Afterwards point towards that prefix directory when building lldb-mi by setting `CMAKE_PREFIX_PATH` (e.g. `cmake -DCMAKE_PREFIX_PATH=/home/yourname/lldb-mi/install`).\n\nThis example script should build LLVM and lldb-mi on an average UNIX system in the `~/buildspace` subfolder:\n```\ncd\nmkdir buildspace\n\n# Download LLVM/Clang/LLDB and build them.\ngit clone https://github.com/llvm/llvm-project.git\nmkdir llvm-inst\nmkdir llvm-build\ncd llvm-build\n\ncmake -DLLVM_ENABLE_PROJECTS=\"clang;lldb\" -DLLVM_ENABLE_RUNTIMES=\"libcxx;libcxxabi\" -DCMAKE_INSTALL_PREFIX=~/buildspace/llvm-inst/ -GNinja ../llvm-project/llvm\nninja\nninja install\n\n# Download lldb-mi and build it against our custom installation.\ncd ~/buildspace\ngit clone https://github.com/lldb-tools/lldb-mi\ncd lldb-mi\n\n# Create a separate build directory for building lldb-mi.\nmkdir build\ncd build\ncmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -GNinja ..\nninja\n```\n\n# Building against custom LLDB.framework (Darwin Only)\n\nYou can also build lldb-mi against a LLDB.framework that you compiled yourself. You follow the same instructions as above but build the LLVM framework by passing `-DLLDB_BUILD_FRAMEWORK=1` to CMake instead of using the shared library. Then build lldb-mi with `-DUSE_LLDB_FRAMEWORK=1`\n\nThe snippets below change the CMake calls from the above script.\n```\n// Building llvm-project\ncmake -DLLVM_ENABLE_PROJECTS=\"clang;lldb;libcxx;libcxxabi\" -DCMAKE_INSTALL_PREFIX=~/buildspace/llvm-inst/ -DLLDB_BUILD_FRAMEWORK=1 -GNinja ../llvm-project/llvm\n```\n\n```\n// Building lldb-mi\ncmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -DUSE_LLDB_FRAMEWORK=1 -GNinja ..\n\n```\n\n# Notes\n\nOn some architectures (e.g. Linux, x86-64), LLDB dynamic library fails to determine its location. That results in the inability to locate a gdbserver stub:\n```bash\nprocess launch failed: unable to locate lldb-server\n```\n\nThe workaround is to set `LLDB_DEBUGSERVER_PATH` environment variable before running lldb-mi.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flldb-tools%2Flldb-mi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flldb-tools%2Flldb-mi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flldb-tools%2Flldb-mi/lists"}