mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
d7c2eb1be3
on Fedora12 gdb puts out a bit of binary garbage at the front of script output when TERM=xterm, presumably trying something like a clear screen. luckily it doesn't do it for unknown terminal types Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Jan 11 06:48:56 CET 2011 on sn-devel-104
22 lines
439 B
Bash
Executable File
22 lines
439 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 @ | 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
|