+ /* Attach debugger if they asked for it. */
+ if (debugpath && history_num == strlen(debugpath)) {
+ unsigned int i;
+
+ for (i = 0; i < history_num; i++) {
+ char c = info_to_arg[history[i].type];
+ if (history[i].fail)
+ c = toupper(c);
+ if (c != debugpath[i])
+ break;
+ }
+ if (i == history_num) {
+ char str[80];
+
+ /* Don't timeout. */
+ signal(SIGUSR1, SIG_IGN);
+ sprintf(str, "xterm -e gdb /proc/%d/exe %d &",
+ getpid(), getpid());
+ system(str);
+ sleep(5);
+ }
+ }
+
+ if (failtest_hook) {
+ switch (failtest_hook(history, history_num)) {
+ case FAIL_OK:
+ break;
+ case FAIL_DONT_FAIL:
+ call->fail = false;
+ return false;
+ case FAIL_PROBE:
+ /* Already down probe path? Stop now. */
+ if (probe_count)
+ failtest_cleanup(true, 0);
+ /* FIXME: We should run *parent* and run probe until
+ * calls match up again. */
+ probe_count = 3;
+ break;
+ default:
+ abort();
+ }