From: Lenny S. <Storys@Mediaone.net> - 2001-01-11 15:39:26
|
THANK YOU !!!! Someone else sees the bug too....!! 8^) -Lenny ----- Original Message ----- From: <BES...@st...> To: <sdc...@li...>; <san...@us...> Sent: Thursday, January 11, 2001 5:04 AM Subject: RE :[sdcc-devel]Bad Debug Line generation in Gen.c (Source Path Pb) > > Greetings all, > > Lenny Story report a problem with generation of debugging info in gen.c > This Pb leads to all source file must be in the same directory otherwise > the assembler failed on this label info. > I already post this message but nobody seems have time to commit this > changes. I can't do this because I don't have access rights on cvs tree. > > Can somebody commit this changes ?? > > > 1 - Joris van der Sande and Lenny Story report a bug about slashes in > C$pathname$ labels > in .ASM file. > I fell into this problem too, and i suggest the correction below (It > work fine for me) > > > Add this function in asm.c and asm.h > > char * BaseFileName(char * fileFullName) > { > char * p = fileFullName; > > while (*fileFullName) { > if((*fileFullName==`/`)||(*fileFullName==`\`)||(*fileFullName==`:`)) { > p = fileFullName; > p++; > } > fileFullName++; > } > return p; > } > > 1.1 In all port, file gen.c, replace : > emitcode("","C$%s$%d$%d$%d ==.", > ic->filename,... > by > emitcode("","C$%s$%d$%d$%d ==.", > BaseFileName(ic->filename),... > > Case of mcs51 port : > C:sdccsrcmcs51gen.c(2250): > BaseFileName(ic->filename),currFunc->lastLine,//OLD > ic->filename,currFunc->lastLine, > C:sdccsrcmcs51gen.c(2285): > BaseFileName(ic->filename),currFunc->lastLine,//OLD > ic->filename,currFunc->lastLine, > C:sdccsrcmcs51gen.c(7443): > BaseFileName(ic->filename),ic->lineno,//OLD ic->filename,ic->lineno, > > 1.2 Modify the line below : > C:sdccasmcs51asnoice.c(35): p2 = strrchr( p1, `\` ); > C:sdccasmcs51asnoice.c(36): if (p2 == NULL) p2 = > strrchr( p1, `/` );//NEW > > C:sdccasmcs51lklex.c(144): } while (c && ((ctype[c] != > SPACE)||(c == `:`)||(c == `\`))); file://OLD } while (c && (ctype[c] != > SPACE)); > > > 2 - In some case the compiler crash when errors occurs during > preprocessing (Ie : some missing > include file).I suggest testing the preprocessor return code. > > In Sdccmain function my_system > > ... > C:sdccsrcSDCCmain.c(1098): if (got) > C:sdccsrcSDCCmain.c(1099): i= spawnv(P_WAIT,got,cmd_argv); file://OLD > i= spawnv(P_WAIT,got,cmd_argv) == -1; > C:sdccsrcSDCCmain.c(1100): else > C:sdccsrcSDCCmain.c(1101): i= spawnvp(P_WAIT,cmd,cmd_argv); file://OLD > i= spawnvp(P_WAIT,cmd,cmd_argv) == -1; > ... > C:sdccsrcSDCCmain.c(1103): if (i) { > C:sdccsrcSDCCmain.c(1104): if (i==-1) file://NEW > C:sdccsrcSDCCmain.c(1105): perror("Cannot exec process "); > C:sdccsrcSDCCmain.c(1106)://OLD return -1; > C:sdccsrcSDCCmain.c(1107): else file://NEW > C:sdccsrcSDCCmain.c(1108): printf("Process %s return error > %d",cmd,i);//NEW > C:sdccsrcSDCCmain.c(1109): } > ... > C:sdccsrcSDCCmain.c(1111): return i;//OLD return 0; > ... > > > In Sdccmain function preProcess > ... > C:sdccsrcSDCCmain.c(1266): int cpp_err; file://NEW > ... > C:sdccsrcSDCCmain.c(1322): if (cpp_err = my_system(argv[0], argv)) > {//OLD if (my_system(argv[0], argv)) { > C:sdccsrcSDCCmain.c(1323): unlink (preOutName); > C:sdccsrcSDCCmain.c(1324): if (cpp_err == -1) file://NEW > C:sdccsrcSDCCmain.c(1325): perror("Cannot exec > Preprocessor"); > C:sdccsrcSDCCmain.c(1326): exit(1); > C:sdccsrcSDCCmain.c(1327): } > ... > > In Sdccmain function linkEdit modify this line : > C:sdccsrcSDCCmain.c(1227): if (my_system(argv[0], argv)==-1) > {//OLD if (my_system(argv[0], argv)) { > > > In Sdccmain function assemble modify this line : > C:sdccsrcSDCCmain.c(1251): if (my_system(argv[0], argv)==-1) > {//OLD if (my_system(argv[0], argv)) { > > 3 - In some case assembler return invalid error code : > In i51mch function machine modify this line : > ... > C:sdccasmcs51i51mch.c(501): if (pass == 2 && ((v1 < > -128) || (v1 > 127))) file://OLD if ((v1 < -128) || (v1 > 127)) > ... > C:sdccasmcs51i51mch.c(539): if (pass == 2 && ((v1 < > -128) || (v1 > 127))) file://OLD if ((v1 < -128) || (v1 > 127)) > ... > > 4 - Disabling DS390 PORT generate an error : > ... > C:sdccsrcport.h(188):#if !OPT_DISABLE_DS390 > C:sdccsrcport.h(189):extern PORT ds390_port; > C:sdccsrcport.h(190):#else file://NEW > C:sdccsrcport.h(191):PORT ds390_port; file://NEW > ... > > Regards > > Jerome BESSIERE > > > > > > > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-devel |