Greetings! Ralf Hemmecke <[EMAIL PROTECTED]> writes:
> >> #line 56 "myalps/prtype.as.nw" > > > Yes, that is the best case. However, I don't know that there is a > > general way to have the Lisp compiler preserve that information in > > useful form in the binary. We can preserve it when we translate to > > Lisp (or C or whatever - regardless of language) but when that final > > file is compiled by a compiler we didn't write I'm not sure how to > > make it preserve the information for the debugger. I'm even less > > sure how to do this portably - we might be able to talk to the GCL > > and SBCL devs, I guess. > > I am pretty sure that someone can confirm that gcc has an option that > compiles the #line information into the executable. I am not so sure > about gcl. Camm? > Here is one idea: COMPILER>(defun c1clines (args) (list 'clines (make-info :type nil) (with-output-to-string (s) (princ (car args) s)))) (defun c2clines (clines) (wt-nl clines)) (si::putprop 'clines 'c1clines 'c1) (si::putprop 'clines 'c2clines 'c2) C1CLINES COMPILER> C2CLINES COMPILER> C1CLINES COMPILER> C2CLINES COMPILER>(disassemble '(lambda nil (clines "#line __LINE__") (+ 1 1)) nil) ;; Compiling /tmp/gazonk_13883_1.lsp. 1> (C1CLINES ("#line __LINE__")) <1 (C1CLINES (CLINES #S(INFO TYPE NIL SP-CHANGE 0 VOLATILE 0 UNUSED 0 UNUSED1 0 CHANGED-ARRAY #() REFERRED-ARRAY #()) "#line __LINE__")) ;; End of Pass 1. ;; End of Pass 2. ;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, (Debug quality ignored) ;; Finished compiling /tmp/gazonk_13883_1.o. #include "gazonk_13883_1.h" void init_code(){do_init((void *)VV);} /* local entry for function CMP-ANON */ static fixnum LI1() { VMB1 VMS1 VMV1 goto TTL; TTL:; #line __LINE__ {fixnum V1 = (fixnum)2;VMR1 (V1);} } Take care, -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gcl-devel