5 GDB=$PWD/gdb.`uname -i`
10 LIB=libobjid.so.`uname -i`
22 check test ! -e $STORAGE
27 cp -p $LIB ./libobjid.so
34 check ulimit -c unlimited
35 [ -f Makefile ] && check make libobjid.so $TEST
39 # Move to an empty directory to better test by losing any absolute references.
44 STORAGE2=$STORAGE/`hostname -s`
46 libs="$(ldd $DIR/$TEST $DIR/libobjid.so | sed -n 's/^\t\(.* => \)\?\([^ ]*\).*$/\2/p' | sort -u)"
47 for obj in $DIR/$TEST $DIR/libobjid.so $libs
52 ln -s $link $STORAGE2/`basename $obj`
53 obj=`dirname $obj`/$link
55 check cp -p $obj $STORAGE2/`basename $obj`
56 # It may not be present.
57 cp -p /usr/lib/debug/$obj.debug $STORAGE2/`basename $obj`.debug
60 # Provide relative pathname to lose the reference to the original.
61 check ln -s $DIR/libobjid.so
62 check ln -s $DIR/$TEST
63 LD_PRELOAD=./libobjid.so ./$TEST &
71 strace -s200 -o x -q $GDB --objectdirectory=$STORAGE2 --core=$CORE