百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lldb-mi

> 编程语言
开源

LLDB 的机器接口驱动程序

191 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

LLDB 的机器接口驱动程序

lldb-mi

LLDB's machine interface driver.

Build

lldb-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 functionality. You need both the LLDB/Clang/LLVM headers and their compiled libraries for the build to work, but not the respective source files.

Building against system LLDB

If your distribution or operating system already ships a correctly configured LLDB/Clang/LLVM installation, lldb-mi can be built by simply running:

bash
cmake .
cmake --build .

Building against custom LLDB

You can also build lldb-mi against a LLDB that you compiled yourself. For that, compile LLDB as described here 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).

This example script should build LLVM and lldb-mi on an average UNIX system in the ~/buildspace subfolder:

…

Building against custom LLDB.framework (Darwin Only)

You 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

The snippets below change the CMake calls from the above script.

// Building llvm-project
cmake -DLLVM_ENABLE_PROJECTS="clang;lldb;libcxx;libcxxabi" -DCMAKE_INSTALL_PREFIX=~/buildspace/llvm-inst/ -DLLDB_BUILD_FRAMEWORK=1 -GNinja ../llvm-project/llvm
// Building lldb-mi
cmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -DUSE_LLDB_FRAMEWORK=1 -GNinja ..

Notes

On 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:

bash
process launch failed: unable to locate lldb-server

The workaround is to set LLDB_DEBUGSERVER_PATH environment variable before running lldb-mi.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++debugginggdb-milldbllvm

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言