From: MaartenBrock Date: Thu, 9 Oct 2008 21:56:54 +0000 (+0000) Subject: * debugger/mcs51/break.c: bugfix from patch 1989966, thanks Risto Huotari X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=bd958072df68fde228b6fc89dd08c6d94cc9974b;hp=503506adabdfdde204ab0fc7daeed9f9105ca460;p=fw%2Fsdcc * debugger/mcs51/break.c: bugfix from patch 1989966, thanks Risto Huotari * debugger/mcs51/simi.c: bugfix from patch 1989972, thanks Risto Huotari * device/lib/_strcspn.c: fixed bug 2140931 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5250 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index d3362dcc..a6ca7851 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-09 Maarten Brock + + * debugger/mcs51/break.c: bugfix from patch 1989966, thanks Risto Huotari + * debugger/mcs51/simi.c: bugfix from patch 1989972, thanks Risto Huotari + * device/lib/_strcspn.c: fixed bug 2140931 + 2008-10-06 Raphael Neider * device/include/pic16/stdio.h, @@ -6,7 +12,7 @@ * device/lib/pic16/libc/stdio/strmgpsim.c, device/lib/pic16/libc/stdio/strmmssp.c, device/lib/pic16/libc/stdio/strmusart.c: cosmetic changes - + * src/pic16/pcode.c (createReachingDefinitions): avoid segfault on empty __naked functions, * (pCodeLabelDestruct, pic16_unlinkpCode, pic16_pCodeUnlink): fix diff --git a/debugger/mcs51/break.c b/debugger/mcs51/break.c index f1c07845..1cf62522 100644 --- a/debugger/mcs51/break.c +++ b/debugger/mcs51/break.c @@ -460,16 +460,16 @@ BP_CALLBACK(fexitCB) if (!func) { - fprintf(stdout,"Stack underflow\n"); + fprintf(stdout, "Stack underflow\n"); return 1; } - Dprintf(D_break, ("break: fexitCB: BP_CALLBACK entry %s %p\n",func->sym->name, p_callStack)); + Dprintf(D_break, ("break: fexitCB: BP_CALLBACK entry %s %p\n", func->sym->name, p_callStack)); /* check main function */ - if ( STACK_EMPTY(callStack) && !strcmp(func->sym->name,"main")) + if ( !strcmp(func->sym->name, "main")) { - fprintf(stdout,"Program exited with code %d.\n",simGetValue (0x82,'I',2)); + fprintf(stdout, "Program exited with code %d.\n", simGetValue (0x82,'I',2)); return 1; } return 0; diff --git a/debugger/mcs51/simi.c b/debugger/mcs51/simi.c index 31242505..59b58135 100644 --- a/debugger/mcs51/simi.c +++ b/debugger/mcs51/simi.c @@ -363,6 +363,7 @@ static int execSimulator(char **args, int nargs) exit(1); } } + return simPid; } void openSimulator (char **args, int nargs) diff --git a/device/lib/_strcspn.c b/device/lib/_strcspn.c index 0beaf752..cb056460 100644 --- a/device/lib/_strcspn.c +++ b/device/lib/_strcspn.c @@ -36,6 +36,7 @@ int strcspn ( break; else count++ ; + string++ ; } return count ;