File: abi_gen.sh

package info (click to toggle)
ntdb 1.0-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,080 kB
  • ctags: 5,053
  • sloc: ansic: 32,598; python: 20,283; xml: 575; sh: 168; makefile: 151
file content (21 lines) | stat: -rwxr-xr-x 491 bytes parent folder | download | duplicates (31)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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 -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | egrep -v ' (__bss_start|_edata|_init|_fini|_end)' | cut -c3- | sort | while read s; do
    echo "echo $s: "
    echo p $s
done
) > $GDBSCRIPT

# forcing the terminal avoids a problem on Fedora12
TERM=none gdb -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
rm -f $GDBSCRIPT