Neil Jerram escreveu: >> - invoke some kind of callback that increments a counter for the >> source location >> >> - produce pretty pretty coverage graphs with the contents of the hash >> >> The last two steps are trivial, but I'm getting lost with the first >> step. >> >> I tried to follow what happens when an error backtrace is generated. >> My try is below. Unfortunately, I can't find much documentation on how >> frames/stacks/etc. interact. Can anyone gently nudge me in the right >> direction? > > Do you think you need to do this in C? (You might do, for reasonable > performance - I genuinely don't know yet.) The evaluator already has
I don't know, it was the first idea that came to mind. It doesn't have to be super-fast, 10x slower is acceptable, 100x not. > hooks (see "Evaluator trap options" in the manual) that allow you to > call out to arbitrary Scheme code at the entry and exit of every > frame. > I'll have a look. >> + source = info_frame.source; >> + file = SCM_MEMOIZEDP (source) ? scm_source_property (source, >> scm_sym_filename) : SCM_BOOL_F; >> + line = (SCM_MEMOIZEDP (source)) ? scm_source_property (source, >> scm_sym_line) : SCM_BOOL_F; > > Why SCM_MEMOIZEDP? I believe non-memoized expressions have source > properties too. I actually don't have a clue what I'm doing ; this was a bit of cut & paste from backtrace.c. > So what do you find happens with this code? I don't get line numbers, just the memoized expressions from the 2nd (display .. ) call. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel