c2e4941367
Some Unix systems (GuixSD, NixOS) do not install programs like Bash and Python to /usr/bin, and /usr/bin/env has to be used to locate these instead. Change-Id: I7546bcb881c532adc984577ecb0ee2ec4f2efe00 Signed-off-by: Yegor Timoshenko <yegortimoshenko@riseup.net> Reviewed-on: https://review.coreboot.org/28953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
20 lines
552 B
Bash
Executable file
20 lines
552 B
Bash
Executable file
#!/usr/bin/env 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}'`
|
|
addr2line -e ../../build/cbfs/fallback/ramstage.debug "$FROM" | tr -d "\n"
|
|
echo -n " calls "
|
|
addr2line -e ../../build/cbfs/fallback/ramstage.debug "$TO"
|
|
else
|
|
echo "$line"
|
|
fi
|
|
|
|
done
|