Martins commands patch
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 20 May 2003 20:43:38 +0000 (20:43 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 20 May 2003 20:43:38 +0000 (20:43 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2635 4a8a32a2-be11-0410-ad9d-d568d2c75423

debugger/mcs51/cmd.c
debugger/mcs51/sdcdb.c
debugger/mcs51/sdcdb.h

index 0c584c20068b2efa2ce5ec767e8fca61901eddff..86c17d2ce294f8ff53eba4371fe1a67723f001cf 100644 (file)
@@ -699,7 +699,7 @@ void simGo (unsigned int gaddr)
     unsigned int addr ;
     context *ctxt;
     int rv;
-
+    stopCommandList();
  top:    
     if ( userinterrupt )
     {
index d5c7a44becc444fd2b7f0f6ce7ff4849d7a64af8..328de243b79b1cecae6e603e74c77c1f07c57d2d 100644 (file)
@@ -836,7 +836,7 @@ int interpretCmd (char *s)
 
 static FILE *actualcmdfile=NULL ;
 static char *actualcmds=NULL;
-
+static int   stopcmdlist;
 /*-----------------------------------------------------------------*/
 /* getNextCmdLine get additional lines used by special commands    */
 /*-----------------------------------------------------------------*/
@@ -854,6 +854,11 @@ void setCmdLine( char *cmds )
     actualcmds = cmds;
 }
 
+void stopCommandList()
+{
+    stopcmdlist = 1;
+}
+
 /*-----------------------------------------------------------------*/
 /* commandLoop - the main command loop or loop over command file   */
 /*-----------------------------------------------------------------*/
@@ -882,6 +887,7 @@ static void commandLoop(FILE *cmdfile)
         {
             strcpy(cmdbuff,actualcmds);
             actualcmds = NULL;
+            stopcmdlist= 0;
             for ( line = cmdbuff; *line ; line = s )
             {
                 if ( (s=strchr(line ,'\n')))
@@ -900,6 +906,8 @@ static void commandLoop(FILE *cmdfile)
                     break;
                 }
                 *s = save_ch;
+                if ( stopcmdlist )
+                    break;
             }
         }
     }
index 3cf43b8ce2a229c51140b96c2e1624bc82c2a869..f73335a05d2676d19995baa93dccbf14e46e68b7 100644 (file)
@@ -269,4 +269,5 @@ extern char contsim;
 char *searchDirsFname (char *);
 char *getNextCmdLine(void );
 void setCmdLine( char * );
+void stopCommandList( void );
 #endif