diff options
author | Aditya Mandaleeka <adityam@microsoft.com> | 2016-08-18 18:13:52 -0700 |
---|---|---|
committer | Aditya Mandaleeka <adityam@microsoft.com> | 2016-08-18 19:34:33 -0700 |
commit | 60b9b8d9a774fba6ba45aa6d141fb60be19de5ad (patch) | |
tree | c9db06f3e5ddfddb698fabf95fae6c64d13511b1 /tests/runtest.sh | |
parent | c69eff4e84bc41b4d52cc62d8eacf198b49a5730 (diff) | |
download | coreclr-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-x | tests/runtest.sh | 17 |
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 { |