This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Various command file questions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]