diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 13:33:18 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 13:33:18 +0000 |
commit | 32c075e1f01849e161724bbd400ba77244e482cc (patch) | |
tree | 5f083a3f352104f32bb6c902d57fa3f294bd8d4d /debug | |
parent | d6220e9ee38c1c9285221b023346201ec5f511b3 (diff) | |
download | glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.gz glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.xz glibc-32c075e1f01849e161724bbd400ba77244e482cc.zip |
.
Diffstat (limited to 'debug')
-rwxr-xr-x | debug/catchsegv.sh | 5 | ||||
-rwxr-xr-x | debug/xtrace.sh | 20 |
2 files changed, 12 insertions, 13 deletions
diff --git a/debug/catchsegv.sh b/debug/catchsegv.sh index 6f47fab42a..f4d971e34b 100755 --- a/debug/catchsegv.sh +++ b/debug/catchsegv.sh @@ -1,6 +1,5 @@ #! /bin/sh -# Copyright (C) 1998,1999,2001,2003,2004,2006,2007 -# Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2001,2003,2004,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -40,7 +39,7 @@ if test $# -eq 0; then ;; --v | --ve | --ver | --vers | --versi | --versio | --version) echo 'catchsegv (GNU libc) @VERSION@' - echo 'Copyright (C) 2007 Free Software Foundation, Inc. + echo 'Copyright (C) 2006 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. Written by Ulrich Drepper.' diff --git a/debug/xtrace.sh b/debug/xtrace.sh index e8ffe2f420..c913c76d21 100755 --- a/debug/xtrace.sh +++ b/debug/xtrace.sh @@ -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. -" "2007" +" "2006" printf $"Written by %s. " "Ulrich Drepper" exit 0 @@ -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 -u ${TMPDIR:-/tmp}/xtrace.XXXXXX) + fifo=$(mktemp -ut xtrace.XXXXXX) || exit + trap 'rm -f "$fifo"; exit 1' HUP INT QUIT TERM PIPE 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 |