]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb-6.3-gstack-20050411.patch
updated source url to https
[packages/gdb.git] / gdb-6.3-gstack-20050411.patch
index 361950406b0ec8159433e4f8549736550d8e9e85..982863adb85d87cfa6dcee0f79696dcb71f35277 100644 (file)
@@ -3,8 +3,6 @@ From: Andrew Cagney <cagney@gnu.org>
 Date: Fri, 27 Oct 2017 21:07:50 +0200
 Subject: gdb-6.3-gstack-20050411.patch
 
-FileName: gdb-6.3-gstack-20050411.patch
-
 ;; Add a wrapper script to GDB that implements pstack using the
 ;; --readnever option.
 ;;=push
@@ -14,21 +12,11 @@ FileName: gdb-6.3-gstack-20050411.patch
        * Makefile.in (uninstall-gstack, install-gstack): New rules, add
        to install and uninstall.
        * gstack.sh, gstack.1: New files.
----
- gdb/Makefile.in                   | 34 ++++++++++++++++++--
- gdb/gstack.sh                     | 43 +++++++++++++++++++++++++
- gdb/testsuite/gdb.base/gstack.c   | 43 +++++++++++++++++++++++++
- gdb/testsuite/gdb.base/gstack.exp | 66 +++++++++++++++++++++++++++++++++++++++
- 4 files changed, 184 insertions(+), 2 deletions(-)
- create mode 100644 gdb/gstack.sh
- create mode 100644 gdb/testsuite/gdb.base/gstack.c
- create mode 100644 gdb/testsuite/gdb.base/gstack.exp
 
 diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index 17b71c6e7c..e77d6a5c03 100644
 --- a/gdb/Makefile.in
 +++ b/gdb/Makefile.in
-@@ -1744,7 +1744,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
+@@ -1768,7 +1768,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
  install: all
        @$(MAKE) $(FLAGS_TO_PASS) install-only
  
@@ -37,7 +25,7 @@ index 17b71c6e7c..e77d6a5c03 100644
        transformed_name=`t='$(program_transform_name)'; \
                          echo gdb | sed -e "$$t"` ; \
                if test "x$$transformed_name" = x; then \
-@@ -1784,7 +1784,25 @@ install-guile:
+@@ -1817,7 +1817,25 @@ install-guile:
  install-python:
        $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
  
@@ -64,7 +52,7 @@ index 17b71c6e7c..e77d6a5c03 100644
        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)
+@@ -1840,6 +1858,18 @@ uninstall: force $(CONFIG_UNINSTALL)
        fi
        @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
  
@@ -85,7 +73,6 @@ index 17b71c6e7c..e77d6a5c03 100644
        $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
 diff --git a/gdb/gstack.sh b/gdb/gstack.sh
 new file mode 100644
-index 0000000000..f7f07248f7
 --- /dev/null
 +++ b/gdb/gstack.sh
 @@ -0,0 +1,43 @@
@@ -134,7 +121,6 @@ index 0000000000..f7f07248f7
 +    -e '/^Thread/p'
 diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
 new file mode 100644
-index 0000000000..dc10813f04
 --- /dev/null
 +++ b/gdb/testsuite/gdb.base/gstack.c
 @@ -0,0 +1,43 @@
@@ -183,10 +169,9 @@ index 0000000000..dc10813f04
 +}
 diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
 new file mode 100644
-index 0000000000..1186ec57bc
 --- /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
@@ -217,6 +202,10 @@ index 0000000000..1186ec57bc
 +    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 {
@@ -232,7 +221,6 @@ index 0000000000..1186ec57bc
 +      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.
@@ -244,15 +232,27 @@ index 0000000000..1186ec57bc
 +    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"
--- 
-2.14.3
-
++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.032063 seconds and 4 git commands to generate.