Line 58... |
Line 58... |
#include "mprofiler.h"
|
#include "mprofiler.h"
|
#include "mc.h"
|
#include "mc.h"
|
#include "atahost.h"
|
#include "atahost.h"
|
|
|
/* CVS revision number. */
|
/* CVS revision number. */
|
const char rcsrev[] = "$Revision: 1.95 $";
|
const char rcsrev[] = "$Revision: 1.96 $";
|
|
|
/* History of execution */
|
/* History of execution */
|
int histexec[HISTEXEC_LEN];
|
int histexec[HISTEXEC_LEN];
|
|
|
char *sim_commands [] = {
|
char *sim_commands [] = {
|
Line 452... |
Line 452... |
HandleServerSocket(true); /* block & check_stdin = true */
|
HandleServerSocket(true); /* block & check_stdin = true */
|
}
|
}
|
#ifdef HAVE_LIBREADLINE
|
#ifdef HAVE_LIBREADLINE
|
/* Must disable readline in new mode. It isn't compatible
|
/* Must disable readline in new mode. It isn't compatible
|
with non blocking environments */
|
with non blocking environments */
|
|
wait_input:
|
if(!config.debug.gdb_enabled)
|
if(!config.debug.gdb_enabled)
|
linestr = readline("(sim) ");
|
linestr = readline("(sim) ");
|
else
|
else
|
linestr = fgets(b2, sizeof b2, stdin);
|
linestr = fgets(b2, sizeof b2, stdin);
|
#else
|
#else
|
if(!config.debug.gdb_enabled)
|
if(!config.debug.gdb_enabled)
|
PRINTF ("(sim) ");
|
PRINTF ("(sim) ");
|
|
wait_input:
|
linestr = fgets(b2, sizeof b2, stdin);
|
linestr = fgets(b2, sizeof b2, stdin);
|
#endif
|
#endif
|
} else
|
} else
|
strcpy(linestr = b2, "run -1 hush");
|
strcpy(linestr = b2, "run -1 hush");
|
|
|
if (!linestr)
|
if (!linestr) {
|
break;
|
usleep (1000);
|
|
goto wait_input;
|
|
}
|
linestr = stripwhite (linestr);
|
linestr = stripwhite (linestr);
|
|
|
#ifdef HAVE_LIBREADLINE
|
#ifdef HAVE_LIBREADLINE
|
/* Readline only works in the old mode */
|
/* Readline only works in the old mode */
|
if(!server_fd)
|
if(!server_fd)
|