Shawn,

> I've found myself playing around in eval.l and introducing segfaults it's a 
> little slow to figure out where I went wrong.

The current version of emit.l encodes the file name and line number of the 
source structure being generated in every temporary label.  Also if you 
uncomment the two lines in method 'gen <pair>' then an additional temp symbol 
will be emitted for every change of source line number.  Debugger backtraces 
will then tell you what the program was doing to the nearest source line.

But, for what it's worth, here is the one I used to use before labels encoded 
source positions.  It assumes the source for your evaluator is in 'test.s' and 
the executable is in 'test'.

Regards,
Ian

#!/bin/sh

awk '
/__L__.*:/      {label=$0; next}
/## defn /      {fn=$0; next}
/## frame /     {next}
/## /           {print label, $2, $3, fn}
' < test.s >/tmp/test.map

echo "break exit
r $*
bt
" | gdb ./test | tee mkbacktrace.log | fgrep 'in __L__' | awk '{print $4}' |
while read i; do
    fgrep "$i:" /tmp/test.map
done

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to