-e 's/\(Could not write register \)".*"/\1 "xxx"/' \
-e 's/\(ERROR changing register \).*$/\1 xxx regno y/' \
-e 's/0x........ in \(main (argc=1, argv=0x........) at watchpoints.c:[24][3689]\)/\1/' \
- -e 's/0x........ in \(main () at clean_after_fork.c:32\)/\1/' \
+ -e 's/0x........ in \(main () at clean_after_fork.c:34\)/\1/' \
-e 's/\(^.*signal SIGFPE.*$\)/\1\nafter trap SIGFPE/' \
-e '/Id Target Id Frame/d' \
-e 's/^\([ \*] [1234] \) *Thread /\1Thread /' \
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
+ # We need at least a 6.5 version to use the Valgrind gdbserver.
+ # However, the tests are only supported/maintained for gdb >= 7
VERSIONOK=`echo $VERSION |
- awk '{ if ( ($1 >= 7) || (($1 == 6) && ($2 >= 5)) ) print "version ok"}'`
+ awk '{ if ($1 >= 7) 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/...
+ # We need at least a 7.1 version to run the 'pic' executable test
+ # (with 7.0, it fails on many platforms)
+ # On ARM, we need at least 7.1 to run the 'next/step/...' tests.
# (gdb 7.0 has bugs in the 'guess next pc' heuristic in thumb mode).
- if tests/arch_test arm
+ VERSIONOK=`echo $VERSION |
+ awk '{ if ( ($1 >= 8) || (($1 == 7) && ($2 >= 1)) ) print "version ok"}'`
+ # By default, consider step/next/... tests are ok. We will remove for ARM if needed.
+ touch gdbserver_tests/gdb.step
+ if [ "$VERSIONOK" = "" ]
then
- VERSIONOK=`echo $VERSION |
- awk '{ if ( ($1 >= 8) || (($1 == 7) && ($2 >= 1)) ) print "version ok"}'`
- if [ "$VERSIONOK" = "" ]
+ echo "gdbserver 'pic' tests suppressed as $1 version is < 7.1: " $VERSIONLINE
+ rm -f gdbserver_tests/gdb.pic
+ if tests/arch_test arm
then
- echo "gdbserver 'step/next' tests suppressed as arm $1 version is < 7.1: " $VERSIONLINE
+ 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
+ touch gdbserver_tests/gdb.pic
fi
# We need at least a 7.2 version for gdb tests using eval command
-Breakpoint 1 at 0x........: file main_pic.c, line 10.
+Breakpoint 1 at 0x........: file main_pic.c, line 11.
Continuing.
-Breakpoint 1, main (argc=1, argv=0x........) at main_pic.c:10
-10 printf("address of main %p\n", &main);
+Breakpoint 1, main (argc=1, argv=0x........) at main_pic.c:11
+11 printf("address of another_func %p\n", &another_func);
$1 = void
$2 = (int (*)(int, char **)) 0x........ <main>
$3 = (void (*)(char *)) 0x........ <another_func>
vgopts: --tool=memcheck --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcvabits
stdout_filter: filter_make_empty
stderr_filter: filter_make_empty
-prereq: test -e ./gdb.eval
+prereq: test -e gdb.eval
progB: gdb
argsB: --quiet -l 60 --nx ./t
stdinB: mcvabits.stdinB.gdb