Re: Line number and source file names in stack trace, part 1
> How about this:
> o introduce globals *source-info-keep* (a flag, default #f) and
> *source-info-table* (the hash table)
> o change the reader to check *source-info-keep* -- a (slight?) speed
> penalty
> o change error.stk to incorporate available information in stack dumps
>
> The hash table should pose no significant speed penalty, and by
> separating flag and table, debugging information can be kept
> selectively.
>
> Any other suggestions/ideas?
Yes this was the kind of thing I'm thinking of. Perhaps a better
approach would be that to use a hook function rather than a hash
table (a little bit like the report-error procedure). For instance,
you can have a variable register-cons (or any better name) which is
looked at when a cons built and if it is the case. If this is not #f
you can call it with the file-name and the position in file. This way
you can use a hash table, log it on file or animate something on
screen. Furthermore, everything is done in Scheme. As you said, the
time penalty would be very minimal on program which don't use it.
What do you think?
-- Erick
Received on Fri Dec 31 1999 - 17:10:13 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST