diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-02-21 11:15:54 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-02-21 11:15:54 +0000 |
commit | b428b742cf54d423e5a7a68fcbec9473303eeafa (patch) | |
tree | a7eb4bb9273b2c48c1d4deacb5458f5075d902ef /debug | |
parent | 6c8cc2d3042d0585741452006c29cb21fbba39ea (diff) | |
download | glibc-b428b742cf54d423e5a7a68fcbec9473303eeafa.tar glibc-b428b742cf54d423e5a7a68fcbec9473303eeafa.tar.gz glibc-b428b742cf54d423e5a7a68fcbec9473303eeafa.tar.bz2 glibc-b428b742cf54d423e5a7a68fcbec9473303eeafa.zip |
Updated to fedora-glibc-20070221T1011cvs/fedora-glibc-2_5_90-18
Diffstat (limited to 'debug')
-rwxr-xr-x | debug/xtrace.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/debug/xtrace.sh b/debug/xtrace.sh index e8ffe2f420..b392d7cdd4 100755 --- a/debug/xtrace.sh +++ b/debug/xtrace.sh @@ -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 |