Rename "wild_match" parameter in ada-lang.c:symbol_completion_add...
[deliverable/binutils-gdb.git] / gdb / gdb_gcore.sh
index 9b428081aed265a08d3f25900ecf6216e5a96d18..de307843397a49eb9bc170c3872f4bba37e8c83d 100755 (executable)
@@ -1,23 +1,19 @@
 #!/bin/sh
 
-#   Copyright 2003  Free Software Foundation, Inc.
+#   Copyright (C) 2003, 2005, 2007-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #
 # gcore.sh
@@ -54,17 +50,11 @@ rc=0
 # Loop through pids
 for pid in $*
 do
-       # Write gdb script for pid $pid.  
-
-       # Avoid need for temporary files by using funky "here
-       # document" feature of sh.
-
-       /usr/bin/gdb > /dev/null << EOF
-       attach $pid
-       gcore $name.$pid
-       detach
-       quit
-EOF
+       # `</dev/null' to avoid touching interactive terminal if it is
+       # available but not accessible as GDB would get stopped on SIGTTIN.
+       gdb </dev/null --nx --batch \
+           -ex "set pagination off" -ex "set height 0" -ex "set width 0" \
+           -ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
 
        if [ -r $name.$pid ] ; then 
            rc=0
@@ -78,4 +68,3 @@ EOF
 done
 
 exit $rc
-
This page took 0.023943 seconds and 4 git commands to generate.