From b5c6276a6ea23cf92e30132b92cf14119235b257 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Oct 1999 17:16:17 +0000 Subject: Update. 1999-10-08 Ulrich Drepper * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_spent): Fix handling of empty entries. Patch by Thorsten Kukuk . 1999-10-08 Andreas Schwab * debug/xtrace.sh: Fix quoting bugs. Implement --help and --version. 1999-10-08 Andreas Schwab * debug/pcprofiledump.c: Fix typos. 1999-10-07 Andreas Jaeger * math/Makefile (tests): Added basic-tests. * math/basic-test.c: New file. Contains function basic_tests from libm-test. 1999-10-07 Andreas Schwab * malloc/memprof.sh: Fix quoting bugs. 1999-10-08 Ulrich Drepper * timezone/europe: Update from tzdata1999h. --- debug/xtrace.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'debug/xtrace.sh') diff --git a/debug/xtrace.sh b/debug/xtrace.sh index c688391ff1..241ebe8954 100755 --- a/debug/xtrace.sh +++ b/debug/xtrace.sh @@ -81,6 +81,9 @@ COLUMNS=${COLUMNS:-80} # If `TERM' is not set, set it to `xterm'. TERM=${TERM:-xterm} +# The data file to process, if any. +data= + # Process arguments. But stop as soon as the program name is found. while test $# -gt 0; do case "$1" in @@ -94,6 +97,12 @@ while test $# -gt 0; do --d=* | --da=* | --dat=* | --data=*) data=${1##*=} ;; + -? | --h | --he | --hel | --help) + do_help + ;; + --v | --ve | --ver | --vers | --versi | --versio | --version) + do_version + ;; --) # Stop processing arguments. shift @@ -133,9 +142,9 @@ fi printf "%-20s %-*s %6s\n" Function $(expr $COLUMNS - 30) File Line for i in $(seq 1 $COLUMNS); do echo -n -; done; echo if test -n "$data"; then - eval $pcprofiledump $data | + $pcprofiledump "$data" | sed 's/this = \([^,]*\).*/\1/' | - addr2line -fC -e $program | + addr2line -fC -e "$program" | while read fct; do read file if test "$fct" != '??' -a "$file" != '??:0'; then @@ -146,9 +155,9 @@ else fifo=$(mktemp -u ${TMPDIR:-/tmp}/xprof.XXXXXX) mkfifo -m 0600 $fifo || exit 1 # Now start the program and let it write to the FIFO. - eval $TERM -T "'xtrace - $program $*'" -e /bin/sh -c "'LD_PRELOAD=$pcprofileso PCPROFILE_OUTPUT=$fifo $program $*; read $fifo'" & + $TERM -T "xtrace - $program $*" -e /bin/sh -c "LD_PRELOAD=$pcprofileso PCPROFILE_OUTPUT=$fifo $program $*; read $fifo" & termpid=$! - eval $pcprofiledump $fifo | + $pcprofiledump $fifo | sed 's/this = \([^,]*\).*/\1/' | addr2line -fC -e $program | while read fct; do -- cgit v1.2.3