diff options
author | Andres Freund <andres@anarazel.de> | 2025-02-12 09:40:20 -0500 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-02-12 09:40:20 -0500 |
commit | c45963c5d5cc0a3b8739ba158f781452a3fd89c5 (patch) | |
tree | 12d81cac1fd17244055427e6b385c1cf6d32749b /src | |
parent | e291573534237c154609f320d774ef293c0cd2ee (diff) | |
download | postgresql-c45963c5d5cc0a3b8739ba158f781452a3fd89c5.tar.gz postgresql-c45963c5d5cc0a3b8739ba158f781452a3fd89c5.zip |
ci: Collect core files on NetBSD and OpenBSD
Support for NetBSD and OpenBSD operating systems have been added to CI in the
prior commit. Now add support for collect core files and generating backtraces
using for all core files.
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/CAN55FZ32ySyYa06k9MFd+VY5vHhUyBpvgmJUZae5PihjzaurVg@mail.gmail.com
Diffstat (limited to 'src')
-rwxr-xr-x | src/tools/ci/cores_backtrace.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/ci/cores_backtrace.sh b/src/tools/ci/cores_backtrace.sh index 28d3cecfc67..54607415258 100755 --- a/src/tools/ci/cores_backtrace.sh +++ b/src/tools/ci/cores_backtrace.sh @@ -9,7 +9,7 @@ os=$1 directory=$2 case $os in - freebsd|linux|macos) + freebsd|linux|macos|netbsd|openbsd) ;; *) echo "unsupported operating system ${os}" @@ -26,7 +26,7 @@ for corefile in $(find "$directory" -type f) ; do echo -e '\n\n' fi - if [ "$os" = 'macos' ]; then + if [ "$os" = 'macos' ] || [ "$os" = 'openbsd' ]; then lldb -c $corefile --batch -o 'thread backtrace all' -o 'quit' else auxv=$(gdb --quiet --core ${corefile} --batch -ex 'info auxv' 2>/dev/null) @@ -37,6 +37,8 @@ for corefile in $(find "$directory" -type f) ; do if [ "$os" = 'freebsd' ]; then binary=$(echo "$auxv" | grep AT_EXECPATH | perl -pe "s/^.*\"(.*)\"\$/\$1/g") + elif [ "$os" = 'netbsd' ]; then + binary=$(echo "$auxv" | grep AT_SUN_EXECNAME | perl -pe "s/^.*\"(.*)\"\$/\$1/g") elif [ "$os" = 'linux' ]; then binary=$(echo "$auxv" | grep AT_EXECFN | perl -pe "s/^.*\"(.*)\"\$/\$1/g") else |