]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
* Modify nlgone_exit so that it tests --vgdb-stop-at=startup,exit
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 23 Apr 2014 21:27:07 +0000 (21:27 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 23 Apr 2014 21:27:07 +0000 (21:27 +0000)
* remove empty lines from nlgone_*.stdinB.gdb, as these empty
  lines are (surprisingly) repeating the previous gdb command.
  Empty lines should be be put in the *gdb files.
* And add yet another sed expression in filter_gdb to cope with
  the different place where a thread exits.
  (this filter technique is now *really* arriving in a dead end
   e.g. the link between the comment and the sed expression is very
   poor).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13905

gdbserver_tests/filter_gdb
gdbserver_tests/nlgone_abrt.stdinB.gdb
gdbserver_tests/nlgone_abrt.stdoutB.exp
gdbserver_tests/nlgone_exit.stderr.exp
gdbserver_tests/nlgone_exit.stdinB.gdb
gdbserver_tests/nlgone_exit.stdoutB.exp
gdbserver_tests/nlgone_exit.vgtest
gdbserver_tests/nlgone_return.stdinB.gdb
gdbserver_tests/nlgone_return.stdoutB.exp

index a1068183a03c72942aee720b6044fceb55893594..a31cb0f175a77be5ccb2d8c5a45e626faa21a081 100755 (executable)
@@ -76,6 +76,8 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
     -e 's/in _dl_sysinfo_int80 () from \/lib\/ld-linux.so.*/in syscall .../'                          \
     -e 's/in kill ().*$/in syscall .../'                                                              \
     -e 's/in .*kill ().*$/in syscall .../'                                                            \
+    -e 's/in _exit () from \/lib\/libc.so.*$/in syscall .../'                                            \
+    -e 's/in \._exit () from \/lib64\/libc.so.*$/in syscall .../'                                        \
     -e 's/in _dl_sysinfo_int80 ()/in syscall .../'                                                    \
     -e '/^   from \/lib\/ld-linux.so.*$/d'                                                            \
     -e 's/\(0x........\) in ?? () from \/lib.*$/\1 in syscall .../'                                   \
@@ -83,7 +85,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
     -e 's/in \(.__\)\{0,1\}select () from \/.*$/in syscall .../'                                      \
     -e '/^   from \/lib\/libc.so.*$/d'                                                                \
     -e '/^   from \/lib64\/libc.so.*$/d'                                                              \
-    -e '/^   from \/lib64\/.*\/libc.so.*$/d'                                                         \
+    -e '/^   from \/lib64\/.*\/libc.so.*$/d'                                                          \
     -e 's/in select ()$/in syscall .../'                                                              \
     -e 's/in \.__select ()$/in syscall .../'                                                          \
     -e 's/in select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../'                \
index 97dc28048945e1cfbc25d0e291eb88bb7f6ecb07..05dfd90049007bc42059833f50fe05230a2a6cda 100644 (file)
@@ -1,7 +1,6 @@
 # connect gdb to Valgrind gdbserver:
 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlgone-abrt
 echo vgdb launched process attached\n
-
 continue
 # see process get a fatal signal
 continue
index 38207d63da41b83fec52d8df3c41dc22ff924bf7..75ec1e19b96384cde964a9109dc83cf1cc23f921 100644 (file)
@@ -1,4 +1,3 @@
-vgdb launched process attached
 Continuing.
 Program received signal SIGABRT, Aborted.
 0x........ in syscall ...
index f6f82cf6c61d069ff3a54454b1408968ab15d0fe..625adc0997e19f35e61563d005bcfb9b8dc2c147 100644 (file)
@@ -1,8 +1,7 @@
 Nulgrind, the minimal Valgrind tool
 
 (action at startup) vgdb me ... 
-
-
 starting ...
 exiting ...
+(action at exit) vgdb me ... 
 
index 903fb88c3eb2991523763ccbca8834ce4a322239..3724be6ec3f152ea38213bdf63d5f93366c6f8e2 100644 (file)
@@ -1,7 +1,9 @@
 # connect gdb to Valgrind gdbserver:
 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlgone-exit
 echo vgdb launched process attached\n
-
+# continue after startup
+continue
+# continue at the last instruction
 continue
 # see program is gone with exit code
 quit
index bbe04d508415868451afedda0ad390b936d7b012..3f4c712590e9dee53e538153ba1d8a864beab41f 100644 (file)
@@ -1,3 +1,5 @@
-vgdb launched process attached
+Continuing.
+Program received signal SIGTRAP, Trace/breakpoint trap.
+0x........ in syscall ...
 Continuing.
 Program exited with code 01.
index a354e1c001567901cb5aeaf1e3c66a662e3b8e32..02a20a7afa3bd01053556f4c9f11907a1309cbe0 100644 (file)
@@ -1,8 +1,9 @@
 # test that an exit (with return value) is properly passed on to gdb.
-
+# also test the --vgdb-stop-at startup and exit args (so we do not use
+# --vgdb-error=0 here)
 prog: gone
 args: exit
-vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlgone-exit
+vgopts: --tool=none --vgdb=yes --vgdb-stop-at=startup,exit --vgdb-prefix=./vgdb-prefix-nlgone-exit
 stderr_filter: filter_stderr
 prereq: test -e gdb
 progB: gdb
index cd57f6241713c44df5800eaf8e3b3b6f0e704854..3dad93e3d235a636f836b4322f3d3b8273b90197 100644 (file)
@@ -1,7 +1,6 @@
 # connect gdb to Valgrind gdbserver:
 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlgone-return
 echo vgdb launched process attached\n
-
 continue
 # see program is gone
 quit
index 69e42bab06c305a9537465653e7c1684b52e2e77..2c7cf40443edd7dadee5e82a5afec73a3cccdfff 100644 (file)
@@ -1,3 +1,2 @@
-vgdb launched process attached
 Continuing.
 Program exited normally.