From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17256 invoked by alias); 14 Jan 2007 14:02:14 -0000 Received: (qmail 17242 invoked by uid 22791); 14 Jan 2007 14:02:12 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.233) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 14 Jan 2007 14:02:07 +0000 Received: by wx-out-0506.google.com with SMTP id t13so1308722wxc for ; Sun, 14 Jan 2007 06:02:05 -0800 (PST) Received: by 10.90.98.10 with SMTP id v10mr2046526agb.1168783325050; Sun, 14 Jan 2007 06:02:05 -0800 (PST) Received: by 10.90.26.17 with HTTP; Sun, 14 Jan 2007 06:02:04 -0800 (PST) Message-ID: Date: Sun, 14 Jan 2007 14:02:00 -0000 From: "Rob Quill" To: gdb@sourceware.org Subject: Various command file questions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00245.txt.bz2 Hi, Appologies for the non-descriptive subject, but I couldn't think of one that covered all the questions I wanted to ask. The script I current have is of the form checkpoint while $_exitcode == void(0) ... end restore 1 The aim being for a checkpoint to be made, then the program ran until it terminates, then some information printed, then the program restored. The problems are as follows: When the program deos terminate $_exitcode is assigned a value, and so checking if it is void causes a type error, and the error stops the script running. I was wondering if there was any way to get around this. In a similar vein, when the checkpoint is restored, $_exitcode still has a value, but I would like to be able to delete the convenience variable so that the script may be executed again. Finally, is there a way to record the number of a checkpoint when it is created, so that it can be used with the restore command later? As currently the script assumes that the checkpouint created at the beginning is checkpoint 1. Thanks for your help. Rob