/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)runcont.c 1.1 %G%";
#define MAXNARGS 10 /* maximum number of arguments to RUN */
LOCAL BOOLEAN just_started
;
LOCAL string argv
[MAXNARGS
];
* initialize the argument list
* add an argument to the list for the debuggee
error("too many arguments");
* set the standard input for the debuggee
error("multiple input redirects");
* set the standard output for the debuggee
* should probably check to avoid overwriting an existing file
error("multiple output redirect");
* run starts debuggee executing
start(argv
, infile
, outfile
);
* continue execution wherever we left off
* Note that this routine never returns. Eventually bpact() will fail
* and we'll call printstatus or step will call it.
dbintr
= signal(SIGINT
, &intr
);
error("can't continue execution");
* This routine is called if we get an interrupt while "running" px
* but actually in the debugger. Could happen, for example, while
* processing breakpoints.
* We basically just want to keep going; the assumption is
* that when the process resumes it will get the interrupt
* which will then be handled.