{ "continue" , cmdContinue ,
"{c}ontinue\t\t Continue program being debugged, after breakpoint.\n"
},
+ { "condition" , cmdCondition ,
+ "condition brkpoint_number expr\t\tSet condition for breakpoint.\n"
+ },
+ { "ignore" , cmdIgnore ,
+ "brkpoint_number count\t\tSet ignore count for breakpoint.\n"
+ },
{ "commands" , cmdCommands ,
- "commands [brkpoint number]\t\tSetting commands for breakpoint.\n"
+ "commands [brkpoint_number]\t\tSetting commands for breakpoint.\n"
},
{ "c" , cmdContinue , NULL },
static FILE *actualcmdfile=NULL ;
static char *actualcmds=NULL;
-
+static int stopcmdlist;
/*-----------------------------------------------------------------*/
/* getNextCmdLine get additional lines used by special commands */
/*-----------------------------------------------------------------*/
char *getNextCmdLine()
{
+ //fprintf(stderr,"getNextCmdLine() actualcmdfile=%p\n",actualcmdfile);
if (!actualcmdfile)
return NULL;
+ fprintf(stdout,">");
+ fflush(stdout);
if (fgets(cmdbuff,sizeof(cmdbuff),actualcmdfile) == NULL)
+ {
+ // fprintf(stderr,"getNextCmdLine() returns null\n");
return NULL;
+ }
+ //fprintf(stderr,"getNextCmdLine() returns: %s",cmdbuff);
return cmdbuff;
}
actualcmds = cmds;
}
+void stopCommandList()
+{
+ stopcmdlist = 1;
+}
+
/*-----------------------------------------------------------------*/
/* commandLoop - the main command loop or loop over command file */
/*-----------------------------------------------------------------*/
fflush(stdout);
}
+ //fprintf(stderr,"commandLoop actualcmdfile=%p cmdfile=%p\n",
+ // actualcmdfile,cmdfile);
if (fgets(cmdbuff,sizeof(cmdbuff),cmdfile) == NULL)
break;
{
strcpy(cmdbuff,actualcmds);
actualcmds = NULL;
+ stopcmdlist= 0;
for ( line = cmdbuff; *line ; line = s )
{
if ( (s=strchr(line ,'\n')))
break;
}
*s = save_ch;
+ if ( stopcmdlist )
+ break;
}
}
}
continue ;
}
+ /* network serial port */
+ if ( (strcmp(argv[i],"-k") == 0)) {
+ simArgs[nsimArgs++] = strdup(argv[i]);
+ simArgs[nsimArgs++] = strdup(argv[++i]);
+ continue ;
+ }
+
fprintf(stderr,"unknown option %s --- ignored\n",
argv[i]);
static void
setsignals()
{
- signal(SIGHUP , bad_signal);
+ signal(SIGHUP , SIG_IGN);
+ signal(SIGCONT, SIG_IGN);
signal(SIGINT , sigintr );
signal(SIGTERM, bad_signal);
signal(SIGCHLD, sigchld );