about summary refs log tree commit diff
path: root/debug/xtrace.sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /debug/xtrace.sh
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'debug/xtrace.sh')
-rwxr-xr-xdebug/xtrace.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/debug/xtrace.sh b/debug/xtrace.sh
index c913c76d21..4ce8888490 100755
--- a/debug/xtrace.sh
+++ b/debug/xtrace.sh
@@ -1,5 +1,5 @@
 #! @BASH@
-# Copyright (C) 1999, 2001-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.
 
@@ -18,8 +18,8 @@
 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # 02111-1307 USA.
 
-pcprofileso='@SLIBDIR@/libpcprofile.so'
-pcprofiledump='@BINDIR@/pcprofiledump'
+pcprofileso=@SLIBDIR@/libpcprofile.so
+pcprofiledump=@BINDIR@/pcprofiledump
 TEXTDOMAIN=libc
 
 # Print usage message.
@@ -64,7 +64,7 @@ do_version() {
   printf $"Copyright (C) %s Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-" "2006"
+" "2004"
   printf $"Written by %s.
 " "Ulrich Drepper"
   exit 0
@@ -107,7 +107,7 @@ while test $# -gt 0; do
   --d=* | --da=* | --dat=* | --data=*)
     data=${1##*=}
     ;;
-  -\? | --h | --he | --hel | --help)
+  -? | --h | --he | --hel | --help)
     do_help
     ;;
   -V | --v | --ve | --ver | --vers | --versi | --versio | --version)
@@ -161,32 +161,32 @@ if test -n "$data"; then
   while read fct; do
     read file
     if test "$fct" != '??' -a "$file" != '??:0'; then
-      format_line "$fct" "$file"
+      format_line $fct $file
     fi
   done
 else
-  fifo=$(mktemp -ut xtrace.XXXXXX) || exit
-  trap 'rm -f "$fifo"; exit 1' HUP INT QUIT TERM PIPE
+  fifo=$(mktemp -u ${TMPDIR:-/tmp}/xtrace.XXXXXX)
   mkfifo -m 0600 $fifo || exit 1
+  trap 'rm $fifo; exit 1' SIGINT SIGTERM SIGPIPE
 
   # Now start the program and let it write to the FIFO.
   $TERMINAL_PROG -T "xtrace - $program $*" -e /bin/sh -c "LD_PRELOAD=$pcprofileso PCPROFILE_OUTPUT=$fifo $program $*; read < $fifo" &
   termpid=$!
-  $pcprofiledump -u "$fifo" |
+  $pcprofiledump -u $fifo |
   while read line; do
-     echo "$line" |
+     echo $line |
      sed 's/this = \([^,]*\).*/\1/' |
-     addr2line -fC -e "$program"
+     addr2line -fC -e $program
   done |
   while read fct; do
     read file
     if test "$fct" != '??' -a "$file" != '??:0'; then
-      format_line "$fct" "$file"
+      format_line $fct $file
     fi
   done
   read -p "Press return here to close $TERMINAL_PROG($program)."
-  echo > "$fifo"
-  rm "$fifo"
+  echo > $fifo
+  rm $fifo
 fi
 
 exit 0