]> Zhao Yanbai Git Server - minix.git/commitdiff
retire unstack & datasizes in favour of addr2line 11/2811/1
authorBen Gras <ben@minix3.org>
Wed, 3 Sep 2014 16:40:27 +0000 (18:40 +0200)
committerBen Gras <ben@minix3.org>
Wed, 3 Sep 2014 17:14:13 +0000 (19:14 +0200)
Change-Id: Ibf5db75f3358c3c0bf81ca211a6602b333af0473

distrib/sets/lists/minix/mi
minix/commands/Makefile
minix/commands/unstack/Makefile [deleted file]
minix/commands/unstack/unstack.sh [deleted file]

index 87499e15c8cdd8c969c07a18c9463250595cfbf2..0becfe4024638460576dd5ee0f1b42384c64692a 100644 (file)
 ./usr/bin/csplit                       minix-sys
 ./usr/bin/ctags                                minix-sys
 ./usr/bin/cut                          minix-sys
-./usr/bin/datasizes                    minix-sys
+./usr/bin/datasizes                    minix-sys       obsolete
 ./usr/bin/dd                           minix-sys
 ./usr/bin/decomp16                     minix-sys
 ./usr/bin/del_route                    minix-sys
 ./usr/bin/uniq                         minix-sys
 ./usr/bin/units                                minix-sys
 ./usr/bin/unlzma                       minix-sys
-./usr/bin/unstack                      minix-sys
+./usr/bin/unstack                      minix-sys       obsolete
 ./usr/bin/unvis                                minix-sys
 ./usr/bin/unxz                         minix-sys
 ./usr/bin/unzip                                minix-sys
index 00bb9d82a0e97ead10f3672e156e927fb1235693..94fe739a379989108e46ed7a1868a956abade7c8 100644 (file)
@@ -28,7 +28,7 @@ SUBDIR=       add_route arp at backup btrace \
        syslogd tcpd tcpdp tcpstat telnet \
        telnetd term termcap tget time \
        truncate udpstat umount \
-       unstack update uud uue version vol \
+       update uud uue version vol \
        writeisofs fetch \
        zdump zmodem pkgin_cd pkgin_all pkgin_sets \
        worldstone updateboot update_bootcfg \
diff --git a/minix/commands/unstack/Makefile b/minix/commands/unstack/Makefile
deleted file mode 100644 (file)
index 9527eb3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPTS= unstack.sh
-MAN=
-
-LINKS+=$(BINDIR)/unstack $(BINDIR)/datasizes
-
-.include <bsd.prog.mk>
diff --git a/minix/commands/unstack/unstack.sh b/minix/commands/unstack/unstack.sh
deleted file mode 100644 (file)
index 0af45c9..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-# Look at /usr/pkg/bin first in case there is an old nm in /usr/bin
-PATH=/usr/pkg/bin:$PATH:/usr/gnu/bin
-
-# Does procfs give us some extra 'symbols'?
-IPCVECS=/proc/ipcvecs
-if [ -f $IPCVECS ]
-then   EXTRANM="cat $IPCVECS"
-fi
-
-# Check usage
-if [ $# -lt 1 ]
-then   echo "Usage: unstack <executable> [0x... [0x... ] ]"
-       exit 1
-fi
-
-# Check invocation mode
-case "`basename $0`" in
-       datasizes)
-               echo "datasizes is obsolete; please use nm --size-sort instead."
-               exit 1
-               ;;
-       unstack)
-               mode=stack
-               ;;
-       *)
-               echo "Invoked as $0?"
-               exit 1
-               ;;
-esac
-
-# Get executable name
-executable=$1
-shift
-
-if ! which gawk >/dev/null 2>&1
-then   echo "Please install gawk."
-       exit 1
-fi
-
-# Invoke binutils nm or ack nm?
-if file $executable | grep ELF >/dev/null 2>&1
-then   NM="nm"
-else   NM="acknm"
-fi
-
-SYMLIST=/tmp/unstack.$$
-
-# store sorted, filtered nm output once
-(
-$NM $executable | sed 's/^/0x/'
-$EXTRANM | sed 's/^/0x/'
-
-# Add shared libraries
-ldd -f"%p %x\n" $executable 2>/dev/null | while read lib addr
-do     echo >&2 "Adding $lib at $addr"
-       nm -n $lib | sed 's/^/0x/' | grep ' [Tt] ' | \
-gawk -v liboffset=$addr -v libname=$lib --non-decimal-data '{ printf "0x%lx %s %s[%s]\n", $1+liboffset, $2, $3, libname }'
-done
-) | sort -x | grep ' [Tt] [^.]' >$SYMLIST
-
-while [ $# -gt 0 ]
-do      gawk <$SYMLIST --non-decimal-data -v symoffset=$1 '
-         {  if($1 > symoffset) { printf "%s+0x%x\n", name, symoffset-prevoffset; exit }
-            name=$3; prevoffset=$1;
-         }'
-       shift
-done
-
-rm -f $SYMLIST
-
-exit 1
-