




















Updated PKGBUILD:
pkgname=cross-mingw-w64-gdb
pkgver=12.1
pkgrel=1
pkgdesc="The GNU Debugger (compiled to debug target mingw-w64)"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/gdb/"
license=('LGPL')
depends=('ncurses' 'expat' 'xz' 'readline' 'source-highlight')
makedepends=('gcc' 'texinfo')
options=('staticlibs' '!buildflags')
source=("http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz"
"const_char.patch")
sha256sums=('0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed'
'b227d9a5a60c9f67146191d0d4b8feb6f82337ff73046637f48bd8ed2f1d3f8a')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
patch --directory "gdb-$pkgver" --forward --strip=0 --input="${srcdir}/const_char.patch"
}
build() {
cd "$srcdir/gdb-$pkgver"
for _arch in ${_architectures}; do
unset LDFLAGS
mkdir -p build-${_arch} && pushd build-${_arch}
../configure --prefix=/usr \
--target=${_arch} \
--enable-lto \
--disable-nls \
--with-system-readline \
--with-expat
make
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir"/gdb-${pkgver}/build-${_arch}
make install DESTDIR="$pkgdir"
rm -rf "$pkgdir"/usr/share/{info,locale,gdb}
rm -f "$pkgdir"/usr/share/man/man1/*-w64-mingw32-gdbserver.1*
rm -rf "$pkgdir"/usr/share/man/man5
rm -rf "$pkgdir"/usr/lib
rm -rf "$pkgdir"/usr/include
done
}
# vim: set expandtab tabstop=4 :
and const_char.patch
--- gdb/completer.c 2022-05-01 20:46:31.000000000 +0200
+++ gdb/completer.c 2023-01-20 01:45:12.953677480 +0100
@@ -2011,7 +2011,7 @@
rl_basic_quote_characters = NULL;
}
- return rl_completer_word_break_characters;
+ return (char*) rl_completer_word_break_characters;
}
char *
For further details see also https://github.com/archlinux/svntogit-packages/tree/packages/gdb/trunk.
Hello,
How to use this package ?
$ x86_64-w64-mingw32-gdb
GNU gdb (GDB) 8.1.1
...
(gdb) run ./foo.exe
Don't know how to run. Try "help target".
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
i'm unable to build it both on archlinux and manjaro:
../../gdb/completer.c: In function ‘char gdb_completion_word_break_characters_throw()’: ../../gdb/completer.c:1853:10: error: invalid conversion from ‘const char’ to ‘char’ [-fpermissive] 1853 | return rl_completer_word_break_characters; | ^
~ | | | const char make[2]: *** [Makefile:1637: completer.o] Error 1