[Ecls-list] function names in backtrace

Anton Vodonosov avodonosov at yandex.ru
Thu Dec 11 21:41:02 UTC 2008


on Wednesday, December 10, 2008, 6:30:33 PM Juan wrote:

> On Tue, Dec 9, 2008 at 12:52 AM, Anton Vodonosov <avodonosov at yandex.ru> wrote:
>> Well, I've read a little of ECL internals in the new manual
>> and some sources and understand that for compiled functions
>> to appear on the backtrace, ECL compiler must insert
>> call to ihs_push into the generated C code.

> Sorry, this only worked when the optimization qualities were
> proclaimed, due to a bug in the code that parsed optimization
> declarations at the beginning of functions. I have fixed this and with
> the same example as in your email I now get the proper backtraces

Great, thanks. It looks like you yourself do not use these features.
I also remember that you do not use SLIME. What is your development
technique? How do you find errors?

P.S.

Using your commit as a starting point for search, I found a way to
override optimization settings in all the libraries, and compile
everything with DEBUG 3 level.

I post it here so other people may find it.

;; load compiler module if it isn't loaded yet
(require 'cmp)

;; remember original function called by compiler
;; to determine optimization settings of code
;; being compiled
(setf original-optimization-quality 
      #'c::search-optimization-quality)

;; provide our own function that ignores optimization
;; settings of the code being compiled and always
;; returns DEBUG 3 level
(defun my-optimization-quality (declarations what)
  (case what
    (debug 3)
    (speed 0) 
    (safety 0) 
    (space 0)
    (otherwise (c::default-optimization what))))

(setf (symbol-function 'c::search-optimization-quality)
      #'my-optimization-quality)

;; compile hunchentoot and dependencies;
(asdf:operate 'asdf:load-op :hunchentoot-test)

;; restore original function if you want
(setf (symbol-function 'c::search-optimization-quality)
      original-optimization-quality)

Best regards,
- Anton






More information about the ecl-devel mailing list