Re: [Ecls-list] how to prevent ECL entering debugger when C compiler fails?
2012/1/12 Anton Vodonosov > Take into account, that right after ECL startup, > compiler:*compiler-break-enable* is NIL: > So I suppose something sets it to T during compile-file. I stand corrected. There is a function, FIX-READ-ONLY-VARIABLE-TYPE that contained a debug statement setting compiler-break-enable to T. Apart from that, I cannot see any other places where it might have been set. I will upload a fix. Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] how to prevent ECL entering debugger when C compiler fails?
15.01.2012, 03:46, "Juan Jose Garcia-Ripoll" : > I am afraid this is due to ASDF: it overrides your handlers by > inserting one that breaks when the compiler signals some error or some > warning. > I find it very annoying because it makes debugging compiler errors very very > hard. ASDF had some annoyances related to compiler warnings, but waht I experience is a different issue.I think so because I use my code to compile and load lot of libraries. Maybe on them produce compiler warnings or fail to compile at all, and my code always catches the error (even on ECL and other lisps). But sometimes ECL starts to enter debugger. What is important, it happens not always when this file is compiled, but seems to depend on what compiler did before compiling this file. I have impression something in ECL sets compiler:*compiler-break-enable* to T, which causes entering debugger. See attach for a lisp session (copy paste from console). When in debugger i chose the "try recompiling" restart, and every time the file is recompiled I again trap into the debugger. Until I set compiler:*compiler-break-enable* to NIL, After this compilation still fails, but the debugger is not entered, and my code continues as expected (i.e. handler-case catches the error) Best regards, - Anton lisp-session.txt Description: Binary data -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] how to prevent ECL entering debugger when C compiler fails?
On Sun, 15 Jan 2012 00:46:02 +0100 Juan Jose Garcia-Ripoll wrote: > I am afraid this is due to ASDF: it overrides your handlers by inserting > one that breaks when the compiler signals some error or some warning. I > find it very annoying because it makes debugging compiler errors very very > hard. I agree that this could be annoying, it sounds like something that should be configurable, if it isn't already... This rings back a memory where another ECL user I know was discussing a similar problem (I'm not sure if the cause was actually this same ASDF issue, though). -- Matt -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] how to prevent ECL entering debugger when C compiler fails?
I am afraid this is due to ASDF: it overrides your handlers by inserting one that breaks when the compiler signals some error or some warning. I find it very annoying because it makes debugging compiler errors very very hard. Juanjo 2012/1/12 Anton Vodonosov > Hello. > > I have code similar to this: > > (handler-case (quicklisp:quickload :some-library) > (serious-condition (condition) (my-error-handler)) > > When I run it on ECL and C compiler returns error from compiling .c file, > I have the following (despite the handler-case): > > Error code 2 when executing > (RUN-PROGRAM "cl" ("-I." "-IC:/Users/anton/unpacked/ecl/ecl-11.1.1/bin/" > "/EHsc" "/DGC_DLL" "/DGC_BUILD" "/nologo" "/D_CRT_SECURE_NO_DEPRECATE" > "/DNDEBUG" "/MD" "/O2" "/O2" "-w" "-c" > "C:/Users/anton/AppData/Roaming/common-lisp/cache/ecl-11.1.1-win-x86/C/Users/anton/projects/cl-test-grid/quicklisp/dists/quicklisp/software/babel-20120107-git/src/ASDF-TMP-jpn-table.c" > "-FoC:/Users/anton/AppData/Roaming/common-lisp/cache/ecl-11.1.1-win-x86/C/Users/anton/projects/cl-test-grid/quicklisp/dists/quicklisp/software/babel-20120107-git/src/ASDF-TMP-jpn-table.obj")) > > Available restarts: > > 1. (CONTINUE) Continues anyway. > 2. (ABORT) ABORT > 3. (TRY-RECOMPILING) Try recompiling jpn-table > 4. (RETRY) Retry compiling component ("babel" "src" "jpn-table"). > 5. (ACCEPT) Continue, treating compiling component ("babel" "src" > "jpn-table") a > s having been successful. > 6. (ABORT) Give up on "babel-tests" > 7. (CONTINUE) Ignore initialization errors and continue. > 8. (ABORT) Quit ECL unsafely, ignoring all existing threads. > > Top level in: #. > > ;; I can then check variable compiler:*compiler-break-enable*, its value > is T > ;; > > compiler:*compiler-break-enable* > > T > > How to prevent this situation? > > Take into account, that right after ECL startup, > compiler:*compiler-break-enable* is NIL: > So I suppose something sets it to T during compile-file. > > The problem is complicated by several facts: > - I want the code to run not only on ECL > - Even on ECL, the lisp-to-c compiler module is not always available > (depending on ECL build options) > - Even if the lisp-to-c compiler enabled during ECL build, > it is not loaded until (require 'cmp) or (compile-file ...) > > I am on this problem for some time already, and as you see found > the compiler:*compiler-break-enable* in ECL sources, but still > don't know how to solve this. > > I would appreciation help. > > Best regards, > - Anton > > > -- > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > ___ > Ecls-list mailing list > Ecls-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ecls-list > -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list