]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gcore.in
gdb/
[thirdparty/binutils-gdb.git] / gdb / gcore.in
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from gdb/gdb_gcore.sh
rename to gdb/gcore.in
index 38548f2..9c5b14d
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #
-# gcore.sh
 # Script to generate a core file of a running program.
 # It starts up gdb, attaches to the given PID and invokes the gcore command.
 #
 
 if [ "$#" -eq "0" ]
 then
-    echo "usage:  gcore [-o filename] pid"
+    echo "usage:  @GCORE_TRANSFORM_NAME@ [-o filename] pid"
     exit 2
 fi
 
@@ -35,7 +34,7 @@ then
     if [ "$#" -lt "3" ]
     then
        # Not enough arguments.
-       echo "usage:  gcore [-o filename] pid"
+       echo "usage:  @GCORE_TRANSFORM_NAME@ [-o filename] pid"
        exit 2
     fi
     name=$2
@@ -52,14 +51,14 @@ for pid in $*
 do
        # `</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 \
+       @GDB_TRANSFORM_NAME@ </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
        else
-           echo gcore: failed to create $name.$pid
+           echo "@GCORE_TRANSFORM_NAME@: failed to create $name.$pid"
            rc=1
            break
        fi