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 9, 2024
1 parent be724b2 commit 2d18fd9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions misc/cf-support
Original file line number Diff line number Diff line change
Expand Up @@ -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
echo "gdb not found so logging found core dump files to $_core_log"
ls -l "$core_file" | tee "$_core_log"
fi
done
fi
Expand Down

0 comments on commit 2d18fd9

Please sign in to comment.