zoukankan      html  css  js  c++  java
  • Linux下调试.Net core:lldb的安装

    CentOS 7

    lldb 3.9 will have to be built for this distro.

    First the prerequisites:

    sudo yum install centos-release-SCL epel-release
    sudo yum install cmake cmake3 gcc gcc-c++ git libicu libunwind make python27 tar wget which zip
    sudo yum install doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz
    

    Now build and install llvm/lldb 3.9 using the script provided here: build-install-lldb.sh.

    WARNING: This script installs llvm and lldb as root (via sudo) and may overwrite any previously installed versions.

    cd $HOME
    git clone https://github.com/dotnet/diagnostics.git
    $HOME/diagnostics/documentation/lldb/centos7/build-install-lldb.sh
    

    This will take some time to complete. After the build is finished, run these commands to remove the no longer needed packages:

    sudo yum remove doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz
    sudo yum clean all
    

    To launch lldb:

    lldb-3.9.1



    https://github.com/dotnet/diagnostics/blob/master/documentation/lldb/linux-instructions.md


    https://github.com/dotnet/diagnostics

    .NET Core Diagnostics Repo

    This repository contains the source code for various .NET Core runtime diagnostic tools. It currently contains SOS, the managed portion of SOS, the lldb SOS plugin and various global diagnostic tools. The goals of this repo is to build SOS and the lldb SOS plugin for the portable (glibc based) Linux platform (Centos 7) and the platforms not supported by the portable (musl based) build (Centos 6, Alpine, and macOS) and to test across various indexes in a very large matrix: OSs/distros (Centos 6/7, Ubuntu, Alpine, Fedora, Debian, RHEL 7.2), architectures (x64, x86, arm, arm64), lldb versions (3.9 to 9.0) and .NET Core versions (2.1, 3.1, 5.0.x).

    Another goal to make it easier to obtain a version of lldb (currently 3.9) with scripts and documentation for platforms/distros like Centos, Alpine, Fedora, etc. that by default provide really old versions.

    This repo will also allow out of band development of new SOS and lldb plugin features like symbol server support for the .NET Core runtime and solve the source build problem having SOS.NETCore (managed portion of SOS) in the runtime repo.

    See the GitHub Release tab for notes on SOS and diagnostic tools releases.

    在 linux 上调试 .NET Core 一般使用 lldb (gdb 也可以但是没有 SOS 插件支持),SOS 插件的源代码被搬到了 diagnostics 仓库,所以我们还需要下载编译这个仓库的源代码。

    下载编译 diagnostics 仓库 (LLDB SOS 插件)

    安装 LLDB 与 LLDB 的开发文件:

    apt-get install clang llvm lldb liblldb-3.9-dev
    

    下载编译 diagnostics 仓库:

    git clone https://github.com/dotnet/diagnostics
    cd diagnostics
    ./build.sh
    

    编译成功后你可以在 /diagnostics/artifacts/bin/Linux.x64.Debug/libsosplugin.so 找到 SOS 插件的 dll 文件。

     
  • 相关阅读:
    hdu 2874 Connections between cities(树上倍增)
    HDU 2586 How far away ?
    0-2岁宝宝早教全攻略
    0-2岁宝宝学习能力三步走
    0-6岁教育
    dedecms如何在文章列表前加上序列号
    争吵1
    当爸爸的感觉
    您未被授权查看该页HTTP错误401.1未经授权解决
    TPLink路由器登陆密码怎么破解
  • 原文地址:https://www.cnblogs.com/luluping/p/13917458.html
Copyright © 2011-2022 走看看