diff options
author | psykose <alice@ayaya.dev> | 2023-03-28 00:36:59 +0000 |
---|---|---|
committer | psykose <alice@ayaya.dev> | 2023-03-28 02:36:59 +0200 |
commit | 345c571f98d948269a8601b38cc0080bf63f7677 (patch) | |
tree | b1ca39fab3c4c3b2070e7d1e5a05f0bff18234fc | |
parent | d4a173d817a2b3cd9d9ed786665c0bc1f0c9e8e4 (diff) |
main/gdb: attempt to debash script again
ref https://gitlab.alpinelinux.org/alpine/aports/-/issues/14753
-rw-r--r-- | main/gdb/APKBUILD | 4 | ||||
-rw-r--r-- | main/gdb/gcore-sh.patch | 45 |
2 files changed, 33 insertions, 16 deletions
diff --git a/main/gdb/APKBUILD b/main/gdb/APKBUILD index 56b79d70c23..2d51611c6ff 100644 --- a/main/gdb/APKBUILD +++ b/main/gdb/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gdb pkgver=13.1 -pkgrel=4 +pkgrel=5 pkgdesc="The GNU Debugger" url="https://www.gnu.org/software/gdb/" arch="all" @@ -112,7 +112,7 @@ multiarch() { sha512sums=" e65054ffbc0357eeed4b17e1edc5ef45aa73c9ddf3b1210651e3d859576e27c1d27b266800fe26328eda58857455ccd8632f4000cfc5f63f90854096290187ca gdb-13.1.tar.xz 0e8bcf29269f0d3c3ad87d176636359bed6db20ba10b0d3f0c034e025c14b6cb1c87f22c8162288104b7b4fe15beb80a010262592dadaff46f0bf6f44e10cb17 gdb-rust-crash.patch -a6632eb3da4e5a5ac651acad8856d13207e01bfdb0fd5906b8a45a59b748b31e104df8b55e51f25bc0eb9345dd53ed8d028b6ea79f6d21d4aa50e3b63ca770bd gcore-sh.patch +68f893e72742eac7e41fd7c3e688b8cccc79327f0422b03319302a1a9d24513e77d698bc6ff16f67236b521df321b9ff0ca2ee342c11f12933c492c5c530ec9b gcore-sh.patch 70e7d04e4d72461436da503b5bfa370c5779e03245c521f30e9779d5ff37dbb2d708b05f2afb27f43ad9defc44df4bd979d72f777e744851fdbf156295e1cc9f s390x-use-elf-gdb_fpregset_t.patch 04911f87904b62dd7662435f9182b20485afb29ddb3d6398a9d31fef13495f7b70639c77fdae3a40e2775e270d7cd40d0cfd7ddf832372b506808d33c8301e01 ppc-musl.patch ab554899bbb2aa98261fd1b6beb4a71ed7c713a714bddd3fa7ec875258e39bd5474dc96a11accb4dadd316f3834f215e8395d3b373bf3affd122dc5b4a8fe710 ppc-ptregs.patch diff --git a/main/gdb/gcore-sh.patch b/main/gdb/gcore-sh.patch index 61f8bc4d5df..166f75467f6 100644 --- a/main/gdb/gcore-sh.patch +++ b/main/gdb/gcore-sh.patch @@ -1,5 +1,5 @@ diff --git a/gdb/gcore.in b/gdb/gcore.in -index 34860de..eaba70d 100644 +index 34860de..5ede1d4 100644 --- a/gdb/gcore.in +++ b/gdb/gcore.in @@ -1,4 +1,4 @@ @@ -8,30 +8,47 @@ index 34860de..eaba70d 100644 # Copyright (C) 2003-2023 Free Software Foundation, Inc. -@@ -25,15 +25,14 @@ prefix=core +@@ -25,17 +25,12 @@ prefix=core # When the -a option is present, this may hold additional commands # to ensure gdb dumps all mappings (OS dependent). -dump_all_cmds=() -+dump_all_cmds="" ++dump_all=0 while getopts :ao: opt; do case "$opt" in a) - case "$OSTYPE" in - linux*) +- case "$OSTYPE" in +- linux*) - dump_all_cmds=("-ex" "set use-coredump-filter off") - dump_all_cmds+=("-ex" "set dump-excluded-mappings on") -+ dump_all_cmds="-ex set use-coredump-filter off -ex set dump-excluded-mappings on" - ;; - esac +- ;; +- esac ++ dump_all=1 ;; -@@ -100,7 +99,7 @@ do - "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null \ - --nx --batch --readnever -iex 'set debuginfod enabled off' \ - -ex "set pagination off" -ex "set height 0" -ex "set width 0" \ + o) + prefix=$OPTARG +@@ -97,11 +92,18 @@ for pid in "$@" + do + # `</dev/null' to avoid touching interactive terminal if it is + # available but not accessible as GDB would get stopped on SIGTTIN. +- "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null \ +- --nx --batch --readnever -iex 'set debuginfod enabled off' \ +- -ex "set pagination off" -ex "set height 0" -ex "set width 0" \ - "${dump_all_cmds[@]}" \ -+ $dump_all_cmds \ - -ex "attach $pid" -ex "gcore $prefix.$pid" -ex detach -ex quit +- -ex "attach $pid" -ex "gcore $prefix.$pid" -ex detach -ex quit ++ if [ "$dump_all" -eq 1 ]; then ++ "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null \ ++ --nx --batch --readnever -iex 'set debuginfod enabled off' \ ++ -ex "set pagination off" -ex "set height 0" -ex "set width 0" \ ++ -ex "set use-coredump-filter off" -ex "set dump-excluded-mappings on" \ ++ -ex "attach $pid" -ex "gcore $prefix.$pid" -ex detach -ex quit ++ else ++ "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null \ ++ --nx --batch --readnever -iex 'set debuginfod enabled off' \ ++ -ex "set pagination off" -ex "set height 0" -ex "set width 0" \ ++ -ex "attach $pid" -ex "gcore $prefix.$pid" -ex detach -ex quit ++ fi if [ -r "$prefix.$pid" ] ; then + rc=0 |