* Various command file questions
@ 2007-01-14 14:02 Rob Quill
2007-01-15 12:06 ` Andrew STUBBS
0 siblings, 1 reply; 2+ messages in thread
From: Rob Quill @ 2007-01-14 14:02 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Various command file questions
2007-01-14 14:02 Various command file questions Rob Quill
@ 2007-01-15 12:06 ` Andrew STUBBS
0 siblings, 0 replies; 2+ messages in thread
From: Andrew STUBBS @ 2007-01-15 12:06 UTC (permalink / raw)
To: Rob Quill; +Cc: gdb
Rob Quill wrote:
> 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.
set $_exitcode = 99999
while $_exitcode == 99999
...
end
> 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.
set $_exitcode = (void)0
... but with the above you wouldn't need to.
Dunno the answer to the other question.
Hope that helps.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-15 12:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-14 14:02 Various command file questions Rob Quill
2007-01-15 12:06 ` Andrew STUBBS
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox