From e6bf69cd903f80be3bf5e64a01d88333515b98ad Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Thu, 20 Sep 2018 21:33:12 -0700 Subject: [PATCH] Update the building and installing lldb docs. (#74) Add embedded pdbs to testing. Add scripts to build/install lldb for some distros. Fix the build on certain distros after testing docs. Add RuntimeFrameworkVersionMajor. --- Directory.Build.props | 6 + README.md | 31 +-- .../building/freebsd-instructions.md | 2 +- documentation/building/linux-instructions.md | 202 +++++++++++++---- documentation/building/osx-instructions.md | 2 +- .../ubuntu18.04/build-install-curl.sh | 18 ++ documentation/lldb/buildinglldb.md | 6 +- .../lldb/centos7/build-install-lldb.sh | 37 ++++ .../lldb/fedora24/build-install-lldb.sh | 30 +++ documentation/lldb/freebsd-instructions.md | 6 + documentation/lldb/linux-instructions.md | 207 +++++++++++++----- documentation/lldb/netbsd-instructions.md | 4 + .../lldb/opensuse/build-install-lldb.sh | 36 +++ documentation/lldb/osx-instructions.md | 12 + eng/Build-Native.cmd | 4 +- eng/CreateVersionFile.csproj | 6 +- eng/build-native.sh | 41 ++-- eng/common/build.sh | 4 +- ...{setup_vs_tools.cmd => setup-vs-tools.cmd} | 0 .../TestConfiguration.cs | 28 ++- .../TestRunner.cs | 8 +- .../SymbolTestApp/SymbolTestApp.cs | 12 +- src/SOS/SOS.UnitTests/SOS.cs | 2 +- .../Scripts/StackAndOtherTests.script | 14 +- 24 files changed, 549 insertions(+), 169 deletions(-) create mode 100755 documentation/building/ubuntu18.04/build-install-curl.sh create mode 100755 documentation/lldb/centos7/build-install-lldb.sh create mode 100755 documentation/lldb/fedora24/build-install-lldb.sh create mode 100644 documentation/lldb/freebsd-instructions.md create mode 100644 documentation/lldb/netbsd-instructions.md create mode 100755 documentation/lldb/opensuse/build-install-lldb.sh create mode 100644 documentation/lldb/osx-instructions.md rename eng/{setup_vs_tools.cmd => setup-vs-tools.cmd} (100%) diff --git a/Directory.Build.props b/Directory.Build.props index 7cb64a97b..920036cb9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,5 +5,11 @@ http://go.microsoft.com/fwlink/?LinkId=529443 http://go.microsoft.com/fwlink/?LinkID=288859 true + + + false + false + false + https://github.com/dotnet/diagnostics.git diff --git a/README.md b/README.md index ee5f263f2..0200c4501 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ To install the platform's prerequisites: To build under Windows, run build.cmd from the root of the repository: ```bat -> build.cmd +build.cmd [Lots of build spew] @@ -42,19 +42,19 @@ BUILD: Product binaries are available at c:\git\diagnostics\artifacts\Debug\bin\ To build for x86: ```bat -> build.cmd -architecture x86 +build.cmd -architecture x86 ``` To test the resulting SOS: ```bat -> test.cmd +test.cmd ``` To build under Linux, MacOS, FreeBSD, or NetBSD, run build.sh from the root of the repository: ```sh -$ ./build.sh +./build.sh [Lots of build spew] @@ -65,30 +65,17 @@ BUILD: Product binaries are available at /home/mikem/diagnostics/artifacts/Debug To test the resulting SOS and plugin: ```sh -$ ./test.sh +./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. -### [Linux Instructions](documentation/lldb/linux-instructions.md) - -### FreeBSD Instructions (10.1) - -```sh -% sudo pkg install llvm39 gettext python27 -``` - -### NetBSD/OpenBSD Instructions - -TBD - -### macOS (Sierra 10.12.6) Instructions - -The version of lldb that comes with Xcode 9.2 will now work with SOS. We no longer have to build lldb locally. - -Later versions of macOS/Xcode TBD. + * [Linux Instructions](documentation/lldb/linux-instructions.md) + * [macOS Instructions](documentation/lldb/osx-instructions.md) + * [FreeBSD Instructions](documentation/lldb/freebsd-instructions.md) + * [NetBSD Instructions](documentation/lldb/netbsd-instructions.md) ## Useful Links diff --git a/documentation/building/freebsd-instructions.md b/documentation/building/freebsd-instructions.md index 34a3495ef..b598855d9 100644 --- a/documentation/building/freebsd-instructions.md +++ b/documentation/building/freebsd-instructions.md @@ -27,5 +27,5 @@ Install the following packages for the toolchain: To install the packages you need: ```sh -% sudo pkg install bash cmake llvm39 gettext python27 +sudo pkg install bash cmake llvm39 gettext python27 ``` diff --git a/documentation/building/linux-instructions.md b/documentation/building/linux-instructions.md index 786c7f585..791895197 100644 --- a/documentation/building/linux-instructions.md +++ b/documentation/building/linux-instructions.md @@ -1,90 +1,200 @@ Linux Prerequisites =================== -These instructions will lead you through preparing to build the diagnostics repo on Linux. We'll start by showing how to set up your environment from scratch. +These instructions will lead you through preparing to build and test the diagnostics repo on Linux. We'll start by showing how to set up your environment from scratch. In some cases, a version lldb/llvm that works the best on the distro will have to be built and installed. -Environment -=========== +Toolchain Setup +--------------- -These instructions are written assuming the Ubuntu 14.04 LTS, since that's the distro the team uses. Pull Requests are welcome to address other environments as long as they don't break the ability to use Ubuntu 14.04 LTS. +The following instructions will install the required packages. This only needs to be done once per machine. These instructions assume that you already have "sudo" installed. It is also recommended to create a github fork of the diagnostics repo and cloning that instead of https://github.com/dotnet/diagnostics.git directly. -There have been reports of issues when using other distros or versions of Ubuntu (e.g. [Issue 95](https://github.com/dotnet/coreclr/issues/95)). If you're on another distribution, consider using docker's `ubuntu:14.04` image. +#### Ubuntu 14.04 #### -Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs ([Issue 536](https://github.com/dotnet/coreclr/issues/536)). +In order to get clang-3.9, llvm-3.9 and lldb-3.9, we need to add additional package sources (see [http://llvm.org/apt/](http://llvm.org/apt/) for the other Ubuntu versions not listed here): -Toolchain Setup ---------------- + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update -#### Ubuntu (14.04, 16.04, 16.10, 17.10, 18.04) #### +Then install the required packages: -Install the following packages: + sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip -- cmake -- make -- llvm-3.9 -- clang-3.9 -- lldb-3.9 -- liblldb-3.9-dev -- wget -- gettext -- python27 +The lldb 3.9 package needs a lib file symbolic link fixed: -In order to get clang-3.9, llvm-3.9 and lldb-3.9 on Ubuntu 14.04 (see [http://llvm.org/apt/](http://llvm.org/apt/) for the other versions), we need to add an additional package source: + cd /usr/lib/llvm-3.9/lib + sudo ln -s ../../x86_64-linux-gnu/liblldb-3.9.so.1 liblldb-3.9.so.1 - ~$ echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list - ~$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - - ~$ sudo apt-get update +See the section below on how to clone, build and test the repo. -Note: arm clang has a known issue with CompareExchange (#15074), so for arm you have to use clang-4.0 or higher, the official build uses clang-5.0. - -For other version of Debian/Ubuntu, please visit http://apt.llvm.org/. +#### Ubuntu 16.04 #### -Then install the packages you need: +Add the additional package sources: + + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update + +Then install the required packages: - ~$ sudo apt-get install make wget cmake llvm-3.9 clang-3.9 lldb-3.9 liblldb-3.9-dev gettext + sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip The lldb 3.9 package needs a lib file symbolic link fixed: cd /usr/lib/llvm-3.9/lib sudo ln -s ../../x86_64-linux-gnu/liblldb-3.9.so.1 liblldb-3.9.so.1 -You now have all the required components. +See the section below on how to clone, build and test the repo. + +#### Ubuntu 17.10 #### + +Add the additional package sources: + + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update -#### Alpine (3.6) #### +Then install the required packages: + sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip -```sh -~$ sudo apk add clang clang-dev cmake coreutils gcc gettext-dev linux-headers llvm lldb-dev make python +#### Ubuntu 18.04 #### -``` +Install the required packages: -#### CentOS (6, 7) #### + sudo apt-get update + sudo apt-get install cmake clang-3.9 curl gdb gettext git libicu-dev libssl1.0-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python-lldb-3.9 tar wget zip -llvm, clang and lldb 3.9 will have to be built for this distro ([TBD] add instructions). +See the section below on how to clone, build and test the repo. -```sh -~$ sudo yum install centos-release-SCL epel-release -~$ sudo yum install which wget make cmake cmake3 gcc gcc-c++ python27 python-argparse python-devel +#### Alpine 3.6 #### -``` +Currently there is no lldb that works on Alpine. -#### Debian (8.2) #### +Issue https://github.com/dotnet/diagnostics/issues/73 + +#### CentOS 6 #### [TBD] -#### Fedora (23, 24, 27, 28) #### +#### CentOS 7 #### + +llvm, clang and 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++ gdb git libicu libunwind make python27 tar wget which zip + +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/centos7/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb 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, but after it is finished all the required components will be built and installed. To build and test the repo: + + cd diagnostics + ./build.sh + ./test.sh + +#### Debian 8.2/8.7 #### + +In order to get lldb-5.0 (3.9 doesn't seem to work that well on 8.x), we need to add additional package sources: + + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-5.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update + +Then install the packages you need: + + sudo apt-get install cmake clang-5.0 gdb gettext git libicu-dev liblldb-5.0-dev libunwind8 lldb-5.0 llvm make python-lldb-5.0 tar wget zip + +See the section below on how to clone, build and test the repo. Add "--clang5.0" to the ./build.sh command. + +#### Debian 9 (Stretch) #### + + sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev liblldb-3.9-dev libunwind8 lldb-3.9 llvm make python-lldb-3.9 tar wget zip + +See the section below on how to clone, build and test the repo. + +#### Fedora 24 #### + + sudo dnf install clang cmake findutils gdb git libicu libunwind make python tar wget which zip + +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/fedora24/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb and may overwrite any previously installed versions. + + cd $HOME + git clone https://github.com/dotnet/diagnostics.git + $HOME/diagnostics/documentation/lldb/fedora24/build-install-lldb.sh + +This will take some time to complete, but after it is finished all the required components will be built and installed. To build and test the repo: + + cd diagnostics + ./build.sh + ./test.sh -```sh -~$ sudo dnf install which wget cmake make clang llvm-devel lldb-devel python27 +#### Fedora 27, 28 #### -``` + sudo dnf install clang cmake compat-openssl10 findutils gdb git libicu libunwind lldb-devel llvm-devel make python python2-lldb tar wget which zip -#### OpenSuse (42.1, 42.3) #### +See the section below on how to clone, build and test the repo. + +#### OpenSuse 42.1, 42.3 #### + + sudo zypper install cmake gcc-c++ gdb git hostname libicu libunwind lldb-devel llvm-clang llvm-devel make python python-xml tar wget which zip + ln -s /usr/bin/clang++ /usr/bin/clang++-3.5 + +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/opensuse/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb and may overwrite any previously installed versions. + + cd $HOME + git clone https://github.com/dotnet/diagnostics.git + $HOME/diagnostics/documentation/lldb/opensuse/build-install-lldb.sh + +This will take some time to complete, but after it is finished all the required components will be built and installed. To build and test the repo: + + cd diagnostics + ./build.sh + ./test.sh + +#### RHEL 7.5 #### + +[TBD] + +#### SLES #### [TBD] Set the maximum number of file-handles -------------------------------------- -To ensure that your system can allocate enough file-handles for the corefx build run `sysctl fs.file-max`. If it is less than 100000, add `fs.file-max = 100000` to `/etc/sysctl.conf`, and then run `sudo sysctl -p`. +To ensure that your system can allocate enough file-handles for the build run `sysctl fs.file-max`. If it is less than 100000, add `fs.file-max = 100000` to `/etc/sysctl.conf`, and then run `sudo sysctl -p`. + +Clone, build and test the repo +------------------------------ + +You now have all the required components. To clone, build and test the repo: + cd $HOME + git clone https://github.com/dotnet/diagnostics.git + cd diagnostics + ./build.sh + ./test.sh diff --git a/documentation/building/osx-instructions.md b/documentation/building/osx-instructions.md index e9898bdbb..0bd70b3af 100644 --- a/documentation/building/osx-instructions.md +++ b/documentation/building/osx-instructions.md @@ -14,7 +14,7 @@ Git Setup Clone the diagnostics repository (either upstream or a fork). ```sh -$ git clone https://github.com/dotnet/diagnostics +git clone https://github.com/dotnet/diagnostics ``` CMake diff --git a/documentation/building/ubuntu18.04/build-install-curl.sh b/documentation/building/ubuntu18.04/build-install-curl.sh new file mode 100755 index 000000000..ee0e36837 --- /dev/null +++ b/documentation/building/ubuntu18.04/build-install-curl.sh @@ -0,0 +1,18 @@ +# Install cmake version 3.10.2 without installing libcurl.so.4 +wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz +sudo tar -xf cmake-3.10.2-Linux-x86_64.tar.gz --strip 1 -C /usr/local +rm cmake-3.10.2-Linux-x86_64.tar.gz + +# Build and install curl 7.45.0 to get the right version of libcurl.so.4 +wget https://curl.haxx.se/download/curl-7.45.0.tar.lzma +tar -xf curl-7.45.0.tar.lzma +rm curl-7.45.0.tar.lzma +cd curl-7.45.0 +./configure --disable-dict --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-pop3 --disable-rtsp --disable-smb --disable-smtp --disable-telnet --disable-tftp --enable-ipv6 --enable-optimize --enable-symbol-hiding --with-ca-path=/etc/ssl/certs/ --with-nghttp2 --with-gssapi --with-ssl --without-librtmp +make +sudo make install +cd .. +rm -r curl-7.45.0 + +# Install curl +sudo apt-get install curl diff --git a/documentation/lldb/buildinglldb.md b/documentation/lldb/buildinglldb.md index 05e69f0aa..0020200de 100644 --- a/documentation/lldb/buildinglldb.md +++ b/documentation/lldb/buildinglldb.md @@ -1,5 +1,7 @@ -Building LLDB -============= +Building LLDB from the LLVM repos +================================= + +These instructions have been replace with better and more through documentation. See [Getting lldb](../../../README.md#getting-lldb) in the main readme. 1. Clone the llvm, clang, and lldb repos like this: diff --git a/documentation/lldb/centos7/build-install-lldb.sh b/documentation/lldb/centos7/build-install-lldb.sh new file mode 100755 index 000000000..1c4cda2bb --- /dev/null +++ b/documentation/lldb/centos7/build-install-lldb.sh @@ -0,0 +1,37 @@ +# These are needed to build lldb 3.9 +sudo yum install doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz + +cd $HOME +wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.29.1.tar.xz +wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/compiler-rt-3.9.1.src.tar.xz + +tar -xf binutils-2.29.1.tar.xz +tar -xf llvm-3.9.1.src.tar.xz +mkdir llvm-3.9.1.src/tools/clang +mkdir llvm-3.9.1.src/tools/lldb +mkdir llvm-3.9.1.src/projects/compiler-rt +tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang +tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb +tar -xf compiler-rt-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/projects/compiler-rt +rm binutils-2.29.1.tar.xz +rm cfe-3.9.1.src.tar.xz +rm lldb-3.9.1.src.tar.xz +rm llvm-3.9.1.src.tar.xz +rm compiler-rt-3.9.1.src.tar.xz + +mkdir llvmbuild +cd llvmbuild +cmake3 -DCMAKE_BUILD_TYPE=Release -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BINUTILS_INCDIR=../binutils-2.29.1/include ../llvm-3.9.1.src +make -j $(($(getconf _NPROCESSORS_ONLN)+1)) +sudo make install +cd .. +rm -r llvmbuild +rm -r llvm-3.9.1.src +rm -r binutils-2.29.1 + +# 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 diff --git a/documentation/lldb/fedora24/build-install-lldb.sh b/documentation/lldb/fedora24/build-install-lldb.sh new file mode 100755 index 000000000..6a7797431 --- /dev/null +++ b/documentation/lldb/fedora24/build-install-lldb.sh @@ -0,0 +1,30 @@ +# These are needed to build lldb +sudo dnf install doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz + +cd $HOME +wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz + +tar -xf llvm-3.9.1.src.tar.xz +mkdir llvm-3.9.1.src/tools/clang +mkdir llvm-3.9.1.src/tools/lldb +tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang +tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb +rm cfe-3.9.1.src.tar.xz +rm lldb-3.9.1.src.tar.xz +rm llvm-3.9.1.src.tar.xz + +mkdir llvmbuild +cd llvmbuild +cmake -DCMAKE_BUILD_TYPE=Release -DLLDB_DISABLE_CURSES=1 -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BUILD_DOCS=0 ../llvm-3.9.1.src + +make -j $(($(getconf _NPROCESSORS_ONLN)+1)) +sudo make install +cd .. +rm -r llvmbuild +rm -r llvm-3.9.1.src + +# Remove the no longer needed packages +sudo dnf remove doxygen libedit-devel libxml2-devel readline-devel swig +sudo dnf clean all diff --git a/documentation/lldb/freebsd-instructions.md b/documentation/lldb/freebsd-instructions.md new file mode 100644 index 000000000..7deb219b1 --- /dev/null +++ b/documentation/lldb/freebsd-instructions.md @@ -0,0 +1,6 @@ +Installing lldb on FreeBSD +========================== + +Working in progress. + + sudo pkg install llvm39 gettext python27 diff --git a/documentation/lldb/linux-instructions.md b/documentation/lldb/linux-instructions.md index 786c7f585..10f61a6c1 100644 --- a/documentation/lldb/linux-instructions.md +++ b/documentation/lldb/linux-instructions.md @@ -1,90 +1,189 @@ -Linux Prerequisites -=================== +Installing LLDB on Linux +======================== -These instructions will lead you through preparing to build the diagnostics repo on Linux. We'll start by showing how to set up your environment from scratch. +These instructions will lead you through installing or building the best version of lldb for your distro to use with SOS. If you have already followed the diagnostics repo build [prerequisites](../building/linux-instructions.md) and built the diagnostics repo, then the best version of lldb is already installed. -Environment -=========== +SOS needs at least lldb 3.9 or greater. Some distros only have older versions available by default so there are directions and scripts to build lldb 3.9 for that platform. These instructions assume that you have dotnet cli and its prerequisites installed. -These instructions are written assuming the Ubuntu 14.04 LTS, since that's the distro the team uses. Pull Requests are welcome to address other environments as long as they don't break the ability to use Ubuntu 14.04 LTS. +The libsosplugin.so built for lldb 3.9 does work with lldb 4.0, 5.0 and 6.0 but most of the testing has been on lldb 3.9. -There have been reports of issues when using other distros or versions of Ubuntu (e.g. [Issue 95](https://github.com/dotnet/coreclr/issues/95)). If you're on another distribution, consider using docker's `ubuntu:14.04` image. +#### Ubuntu 14.04 #### -Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs ([Issue 536](https://github.com/dotnet/coreclr/issues/536)). +In order to get lldb-3.9, we need to add additional package sources (see [http://llvm.org/apt/](http://llvm.org/apt/) for the other Ubuntu versions not listed here): -Toolchain Setup ---------------- + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update -#### Ubuntu (14.04, 16.04, 16.10, 17.10, 18.04) #### +Install the lldb packages: -Install the following packages: + sudo apt-get install lldb-3.9 python-lldb-3.9 -- cmake -- make -- llvm-3.9 -- clang-3.9 -- lldb-3.9 -- liblldb-3.9-dev -- wget -- gettext -- python27 +To launch lldb: -In order to get clang-3.9, llvm-3.9 and lldb-3.9 on Ubuntu 14.04 (see [http://llvm.org/apt/](http://llvm.org/apt/) for the other versions), we need to add an additional package source: + lldb-3.9 - ~$ echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list - ~$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - - ~$ sudo apt-get update +#### Ubuntu 16.04 #### -Note: arm clang has a known issue with CompareExchange (#15074), so for arm you have to use clang-4.0 or higher, the official build uses clang-5.0. - -For other version of Debian/Ubuntu, please visit http://apt.llvm.org/. +Add the additional package sources: -Then install the packages you need: + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update - ~$ sudo apt-get install make wget cmake llvm-3.9 clang-3.9 lldb-3.9 liblldb-3.9-dev gettext +Install the lldb packages: -The lldb 3.9 package needs a lib file symbolic link fixed: + sudo apt-get install lldb-3.9 python-lldb-3.9 - cd /usr/lib/llvm-3.9/lib - sudo ln -s ../../x86_64-linux-gnu/liblldb-3.9.so.1 liblldb-3.9.so.1 +To launch lldb: -You now have all the required components. + lldb-3.9 -#### Alpine (3.6) #### +#### Ubuntu 17.10 #### +Add the additional package sources: -```sh -~$ sudo apk add clang clang-dev cmake coreutils gcc gettext-dev linux-headers llvm lldb-dev make python + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update -``` +Install the lldb packages: -#### CentOS (6, 7) #### + sudo apt-get install lldb-3.9 python-lldb-3.9 -llvm, clang and lldb 3.9 will have to be built for this distro ([TBD] add instructions). +To launch lldb: -```sh -~$ sudo yum install centos-release-SCL epel-release -~$ sudo yum install which wget make cmake cmake3 gcc gcc-c++ python27 python-argparse python-devel + lldb-3.9 -``` +#### Ubuntu 18.04 #### -#### Debian (8.2) #### +To install the lldb packages: -[TBD] + sudo apt-get update + sudo apt-get install lldb-3.9 llvm-3.9 python-lldb-3.9 + +To launch lldb: + + lldb-3.9 -#### Fedora (23, 24, 27, 28) #### +#### Alpine 3.6 #### -```sh -~$ sudo dnf install which wget cmake make clang llvm-devel lldb-devel python27 +Currently there is no lldb that works on Alpine. -``` +Issue https://github.com/dotnet/diagnostics/issues/73 -#### OpenSuse (42.1, 42.3) #### +#### CentOS 6 #### [TBD] -Set the maximum number of file-handles --------------------------------------- +#### 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 + +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/centos7/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb 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. + +To launch lldb: + + lldb-3.9.1 + +#### Debian 8.2/8.7 #### + +In order to get lldb-5.0 (3.9 doesn't seem to work that well), we need to add additional package sources: + + sudo apt-get update + sudo apt-get install wget + echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-5.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update + +Install the lldb packages: + + sudo apt-get install lldb-5.0 python-lldb-5.0 + +To launch lldb: + + lldb-3.9 + +#### Debian 9 (Stretch) #### + + sudo apt-get install lldb-3.9 python-lldb-3.9 + +To launch lldb: + + lldb-3.9 + +#### Fedora 24 #### -To ensure that your system can allocate enough file-handles for the corefx build run `sysctl fs.file-max`. If it is less than 100000, add `fs.file-max = 100000` to `/etc/sysctl.conf`, and then run `sudo sysctl -p`. + sudo dnf install clang cmake findutils git libicu libunwind make python tar wget which zip +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/fedora24/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb and may overwrite any previously installed versions. + + cd $HOME + git clone https://github.com/dotnet/diagnostics.git + $HOME/diagnostics/documentation/lldb/fedora24/build-install-lldb.sh + +This will take some time to complete. + +To launch lldb: + + lldb + +#### Fedora 27, 28 #### + + sudo dnf install lldb python2-lldb + +To launch lldb: + + lldb + +#### OpenSuse 42.1, 42.3 #### + + sudo zypper install cmake gcc-c++ git hostname libicu libunwind lldb-devel llvm-clang llvm-devel make python python-xml tar wget which zip + ln -s /usr/bin/clang++ /usr/bin/clang++-3.5 + +Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/opensuse/build-install-lldb.sh). + +WARNING: this script installs llvm and lldb and may overwrite any previously installed versions. + + cd $HOME + git clone https://github.com/dotnet/diagnostics.git + $HOME/diagnostics/documentation/lldb/opensuse/build-install-lldb.sh + +This will take some time to complete. + +To launch lldb: + + lldb-3.9.1 + +#### RHEL 7.5 #### + +[TBD] + +#### SLES #### + +[TBD] diff --git a/documentation/lldb/netbsd-instructions.md b/documentation/lldb/netbsd-instructions.md new file mode 100644 index 000000000..e1483261d --- /dev/null +++ b/documentation/lldb/netbsd-instructions.md @@ -0,0 +1,4 @@ +Installing lldb for NetBSD +========================== + +[TBD] diff --git a/documentation/lldb/opensuse/build-install-lldb.sh b/documentation/lldb/opensuse/build-install-lldb.sh new file mode 100755 index 000000000..61716fa20 --- /dev/null +++ b/documentation/lldb/opensuse/build-install-lldb.sh @@ -0,0 +1,36 @@ +# These are need to build lldb +sudo zypper install doxygen libedit-devel libxml2-devel ncurses-devel python-argparse python-devel readline-devel swig + +cd $HOME + +wget http://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz +wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz +wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz + +tar -xf cmake-3.11.4-Linux-x86_64.tar.gz +tar -xf llvm-3.9.1.src.tar.xz +mkdir llvm-3.9.1.src/tools/clang +mkdir llvm-3.9.1.src/tools/lldb +tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang +tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb +rm cmake-3.11.4-Linux-x86_64.tar.gz +rm cfe-3.9.1.src.tar.xz +rm lldb-3.9.1.src.tar.xz +rm llvm-3.9.1.src.tar.xz + +mkdir llvmbuild +cd llvmbuild +../cmake-3.11.4-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DLLDB_DISABLE_CURSES=1 -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BUILD_DOCS=0 ../llvm-3.9.1.src + +make -j $(($(getconf _NPROCESSORS_ONLN)+1)) +sudo make install +cd .. +rm -r llvmbuild +rm -r llvm-3.9.1.src +rm -r cmake-3.11.4-Linux-x86_64 + +# Remove the no longer needed packages +sudo zypper rm doxygen libedit-devel libxml2-devel ncurses-devel python-argparse python-devel readline-devel swig +sudo zypper clean -a + diff --git a/documentation/lldb/osx-instructions.md b/documentation/lldb/osx-instructions.md new file mode 100644 index 000000000..cf202feb2 --- /dev/null +++ b/documentation/lldb/osx-instructions.md @@ -0,0 +1,12 @@ +MacOS +===== + +### MacOS (Sierra 10.12.6) Instructions + +The version of lldb that comes with Xcode 9.2 will now work with SOS. We no longer have to build lldb locally. + +### MacOS (High Sierra 10.13.4) Instructions + +Xcode 9.2/9.3 swift-4.1 + +[TBD] diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index e9ecd61d8..9e92c7dc5 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -9,7 +9,7 @@ echo %__MsgPrefix%Starting Build at %TIME% set __ThisScriptFull="%~f0" set __ThisScriptDir="%~dp0" -call "%__ThisScriptDir%"\setup_vs_tools.cmd +call "%__ThisScriptDir%"\setup-vs-tools.cmd if NOT '%ERRORLEVEL%' == '0' exit /b 1 if defined VS150COMNTOOLS ( @@ -218,7 +218,7 @@ if %__Build% EQU 1 ( :GenVSSolution echo Generating Version Header set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog" - %DotNetCli% %MSBuildPath% %__ProjectDir%\eng\CreateVersionFile.csproj /v:!__Verbosity! /bl:!__GenerateVersionLog! /t:GenerateVersionHeader2 /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__IntermediatesDir%\_version.h /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs% + %DotNetCli% %MSBuildPath% %__ProjectDir%\eng\CreateVersionFile.csproj /v:!__Verbosity! /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__IntermediatesDir%\_version.h /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( echo Generate Version Header FAILED exit /b 1 diff --git a/eng/CreateVersionFile.csproj b/eng/CreateVersionFile.csproj index 525194beb..534a557d0 100644 --- a/eng/CreateVersionFile.csproj +++ b/eng/CreateVersionFile.csproj @@ -14,9 +14,11 @@ - + - + + + "$__IntermediatesDir/version.cpp" fi build_native "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeArgs" fi # Run SOS/lldbplugin tests -if [ $__Test == 1 ]; then +if [ $__Test == true ]; then # Install the other versions of .NET Core runtime we are going to test on "$__ProjectRoot/eng/install-test-runtimes.sh" --dotnet-directory "$__ProjectRoot/.dotnet" --temp-directory "$__IntermediatesDir" --architecture "$__BuildArch" $__DailyTest diff --git a/eng/common/build.sh b/eng/common/build.sh index 9600f1b95..22a3b69a4 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -323,7 +323,7 @@ function Main { fi if [[ -z $NUGET_PACKAGES ]]; then - if [[ $ci ]]; then + if [[ $ci == true ]]; then export NUGET_PACKAGES="$repo_root/.packages" else export NUGET_PACKAGES="$HOME/.nuget/packages" @@ -333,7 +333,7 @@ function Main { mkdir -p "$toolset_dir" mkdir -p "$log_dir" - if [[ $ci ]]; then + if [[ $ci == true ]]; then mkdir -p "$temp_dir" export TEMP="$temp_dir" export TMP="$temp_dir" diff --git a/eng/setup_vs_tools.cmd b/eng/setup-vs-tools.cmd similarity index 100% rename from eng/setup_vs_tools.cmd rename to eng/setup-vs-tools.cmd diff --git a/src/Microsoft.Diagnostic.TestHelpers/TestConfiguration.cs b/src/Microsoft.Diagnostic.TestHelpers/TestConfiguration.cs index 68bfca413..09a743007 100644 --- a/src/Microsoft.Diagnostic.TestHelpers/TestConfiguration.cs +++ b/src/Microsoft.Diagnostic.TestHelpers/TestConfiguration.cs @@ -476,6 +476,25 @@ namespace Microsoft.Diagnostic.TestHelpers get { return GetValue("RuntimeFrameworkVersion"); } } + /// + /// The major portion of the runtime framework version + /// + public int RuntimeFrameworkVersionMajor + { + get { + string version = RuntimeFrameworkVersion; + if (version != null) { + string[] parts = version.Split('.'); + if (parts.Length > 0) { + if (int.TryParse(parts[0], out int major)) { + return major; + } + } + } + return 0; + } + } + /// /// The type of PDB: "full" (Windows PDB) or "portable". /// @@ -555,15 +574,16 @@ namespace Microsoft.Diagnostic.TestHelpers /// public bool CreateDumpExists { - get { return OS.Kind == OSKind.Linux && IsNETCore && !RuntimeFrameworkVersion.StartsWith("1."); } + get { return OS.Kind == OSKind.Linux && IsNETCore && RuntimeFrameworkVersionMajor > 1; } } /// - /// Returns true if a stack overflow causes dump to be generated with createdump. Currently no .NET Core version does. + /// Returns true if a stack overflow causes dump to be generated with createdump. 3.x has now started to + /// create dumps on stack overflow. /// public bool StackOverflowCreatesDump { - get { return false; } + get { return IsNETCore && RuntimeFrameworkVersionMajor >= 3; } } /// @@ -571,7 +591,7 @@ namespace Microsoft.Diagnostic.TestHelpers /// public bool StackOverflowSIGSEGV { - get { return OS.Kind == OSKind.Linux && IsNETCore && RuntimeFrameworkVersion.StartsWith("1."); } + get { return OS.Kind == OSKind.Linux && IsNETCore && RuntimeFrameworkVersionMajor == 1; } } #endregion diff --git a/src/Microsoft.Diagnostic.TestHelpers/TestRunner.cs b/src/Microsoft.Diagnostic.TestHelpers/TestRunner.cs index ecef8d297..0bc1b6ef4 100644 --- a/src/Microsoft.Diagnostic.TestHelpers/TestRunner.cs +++ b/src/Microsoft.Diagnostic.TestHelpers/TestRunner.cs @@ -98,17 +98,13 @@ namespace Microsoft.Diagnostic.TestHelpers /// new configs for each supported PDB type public static IEnumerable EnumeratePdbTypeConfigs(TestConfiguration config) { - // Enabled after an official dotnet cli supports "embedded" PDBs - issue #244 - // string[] pdbTypes = { "portable", "embedded" }; - string[] pdbTypes = { "portable" }; + string[] pdbTypes = { "portable", "embedded" }; if (OS.Kind == OSKind.Windows) { if (config.IsNETCore) { - // Enabled after an official dotnet cli supports "embedded" PDBs - issue #244 - // pdbTypes = new string[] { "portable", "full", "embedded" }; - pdbTypes = new string[] { "portable", "full" }; + pdbTypes = new string[] { "portable", "full", "embedded" }; } else { diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs b/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs index 289d91ec0..f576c5d37 100644 --- a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs +++ b/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs @@ -34,11 +34,19 @@ namespace SymbolTestApp { #if FULL_CLR byte[] dll = File.ReadAllBytes(Path.Combine(dllPath, @"SymbolTestDll.dll")); - byte[] pdb = File.ReadAllBytes(Path.Combine(dllPath, @"SymbolTestDll.pdb")); + byte[] pdb = null; + string pdbFile = Path.Combine(dllPath, @"SymbolTestDll.pdb"); + if (File.Exists(pdbFile)) { + pdb = File.ReadAllBytes(pdbFile); + } Assembly assembly = Assembly.Load(dll, pdb); #else Stream dll = File.OpenRead(Path.Combine(dllPath, @"SymbolTestDll.dll")); - Stream pdb = File.OpenRead(Path.Combine(dllPath, @"SymbolTestDll.pdb")); + Stream pdb = null; + string pdbFile = Path.Combine(dllPath, @"SymbolTestDll.pdb"); + if (File.Exists(pdbFile)) { + pdb = File.OpenRead(pdbFile); + } Assembly assembly = AssemblyLoadContext.Default.LoadFromStream(dll, pdb); #endif Type dllType = assembly.GetType("SymbolTestDll.TestClass"); diff --git a/src/SOS/SOS.UnitTests/SOS.cs b/src/SOS/SOS.UnitTests/SOS.cs index 636bc4861..70d222f63 100644 --- a/src/SOS/SOS.UnitTests/SOS.cs +++ b/src/SOS/SOS.UnitTests/SOS.cs @@ -127,7 +127,7 @@ public class SOS public async Task StackAndOtherTests(TestConfiguration config) { SkipIfArm(config); - if (config.RuntimeFrameworkVersion != null && config.RuntimeFrameworkVersion.StartsWith("1.1")) + if (config.RuntimeFrameworkVersionMajor == 1) { throw new SkipTestException("The debuggee (SymbolTestApp) doesn't work on .NET Core 1.1 because of a AssemblyLoadContext problem"); } diff --git a/src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script b/src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script index a05bb3930..b180edd7c 100644 --- a/src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script +++ b/src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script @@ -13,7 +13,7 @@ ENDIF:LIVE SOSCOMMAND:ClrStack VERIFY:.*OS Thread Id:\s+0x\s+.* VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+ -VERIFY:.*\s+\s+.*\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 46\]\s* +VERIFY:.*\s+\s+.*\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 54\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.Program\.Foo2\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 29\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.Program\.Foo1\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 24\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 19\]\s* @@ -23,7 +23,7 @@ IFDEF:PROJECTK SOSCOMMAND:ClrStack -f VERIFY:.*OS Thread Id:\s+0x\s+.* VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+ -VERIFY:\s+\s+\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\+\s+\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 46\]\s* +VERIFY:\s+\s+\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\+\s+\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 54\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo2\(.*\)\s+\+\s+\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 29\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo1\(.*\)\s+\+\s+\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 24\]\s* VERIFY:\s+\s+\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Main\(.*\)\s+\+\s+\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 19\]\s* @@ -34,7 +34,7 @@ IFDEF:PROJECTK SOSCOMMAND:ClrStack -a VERIFY:.*OS Thread Id:\s+0x\s+.* VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+ -VERIFY:.*\s+\s+\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 46\]\s* +VERIFY:.*\s+\s+\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 54\]\s* VERIFY:\s+PARAMETERS:\s+ VERIFY:\s+dllPath \(0x\) = 0x\s+ VERIFY:.*\s+LOCALS:\s+ @@ -49,7 +49,7 @@ IFDEF:PROJECTK SOSCOMMAND:ClrStack -r VERIFY:.*OS Thread Id:\s+0x\s+.* VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+ -VERIFY:.*\s+\s+\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 46\]\s* +VERIFY:.*\s+\s+\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 54\]\s* VERIFY:\s+[r|e]sp=\s+[r|e]bp=\s+[r|e]ip=\s+ VERIFY:\s+|r|e]ax=\s+[r|e]bx=\s+[r|e]cx=\s+ VERIFY:.*\s+\s+\s+SymbolTestApp\.Program\.Foo2\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 29\]\s* @@ -139,7 +139,7 @@ ENDIF:PROJECTK SOSCOMMAND:ClrStack SOSCOMMAND:IP2MD .*\s+()\s+SymbolTestApp\.Program\.Foo4.*\s+ VERIFY:.*\s+Method Name:\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+ -VERIFY:.*\s+Source file:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 46\s+ +VERIFY:.*\s+Source file:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 54\s+ # Verify that "u" works (depends on the IP2MD right above) IFDEF:PROJECTK @@ -147,7 +147,7 @@ SOSCOMMAND:u \s*MethodDesc:\s+()\s* VERIFY:\s*Normal JIT generated code\s+ VERIFY:\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+ VERIFY:\s+Begin\s+,\s+size\s+\s+ -VERIFY:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 46:\s+ +VERIFY:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 54:\s+ ENDIF:PROJECTK # Verify that "u" with no line info works @@ -164,7 +164,7 @@ SOSCOMMAND:u -o VERIFY:\s*Normal JIT generated code\s+ VERIFY:\s+SymbolTestApp\.Program\.Foo4\(System\.String\)\s+ VERIFY:\s+Begin\s+,\s+size\s+\s+ -VERIFY:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 46:\s+ +VERIFY:\s+(?i:.*[\\|/]SymbolTestApp\.cs) @ 54:\s+ ENDIF:PROJECTK # Verify that Name2EE works -- 2.34.1