From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24024 invoked by alias); 23 Jul 2010 17:33:29 -0000 Received: (qmail 24008 invoked by uid 22791); 23 Jul 2010 17:33:27 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 17:33:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6NHXFIM018009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jul 2010 13:33:16 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6NHXCHH001558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 23 Jul 2010 13:33:14 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o6NHXCVm018089 for ; Fri, 23 Jul 2010 19:33:12 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o6NHXCGe018088 for gdb-patches@sourceware.org; Fri, 23 Jul 2010 19:33:12 +0200 Date: Fri, 23 Jul 2010 17:33:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] gdb_gcore.sh updates Message-ID: <20100723173312.GA17869@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00362.txt.bz2 Hi, the /dev/null redirection is from an existing Fedora patch. http://cvs.fedoraproject.org/viewvc/rpms/gdb/devel/gdb-6.6-bz229517-gcore-without-terminal.patch?revision=1.2&content-type=text%2Fplain&view=co (the testcase there is unreliable for some unknown reasons) The rest are some obvious changes. There exists no testcase for this shell script. Tested the changes by hand on x86_64-fedora13-linux-gnu. OK to check-in? Thanks, Jan 2010-07-23 Jan Kratochvil * gdb_gcore.sh (tmpfile): Remove the variable, its initialization, cleanup and generating of gdb script to it. (gdb): Use redirection from /dev/null. Use --nx. Turn off pagination and terminal size. Convert $tmpfile to a series of -ex-es. --- a/gdb/gdb_gcore.sh +++ b/gdb/gdb_gcore.sh @@ -45,32 +45,17 @@ then shift; shift fi -# Create a temporary file. Use mktemp if available, but cope if it is not. -tmpfile=`mktemp ${name}.XXXXXX 2>/dev/null` || { - tmpfile=${name}.$$ - if test -e $tmpfile; then - echo "Could not create temporary file $tmpfile" - exit 1 - fi - touch $tmpfile -} -trap "rm -f $tmpfile" EXIT - # Initialise return code. rc=0 # Loop through pids for pid in $* do - # Write gdb script for pid $pid. - cat >>$tmpfile <