Skip to content

Commit

Permalink
Adjusted cf-support to not fail if core dumps are available and gdb i…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
craigcomstock committed Dec 11, 2024
1 parent be724b2 commit feede7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions misc/cf-support
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,21 @@ 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
echo "gdb not found so logging found core dump files to $_core_log"
# shellcheck disable=SC2012
ls -l "$core_file" | tee "$_core_log"
fi
done
fi
Expand Down

0 comments on commit feede7c

Please sign in to comment.