+gdb2html() {
+echo g $g
+cat $g | sed 's/&/&/g' | sed 's/</</g' | while read -r l
+do
+ #c=`echo $l | grep -i -o "at [[:alnum:]./]*:[0-9]*"`
+ #We may want to support slashes later, but we'd have to support browsing
+ #Qt source for that to be useful for LyX
+
+ c=`echo $l | grep -i -o "at [[:alnum:].]*:[0-9]*"`
+ if [ -z "$c" ]
+ then
+ echo -- "$l" | sed s/--//
+ else
+ cpp=`echo "$c" | sed 's/at //' | sed 's/:.*//g'`
+ #cpp=`basename $cpp`
+ echo cpp $cpp
+ lineno=`echo "$c" | sed 's/.*://g'`
+ echo $cpp,$lineno 1>&2
+ #if [ -e "$CPP_HTML_DIR/$cpp.html" ]
+ if true
+ then
+ #echo "$l" | sed "s/$c/<a href=$CPP_HTML_DIR_REL\/$cpp.html\#line$lineno>$c<\/a>/"
+ echo "$l" | sed "s?$c?<a href=$CPP_HTML_DIR_REL\/$cpp.html\#line$lineno>$c<\/a>?"
+ else
+ echo "$l"
+ fi
+ fi
+done | sed 's/^/<br\/>/'
+}