summaryrefslogtreecommitdiff
path: root/tests/runtest.sh
diff options
context:
space:
mode:
authorAditya Mandaleeka <adityam@microsoft.com>2016-08-18 18:13:52 -0700
committerAditya Mandaleeka <adityam@microsoft.com>2016-08-18 19:34:33 -0700
commit60b9b8d9a774fba6ba45aa6d141fb60be19de5ad (patch)
treec9db06f3e5ddfddb698fabf95fae6c64d13511b1 /tests/runtest.sh
parentc69eff4e84bc41b4d52cc62d8eacf198b49a5730 (diff)
downloadcoreclr-60b9b8d9a774fba6ba45aa6d141fb60be19de5ad.tar.gz
coreclr-60b9b8d9a774fba6ba45aa6d141fb60be19de5ad.tar.bz2
coreclr-60b9b8d9a774fba6ba45aa6d141fb60be19de5ad.zip
Print info from core dumps on OS X using LLDB.
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-xtests/runtest.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh
index c75c1b9a01..93686635bd 100755
--- a/tests/runtest.sh
+++ b/tests/runtest.sh
@@ -576,14 +576,19 @@ function print_info_from_core_file {
return
fi
- # Check for the existence of GDB on the path
- hash gdb 2>/dev/null || { echo >&2 "GDB was not found. Unable to print core file."; return; }
+ # Use LLDB to inspect the core dump on Mac, and GDB everywhere else.
+ if [[ "$OSName" == "Darwin" ]]; then
+ hash lldb 2>/dev/null || { echo >&2 "LLDB was not found. Unable to print core file."; return; }
- echo "Printing info from core file $core_file_name"
+ echo "Printing info from core file $core_file_name"
+ lldb -c $core_file_name -b -o 'bt'
+ else
+ # Use GDB to print the backtrace from the core file.
+ hash gdb 2>/dev/null || { echo >&2 "GDB was not found. Unable to print core file."; return; }
- # Open the dump in GDB and print the stack from each thread. We can add more
- # commands here if desired.
- gdb --batch -ex "thread apply all bt full" -ex "quit" $executable_name $core_file_name
+ echo "Printing info from core file $core_file_name"
+ gdb --batch -ex "thread apply all bt full" -ex "quit" $executable_name $core_file_name
+ fi
}
function download_dumpling_script {