This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
documentation Update the building and installing lldb docs. (#74) Sep 21, 2018
eng Update the building and installing lldb docs. (#74) Sep 21, 2018
src Add cdb extensions that prints a reliable prompt. (#75) Sep 24, 2018
.gitattributes Add the managed SOS code. Apr 26, 2018
.gitignore Add lldbplugin and native build scripts. May 7, 2018
.vsts-dotnet-ci.yml Dependent builds, publishing and packaging (#65) Aug 24, 2018
.vsts-dotnet.yml Daily (#70) Sep 11, 2018
Build.cmd Dependent builds, publishing and packaging (#65) Aug 24, 2018
CMakeLists.txt Dependent builds, publishing and packaging (#65) Aug 24, 2018
Directory.Build.props Update the building and installing lldb docs. (#74) Sep 21, 2018
LICENSE.TXT Initialize repo Mar 22, 2018
NuGet.Config Add the managed SOS code. Apr 26, 2018
README.md Update the building and installing lldb docs. (#74) Sep 21, 2018
Restore.cmd Add the PAL and SOS itself. May 25, 2018
THIRD-PARTY-NOTICES.TXT SOS.UnitTests now builds and runs on Windows, Linux and OSX. Jun 29, 2018
Test.cmd Add the PAL and SOS itself. May 25, 2018
build.sh Dependent builds, publishing and packaging (#65) Aug 24, 2018
compileoptions.cmake Add license headers May 10, 2018
crossgen.cmake Add the PAL and SOS itself. May 25, 2018
diagnostics.sln Dependent builds, publishing and packaging (#65) Aug 24, 2018
functions.cmake Dependent builds, publishing and packaging (#65) Aug 24, 2018
global.json Upgrade to RepoToolset version 1.0.0-beta2-63206-01 (#57) Aug 7, 2018
restore.sh Add lldbplugin and native build scripts. May 7, 2018
test.sh Add lldbplugin and native build scripts. May 7, 2018

README.md

.NET Core Diagnostics Repo

Currently under construction

This repository contains the source code for various .NET Core runtime diagnostic tools. It currently contains SOS, the managed portion of SOS and the lldb SOS plugin. 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, 4.0, 5.0, 6.0) and .NET Core versions (1.1, 2.0.x, 2.1).

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 coreclr repo.


Building the Repository

The build depends on Git, CMake, Python and of course a C++ compiler. Once these prerequisites are installed the build is simply a matter of invoking the 'build' script (build.cmd or build.sh) at the base of the repository.

The details of installing the components differ depending on the operating system. See the following pages based on your OS. There is no cross-building across OS (only for ARM, which is built on X64). You have to be on the particular platform to build that platform.

To install the platform's prerequisites:

To build under Windows, run build.cmd from the root of the repository:

build.cmd 

[Lots of build spew]

BUILD: Repo sucessfully built.
BUILD: Product binaries are available at c:\git\diagnostics\artifacts\Debug\bin\Windows_NT.x64

To build for x86:

build.cmd -architecture x86

To test the resulting SOS:

test.cmd

To build under Linux, MacOS, FreeBSD, or NetBSD, run build.sh from the root of the repository:

./build.sh

[Lots of build spew]

BUILD: Repo sucessfully built.
BUILD: Product binaries are available at /home/mikem/diagnostics/artifacts/Debug/bin/Linux.x64

To test the resulting SOS and plugin:

./test.sh

Getting lldb

Getting a version of lldb that works for your platform can be a problem sometimes. The version has to be at least 3.9 or greater because of a bug running SOS on a core dump that was fixed. Some Linux distros like Ubuntu it is easy as sudo apt-get install lldb-3.9 python-lldb-3.9. On other distros, you will need to build lldb. The directions below should give you some guidance.

Useful Links

Build Status

Build Status

License

The diagnostics repository is licensed under the MIT license. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.