From 8194ff54cb0874cf46f9f2bb97e8a9837f448662 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Mon, 9 Dec 2024 16:12:00 -0600 Subject: [PATCH] Adjusted cf-support to not fail if core dumps are available and gdb is missing Previously cf-support would fail if core dumps were present and gdb was missing. We only want a warning and a log of which files are available for anlysis in this case. Ticket: ENT-9786 Changelog: title --- misc/cf-support | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/cf-support b/misc/cf-support index 88ba2fb3b8..b6ddc114c3 100755 --- a/misc/cf-support +++ b/misc/cf-support @@ -194,17 +194,20 @@ else if [ "$OS" != "solaris" ]; then if ! command -v gdb >/dev/null; then echo "Please install gdb. This is required in order to analyze core dumps." - exit 1 + echo "Core dumps needing to be analyzed will be listed below:" fi fi for core_file in $cf_core_files; do file "$core_file" >> "$_core_log" if [ "$OS" = "solaris" ]; then pstack "$core_file" >> "$_core_log" 2>&1 - else + elif command -v gdb >/dev/null; then execfn=`file "$core_file" | sed 's/,/\n/g' | grep execfn | cut -d: -f2 | sed "s/[' ]//g"` exe="`realpath "$execfn"`" gdb "$exe" --core="$core_file" -batch -ex "thread apply all bt full" >> "$_core_log" 2>&1 + else + # shellcheck disable=SC2012 + ls -l "$core_file" | tee "$_core_log" fi done fi