gdb: Add almost-working recipe and patchset for 8.1 (!!!).

Reworking the Haiku backend from 6.3 (2004) to 8.1 (2018) surprisingly
only took a few hours to get it to compile ... but then it crashes when
attempting to start inferiors with a use-after free that I spent over
three hours debugging and got nowhere.

It seems that somehow, an event object that is created, deleted, and otherwise
managed entirely by the Haiku patches is somehow deleted between waits?!
The guarded heap was of not much help here, it obviously caught the UAF
before the regular heap did, but couldn't even say where it had been freed,
only where it had been allocated; and the allocation location looked
completely wrong also. So, this is very close, but it doesn't work just yet.

It would sure be nice to have Qt Creator's GDB support (which needs
Python-enabled GDB) working...
This commit is contained in:
Augustin Cavalier
2018-09-02 21:19:15 -04:00
parent 0471196ff4
commit 985c28d7c7
2 changed files with 3247 additions and 0 deletions

102
dev-util/gdb/gdb-8.1.recipe Normal file
View File

@@ -0,0 +1,102 @@
SUMMARY="The GNU debugger"
DESCRIPTION="GDB is the GNU debugger. It allows you to see what is going on \
'inside' another program while it executes -- or what another program was \
doing at the moment it crashed.
GDB can do four main kinds of things (plus other things in support of \
these) to help you catch bugs in the act:
* Start your program, specifying anything that might affect its behavior.
* Make your program stop on specified conditions.
* Examine what has happened, when your program has stopped.
* Change things in your program, so you can experiment with correcting \
the effects of one bug and go on to learn about another.
The program being debugged can be written in Ada, C, C++, Objective-C, \
Pascal (and many other languages). Those programs might be executing \
on the same machine as GDB (native) or on another machine (remote). \
GDB can run on most popular UNIX and Microsoft Windows variants."
HOMEPAGE="https://sourceware.org/gdb/"
COPYRIGHT="2018 Free Software Foundation, Inc."
LICENSE="GNU GPL v2
GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ftp.gnu.org/gnu/gdb/gdb-$portVersion.tar.xz"
CHECKSUM_SHA256="af61a0263858e69c5dce51eab26662ff3d2ad9aa68da9583e8143b5426be4b34"
PATCHES="gdb-$portVersion.patch"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
PROVIDES="
gdb = $portVersion
cmd:gdb = $portVersion
devel:libbfd = $portVersion
devel:libopcodes = $portVersion
"
REQUIRES="
haiku
lib:libz
lib:libiconv
lib:libncurses
lib:libpython2.7
lib:libexpat
"
BUILD_REQUIRES="
devel:libz
devel:libiconv
devel:libncurses
devel:libpython2.7
devel:libexpat
"
BUILD_PREREQUIRES="
haiku_devel
cmd:awk
cmd:cmp
cmd:bison
cmd:flex
cmd:gcc
cmd:ld
cmd:m4
cmd:make
cmd:makeinfo
cmd:yacc
cmd:python
"
TEST_REQUIRES="
cmd:runtest
"
BUILD()
{
if [ $targetArchitecture = x86 ]; then
TARGET=i586-pc-haiku
elif [ $targetArchitecture = x86_64 ]; then
TARGET=x86_64-unknown-haiku
fi
runConfigure --omit-dirs "docDir dataRootDir" ./configure \
--host=$TARGET --target=$TARGET \
--disable-nls --with-system-zlib
make configure-host
make configure-target
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libbfd \
libopcodes
rm $developLibDir/*.la
}
TEST()
{
make check
}

File diff suppressed because it is too large Load Diff