summaryrefslogtreecommitdiff
path: root/buildtools/scripts/abi_gen.sh
blob: fa708dd8e427c6649468742395f01f2323d27749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# generate a set of ABI signatures from a shared library

SHAREDLIB="$1"

GDBSCRIPT="gdb_syms.$$"

(
cat <<EOF
set height 0
set width 0
EOF
nm $SHAREDLIB | cut -c18- | egrep '^[DGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
    echo "echo $s: "
    echo p $s
done
) > $GDBSCRIPT

gdb -batch -x $GDBSCRIPT $SHAREDLIB < /dev/null
rm -f $GDBSCRIPT