From: kbongers Date: Sun, 12 Aug 2001 17:41:26 +0000 (+0000) Subject: was stopping on every entry/exit point X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7c3d744f2e61c4400b56afc2cb8357f84fc69f70;p=fw%2Fsdcc was stopping on every entry/exit point git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1137 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/debugger/mcs51/cmd.c b/debugger/mcs51/cmd.c index 7c0b474b..3d43bfa8 100644 --- a/debugger/mcs51/cmd.c +++ b/debugger/mcs51/cmd.c @@ -576,6 +576,8 @@ void simGo (unsigned int gaddr) unsigned int addr ; context *ctxt; int rv; + static int initial_break_flag = 0; + top: addr = simGoTillBp (gaddr); @@ -594,7 +596,14 @@ void simGo (unsigned int gaddr) if not then we continue with the execution of the program */ if (!rv) { - fprintf(stdout, "Stopping at non-user breakpoint\n"); + if (!initial_break_flag) { + initial_break_flag = 1; // kludge to stop only at first run + fprintf(stdout, "Stopping at entry. You can now list and set breakpoints\n"); + } + else { + gaddr = -1; + goto top ; + } // notes: kpb // I took this out, after running "run" it would just keep re-running