Move Protocol's derived classes commons in Protocol
[sdk/tools/netcoredbg.git] / README.md
1 # Managed code debugger for .NET Core runtime
2
3 The debugger provides GDB/MI interface and allows to debug .NET apps using ICorDebug API of CoreCLR.
4
5
6 ## Build (Ubuntu x64)
7
8 1. Install .NET Core SDK 2.x from https://dot.net/core
9
10 2. Build and install coreclr and corefx, see https://github.com/dotnet/coreclr for details
11
12 3. Use the following script as a reference to build the debugger (assuming current directory is project root):
13    ```
14    #!/bin/sh
15
16    # Path to coreclr source root
17    CORECLR_PATH=$HOME/git/coreclr
18    # Path to coreclr build output (use .Relese for release build)
19    CORECLR_BIN=$CORECLR_PATH/bin/Product/Linux.x64.Debug
20    # Path to generated coreclr overlay (where coreclr and corefx binaries are installed)
21    CORECLR_OVERLAY=$HOME/git/overlay
22
23    rm -rf build
24    mkdir build
25    cd build
26
27    CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$CORECLR_OVERLAY -DCLR_DIR=$CORECLR_PATH -DCLR_BIN_DIR=$CORECLR_BIN -DCORECLR_SET_RPATH=\$ORIGIN ../
28    make -j
29    make install
30    ```
31
32    The script produces `netcoredbg` and `SymbolReader.dll` binaries inside the overlay directory.
33
34 ## Build (GBS)
35
36 1. Prepare
37
38    Prepare GBS environment and add a path to local repository to your `.gbs.conf`.
39
40    See the guide here http://suprem.sec.samsung.net/confluence/display/SPTDTLC/Profiler+architecture
41
42 2. Build modified `coreclr` and `coreclr-devel` packages
43
44    Apply the patches from `patches/coreclr` and build CoreCLR from
45    https://review.tizen.org/gerrit/#/admin/projects/platform/upstream/coreclr
46
47    This step will produce updated `coreclr` and `mscorlib` RPMs for installing on the device/emulator.
48    Also it will generate the `coreclr-devel` package in the local repo which is necessary for building the debugger.
49
50 3. Build the `netcoredbg` package
51
52    Clone the repo and build as usual:
53    ```
54    gbs build -A armv7l --include-all --spec netcoredbg.spec
55    ```
56
57 4. Build modified `dotnet-launcher` package
58
59    Apply the patches from `patches/dotnet-launcher` and build `dotnet-launcher` from
60    https://review.tizen.org/gerrit/#/admin/projects/platform/core/dotnet/launcher
61
62 ## Usage
63
64 1. Install packages on the device/emulator
65
66    Install RPMs from local GBS repo: `coreclr`, `mscorlib`, `dotnet-launcher` and `netcoredbg`.
67
68    You may also need to remove AOT images:
69    ```
70    sdb shell "find / -name '*.ni.dll' -exec rm {} \;"
71    ```
72
73    Reboot the device/emulator.
74
75 2. Use modified Visual Studio Tools for Tizen
76
77    Build `vs-tools-cps` project from
78    https://github.sec.samsung.net/i-kulaychuk/vs-tools-cps/tree/netcoredbg-attach
79    and launch the debug session with F5.