gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: [Axiom-developer] Re: root chunks


From: Camm Maguire
Subject: [Gcl-devel] Re: [Axiom-developer] Re: root chunks
Date: 22 Jun 2007 14:39:07 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Ralf Hemmecke <address@hidden> 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                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]