]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb-6.3-gstack-20050411.patch
- up to 8.3
[packages/gdb.git] / gdb-6.3-gstack-20050411.patch
index 37b09de089ba3a0fc18bb59967868b6143684ff7..6690e15a4170a5e066a51fa971292150f3a7fc99 100644 (file)
@@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
 diff --git a/gdb/Makefile.in b/gdb/Makefile.in
 --- a/gdb/Makefile.in
 +++ b/gdb/Makefile.in
-@@ -1735,7 +1735,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
+@@ -1749,7 +1749,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
  install: all
        @$(MAKE) $(FLAGS_TO_PASS) install-only
  
@@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
        transformed_name=`t='$(program_transform_name)'; \
                          echo gdb | sed -e "$$t"` ; \
                if test "x$$transformed_name" = x; then \
-@@ -1784,7 +1784,25 @@ install-guile:
+@@ -1798,7 +1798,25 @@ install-guile:
  install-python:
        $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
  
@@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
        transformed_name=`t='$(program_transform_name)'; \
                          echo gdb | sed -e $$t` ; \
                if test "x$$transformed_name" = x; then \
-@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL)
+@@ -1821,6 +1839,18 @@ uninstall: force $(CONFIG_UNINSTALL)
        fi
        @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
  
@@ -171,7 +171,7 @@ diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.e
 new file mode 100644
 --- /dev/null
 +++ b/gdb/testsuite/gdb.base/gstack.exp
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,84 @@
 +# Copyright (C) 2012 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
@@ -202,6 +202,10 @@ new file mode 100644
 +    fail $test
 +    return
 +}
++
++# The spawn id of the test inferior.
++set test_spawn_id $res
++
 +set use_gdb_stub 1
 +set pid [exp_pid -i $res]
 +gdb_expect {
@@ -217,7 +221,6 @@ new file mode 100644
 +      return
 +    }
 +}
-+gdb_exit
 +
 +# Testcase uses the most simple notification not to get caught by attach on
 +# exiting the function.  Still we could retry the gstack command if we fail.
@@ -229,12 +232,27 @@ new file mode 100644
 +    perror "Spawning $command failed."
 +    fail $test
 +}
-+set pid [exp_pid -i $res]
++
++set gdb_spawn_id $res
++
 +gdb_test_multiple "" $test {
 +    -re "^#0 +(0x\[0-9a-f\]+ in )?\\.?func \\(\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in \\.?main \\(\\) at \[^\r\n\]*\r\nGSTACK-END\r\n\$" {
 +      pass $test
 +    }
 +}
-+gdb_exit
 +
-+remote_exec host "kill -9 $pid"
++gdb_test_multiple "" "gstack exits" {
++    eof {
++      set result [wait -i $gdb_spawn_id]
++      verbose $result
++
++      gdb_assert { [lindex $result 2] == 0 } "gstack exits with no error"
++      gdb_assert { [lindex $result 3] == 0 } "gstack's exit status is 0"
++
++      remote_close host
++      clear_gdb_spawn_id
++    }
++}
++
++# Kill the test inferior.
++kill_wait_spawned_process $test_spawn_id
This page took 0.045582 seconds and 4 git commands to generate.