If, while recording through the API, one of the undolr_stop() or undolr_discard() functions fails (e.g. returns -1), what does that imply for the debugged program?
What measures should a programmer take when such failures are met?
At present the error codes returned in errno do not offer enoughprecision to allow the caller of undolr_stop() and undolr_discard() toassume the debugged program is in a safe state to continue executing,or whether any further API calls will have any chosen effect.
There are certain error codes that point to conditions that are likelyto be recoverable e.g.
ENODATA: this is returned if undolr_start() has not already been called. In this situation it may be possible to recover by calling the undolr_start() function before retrying, although correcting the API usage might make more sense.
EINVAL: if undolr_discard() is called without NULL context then this error number will be returned. Calling undolr_discard() again with a valid contextmight be expected to work. In this situation a likely misuse of the API is what needs correcting.
Unfortunately the only safe thing to do when an error is returned is toassume that the situation is non-recoverable and tidy up accordingly.
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.