Ok I set traceAll and had the following (i do not know how to read this)

   script : "/Users/taoufik/workspace/picolisp/project.l"
    html : 0 "Hello" "lib.css" NIL ("Hello World!")
     httpHead : NIL 0 NIL NIL
      http1 : NIL 0 NIL NIL
       httpDate : 733989 39365
        day : 733989 (Mon Tue Wed Thu Fri Sat Sun .)
        day = Sat
        pad : 2 3
        pad = "03"
        tim$ : 39365 T
         pad : 2 10
         pad = "10"
         pad : 2 56
         pad = "56"
         pad : 2 5
         pad = "05"
        tim$ = "10:56:05"
       httpDate = " GMT^M"
      http1 = NIL
      httpCookies :
      httpCookies = NIL
     httpHead = "^M"
     <tag> : title NIL (Ttl)
      tag : title NIL 2 (Ttl)
      tag = >
     <tag> = >
     baseHRef : NIL
     baseHRef = "http://localhost:8080/";
     srcUrl : "lib.css"
      baseHRef : 8080
      baseHRef = "http://localhost:8080/";
     srcUrl = "http://localhost:8080/lib.css";
     javascript : "lib/form.js"
      srcUrl : "lib/form.js"
       baseHRef : 8080
       baseHRef = "http://localhost:8080/";
      srcUrl = "http://localhost:8080/lib/form.js";
     javascript = NIL
     tag : body NIL 2 ("Hello World!")
     tag = >
8594 SIG-10


Thanks
Taoufik

On Oct 3, 2009, at 12:44 PM, Alexander Burger wrote:


Hi Taoufik,

thanks for the feedback!


I manually traced http.l (inserting prinl instruction in the http
function in http.l, and

Hmm, does this really work? During 'http', the output is redirected to
the client (via the socket to the browser), so 'prinl' usually does not
work well because it intermixes its output with the HTML code.

You could use 'msg', as this will send its output to standard error.


Or, even better, use the 'trace' function, in the extreme by simply
tracing all Lisp level functions with 'traceAll':

  ./dbg lib/http.l lib/... -traceAll -'server ...'

'traceAll' traces only functions that are defined in Lisp. I would
suggest to trace also some primary functions, perhaps 'line':

  ./dbg ...  -traceAll  -"trace 'line"  -'server ...'

This will produce a lot of output. The interesting part will be near the
end, shortly before it crashes.


taoufik-dachraouis-imac:picoLisp taoufik$ cat x.l
(* 2 3)
taoufik-dachraouis-imac:picoLisp taoufik$ picolisp
: (script "x.l")
!? (script "x.l")
script -- Undefined

This function is defined in "lib.l". Ususally it does not make much
sense to start the plain 'picolisp' executable alone. Better (as you did above) use "./dbg", which also loads the basic environment and debugging
tools.

  $ ./dbg
  : (script "x.l")
  -> 6

Cheers,
- Alex
--
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe




--
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to