1 Star 0 Fork 0

Fan WenJie / lldb-mi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

lldb-mi

LLDB's machine interface driver.

Build

lldb-mi uses CMake to build. The only dependencies needed for lldb-mi are a C++14 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 build by simply running:

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

cd
mkdir buildspace

# Download LLVM/Clang/LLDB and build them.
git clone https://github.com/llvm/llvm-project.git
mkdir llvm-inst
mkdir llvm-build
cd llvm-build

cmake -DLLVM_ENABLE_PROJECTS="clang;lldb;libcxx;libcxxabi" -DCMAKE_INSTALL_PREFIX=~/buildspace/llvm-inst/ -GNinja ../llvm-project/llvm
ninja
ninja install

# Download lldb-mi and build it against our custom installation.
cd ~/buildspace
git clone https://github.com/lldb-tools/lldb-mi
cd lldb-mi

# Create a separate build directory for building lldb-mi.
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -GNinja ..
ninja

Building against custom LLDB.framework (Darwin Only)

You can also build lldb-mi against a LLDB.framework that you compiled yourself. It is 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 snippits 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 dinamic library fails to determine its location. That results to inability of locating a gdbserver stub:

process launch failed: unable to locate lldb-server

The workaraund is to set LLDB_DEBUGSERVER_PATH environment variable before running LLDB-MI.

空文件

简介

暂无描述 展开 收起
C++ 等 3 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/fanwenjie/lldb-mi.git
git@gitee.com:fanwenjie/lldb-mi.git
fanwenjie
lldb-mi
lldb-mi
main

搜索帮助