2011-09-02 23:34:15 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#Parse a log and get back the function names and line numbers
|
|
|
|
#Provide a log file as first argument
|
|
|
|
|
|
|
|
#Please rewrite to something more saner !
|
|
|
|
|
|
|
|
cat $1 | while read line ; do
|
|
|
|
A=`echo $line | cut -c 1`
|
|
|
|
|
|
|
|
if [ "$A" = '~' ] ; then
|
|
|
|
FROM=`echo $line | tr \~ \( | tr \) \( | awk -F\( '{print $3}'`
|
|
|
|
TO=`echo $line | tr \~ \( | tr \) \(|awk -F\( '{print $2}'`
|
2012-09-11 15:07:14 +02:00
|
|
|
addr2line -e ../../build/cbfs/fallback/coreboot_ram.debug "$FROM" | tr -d "\n"
|
2011-09-02 23:34:15 +02:00
|
|
|
echo -n " calls "
|
2012-09-11 15:07:14 +02:00
|
|
|
addr2line -e ../../build/cbfs/fallback/coreboot_ram.debug "$TO"
|
2011-09-02 23:34:15 +02:00
|
|
|
else
|
|
|
|
echo "$line"
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|