summaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-02-17 08:36:28 +0000
committerUlrich Drepper <drepper@redhat.com>2007-02-17 08:36:28 +0000
commit07fb518573f6595548f992646a2c65e9b9770268 (patch)
tree2adf3d592e11cc121562ee92431315a0dc4c8edc /debug
parent93e66914461326e0ab3804e0e841d7ee022b5b0c (diff)
downloadglibc-07fb518573f6595548f992646a2c65e9b9770268.tar.gz
[BZ #3348]
2007-02-17 Ulrich Drepper <drepper@redhat.com> [BZ #3348] * malloc/memusage.sh: Cleanups. * debug/xtrace.sh: Quoting and trap changes. * locale/iso-3166.def: Add Jersey, Guernsey, and Isle Of Man entries.
Diffstat (limited to 'debug')
-rwxr-xr-xdebug/xtrace.sh18
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