diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-10-08 17:16:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-10-08 17:16:17 +0000 |
commit | b5c6276a6ea23cf92e30132b92cf14119235b257 (patch) | |
tree | 546237363815c2c2fd8e2516dd89169b91c5c1c9 /debug/xtrace.sh | |
parent | 9640bbe1c1fab7e1373e59160889b1fbc0bd000c (diff) | |
download | glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.gz glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.xz glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.zip |
Update.
1999-10-08 Ulrich Drepper <drepper@cygnus.com> * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_spent): Fix handling of empty entries. Patch by Thorsten Kukuk <kukuk@suse.de>. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/xtrace.sh: Fix quoting bugs. Implement --help and --version. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/pcprofiledump.c: Fix typos. 1999-10-07 Andreas Jaeger <aj@suse.de> * math/Makefile (tests): Added basic-tests. * math/basic-test.c: New file. Contains function basic_tests from libm-test. 1999-10-07 Andreas Schwab <schwab@suse.de> * malloc/memprof.sh: Fix quoting bugs. 1999-10-08 Ulrich Drepper <drepper@cygnus.com> * timezone/europe: Update from tzdata1999h.
Diffstat (limited to 'debug/xtrace.sh')
-rwxr-xr-x | debug/xtrace.sh | 17 |
1 files changed, 13 insertions, 4 deletions
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 |