2 # This script processes symbols output by Gallium using glibc to human-readable function names
9 # Gather all unique addresses for each binary
10 sed -nre 's|([^ ]*/[^ ]*)\(\+0x([^)]*).*|\1 \2|p' "$input"|
sort|
uniq|
while read bin addr
; do
11 if test "$lastbin" != "$bin"; then
14 echo "$bin" > "$dir/$i.addrs.bin"
16 echo "$addr" >> "$dir/$i.addrs"
19 # Construct a sed script to convert hex address to human readable form, and apply it
20 for i
in "$dir"/*.addrs
; do
22 addr2line
-p -e "$bin" -a -f < "$i"|
sed -nre 's@^0x0*([^:]*): ([^?]*)$@s|'"$bin"'(+0x\1)|\2|g@gp'
24 done|
sed -f - "$input"