mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 12:20:00 -04:00
Fix system test backtrace generation on OpenBSD
On Linux core dump contains absolute path to crashed binary
Core was generated by `/home/newman/isc/ws/bind9/bin/named/.libs/lt-named -D glue-ns1 -X named.lock -m'.
However, on OpenBSD there's only a basename
Core was generated by `named'.
This commit adds support for the latter, retains the former.
This commit is contained in:
parent
f8de3df76c
commit
f0b13873a3
1 changed files with 4 additions and 1 deletions
|
|
@ -265,7 +265,10 @@ if [ -n "$core_dumps" ]; then
|
|||
export SYSTESTDIR="$systest"
|
||||
echoinfo "D:$systest:backtrace from $coredump:"
|
||||
echoinfo "D:$systest:--------------------------------------------------------------------------------"
|
||||
binary=$(gdb --batch --core="$coredump" 2>/dev/null | sed -ne "s/Core was generated by \`//;s/ .*'.$//p;")
|
||||
binary=$(gdb --batch --core="$coredump" 2>/dev/null | sed -ne "s|Core was generated by \`\([^' ]*\)[' ].*|\1|p")
|
||||
if [ ! -f "${binary}" ]; then
|
||||
binary=$(find "${top_builddir}" -path "*/.libs/${binary}" -type f)
|
||||
fi
|
||||
"${top_builddir}/libtool" --mode=execute gdb \
|
||||
-batch \
|
||||
-ex bt \
|
||||
|
|
|
|||
Loading…
Reference in a new issue