Updated FreeBSD installation instructions with LLDB steps
authorAnders Jensen-Waud <anders@jensenwaud.com>
Thu, 7 May 2015 23:16:52 +0000 (09:16 +1000)
committerAnders Jensen-Waud <anders@jensenwaud.com>
Thu, 7 May 2015 23:16:52 +0000 (09:16 +1000)
Included build instructions for FreeBSD on how to
manually build and install LLDB on FreeBSD STABLE
Included FreeBSD LLDB install script

Fixed spacing issues

Fixed installation formatting

Documentation/freebsd-instructions.md
src/pal/tools/freebsd-install-lldb.sh [new file with mode: 0644]

index 6380ebd..0304ac8 100644 (file)
@@ -32,6 +32,31 @@ To install the packages you need:
 
 You now have all the required components.
 
+Debugging CoreCLR (Optional)
+----------------------------
+
+Note: This step is *optional* and is not required to build CoreCLR itself. If you intend on hacking or debugging the CoreCLR source code, you need to follow these steps. You must follow these steps *before* starting the build itself.
+
+In order to debug CoreCLR you will also need to install LLDB, the LLVM debugger. LLDB is still in the process of being ported to FreeBSD, so no official packages exist (see the FreeBSD LLDB Wiki page for more information on what has been ported so far: https://wiki.freebsd.org/lldb). However, it is possible to manually download and install LLDB from the LLVM source tree by following the instructions below: 
+
+Firstly, install the following packages: python ninja swig13 git (in addition to the packages above), i.e.
+
+```janhenke@freebsd-frankfurt:~ % sudo pkg install python ninja swig13 git```
+
+Then, run the install script in ~/coreclr/src/pal/tools: 
+
+```janhenke@freebsd-frankfurt:~ % ~/coreclr/src/pal/tools/freebsd-install-lldb.sh```
+
+Note: LLDB will run su in order to install the LLDB build to /usr/local/include. 
+
+(Optional) If you wish to run sudo instead of su, you can change line 29-31 to:
+
+```sudo $NINJA lldb install```
+
+
+You now have all the required components to debug CoreCLR installed.
+
+
 Git Setup
 ---------
 
diff --git a/src/pal/tools/freebsd-install-lldb.sh b/src/pal/tools/freebsd-install-lldb.sh
new file mode 100644 (file)
index 0000000..488a119
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+# LLDB installation script for FreeBSD 10.1 STABLE
+# LLDB is yet not available in FreeBSD ports/packages, so we have to fetch 
+# it from the LLVM source tree and build it ouselves. 
+# Prerequisite packages, which must be installed prior to running this script:
+# git python cmake ninja swig13
+# 
+# You can intall the tools by running (as root):
+# pkg install git python cmake ninja swig13
+# 
+
+GIT=/usr/local/bin/git
+CMAKE=/usr/local/bin/cmake
+NINJA=/usr/local/bin/ninja
+PYTHON_PATH=/usr/local/include/python2.7
+
+$GIT clone http://llvm.org/git/llvm.git
+cd llvm/tools
+$GIT clone http://llvm.org/git/clang.git
+$GIT clone http://llvm.org/git/lldb.git
+
+cd ..
+mkdir build
+cd build
+
+$CMAKE ../ -G Ninja -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -I$PYTHON_PATH -g"
+$NINJA lldb
+#$NINJA check-lldb # if you want to run tests
+
+su <<EOSU
+$NINJA lldb install
+EOSU