mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
63f4fb615d
If a .gdbinit file says "set print pretty on", the signatures are printed over several lines, and the abi_check fails. So let's ignore .gdbinit files. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Sat Feb 2 20:19:05 CET 2019 on sn-devel-144
22 lines
494 B
Bash
Executable File
22 lines
494 B
Bash
Executable File
#!/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 -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
|
|
rm -f $GDBSCRIPT
|