X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debugger%2Fmcs51%2Fcmd.c;h=3d43bfa8f2128b346c42242df83feef7e1f0e2aa;hb=7c3d744f2e61c4400b56afc2cb8357f84fc69f70;hp=7c0b474bd9081c430dca82b20ab53f18d35ec23a;hpb=a62cfb0ac108a1237bf0a65bf33e0c1969c9ef72;p=fw%2Fsdcc 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