mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
* Disabled several tests on ARM when gdb version < 7.1 gdb 7.0 has problems with next/step/... in ARM thumb code. * Documented in manual-core.xml that ARM thumb code implies a gdb version >= 7.1 * m_gdbserver.h/.c : take into account the thumb bit at several places * use new IRStmt_IMark::delta field to distinguish ARM vs Thumb instructions as committed in vex r2153 Patch from bug 214909 comment 99 (valgrind part). (Philippe Waroquiers, philippe.waroquiers@skynet.be) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11779
76 lines
2.4 KiB
Bash
Executable File
76 lines
2.4 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
# (must be called from the valgrind top source dir).
|
|
#
|
|
# Make local links in the gdbserver_tests directory
|
|
# so that tests needing gdb can be disabled if
|
|
# a tool old version of gdb is provided or if no gdb is
|
|
# provided.
|
|
#
|
|
# The vgdb link is needed either for gdb tests
|
|
# or for standalone vgdb tests.
|
|
|
|
if [ -x "$1" ]
|
|
then
|
|
ln -f -s "$1" gdbserver_tests/gdb
|
|
# Try to extract the gdb version.
|
|
VERSIONLINE=`gdbserver_tests/gdb --version | head -n 1`
|
|
VERSION=`echo $VERSIONLINE |
|
|
sed -e 's/[^0-9\.]//g' -e 's/\./ /g'`
|
|
|
|
# We need at least a 6.5 version to run any gdb test
|
|
VERSIONOK=`echo $VERSION |
|
|
awk '{ if ( ($1 >= 7) || (($1 == 6) && ($2 >= 5)) ) print "version ok"}'`
|
|
if [ "$VERSIONOK" = "" ]
|
|
then
|
|
echo "gdbserver tests suppressed as $1 version is < 6.5: " $VERSIONLINE
|
|
rm -f gdbserver_tests/gdb
|
|
fi
|
|
|
|
# We need at least a 7.1 version on ARM to run tests doing step/next/...
|
|
# (gdb 7.0 has bugs in the 'guess next pc' heuristic in thumb mode).
|
|
if tests/arch_test arm
|
|
then
|
|
VERSIONOK=`echo $VERSION |
|
|
awk '{ if ( ($1 >= 8) || (($1 == 7) && ($2 >= 1)) ) print "version ok"}'`
|
|
if [ "$VERSIONOK" = "" ]
|
|
then
|
|
echo "gdbserver 'step/next' tests suppressed as arm $1 version is < 7.1: " $VERSIONLINE
|
|
rm -f gdbserver_tests/gdb.step
|
|
else
|
|
touch gdbserver_tests/gdb.step
|
|
fi
|
|
else
|
|
touch gdbserver_tests/gdb.step
|
|
fi
|
|
|
|
# We need at least a 7.2 version for gdb tests using eval command
|
|
VERSIONOK=`echo $VERSION |
|
|
awk '{ if ( ($1 >= 8) || (($1 == 7) && ($2 >= 2)) ) print "version ok"}'`
|
|
if [ "$VERSIONOK" = "" ]
|
|
then
|
|
echo "gdbserver eval tests suppressed as $1 version is < 7.2: " $VERSIONLINE
|
|
rm -f gdbserver_tests/gdb.eval
|
|
else
|
|
touch gdbserver_tests/gdb.eval
|
|
fi
|
|
else
|
|
echo "gdbserver gdb tests suppressed as $1 is not executable"
|
|
fi
|
|
|
|
ln -f -s ../coregrind/vgdb gdbserver_tests/vgdb
|
|
|
|
# if ptrace not implemented in vgdb or OS restricts the initial attach,
|
|
# some tests would block for a loooonnnng time.
|
|
if gdbserver_tests/vgdb --help 2>&1 |
|
|
grep -e 'ptrace invoker not implemented' \
|
|
-e 'kernel restricts ptrace invoker' > /dev/null
|
|
then
|
|
rm -f gdbserver_tests/vgdb.ptraceinvoker
|
|
else
|
|
touch gdbserver_tests/vgdb.ptraceinvoker
|
|
fi
|
|
|
|
# cleanup the possibly big garbage previously collected output
|
|
rm -f gdbserver_tests/garbage.filtered.out
|