diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-17 12:36:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-17 12:36:43 +0000 |
commit | 07435eb48c6acb0313a8957257af4771e9e55030 (patch) | |
tree | 18150741adde33705ec19becfb988a8053cf9ca0 /debug/catchsegv.sh | |
parent | af553418323e7afc30e5e1333d1a82592cd3888b (diff) | |
download | glibc-07435eb48c6acb0313a8957257af4771e9e55030.tar glibc-07435eb48c6acb0313a8957257af4771e9e55030.tar.gz glibc-07435eb48c6acb0313a8957257af4771e9e55030.tar.bz2 glibc-07435eb48c6acb0313a8957257af4771e9e55030.zip |
Update.
1998-07-17 Ulrich Drepper <drepper@cygnus.com>
* debug/catchsegv.sh: Fix several stupid bugs.
* shlib-versions: Define version for libSegFault.
* debug/Makefile: Replace shared lib version number while rewriting.
1998-07-17 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/mach/hurd/dl-sysdep.c (__mmap): Add sanity check.
Suggested by Roland McGrath.
1998-07-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* timezone/Makefile: Remove '-L (leapseconds)' for testdata
generation to control environment.
1998-07-17 09:21 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h: Define SIG_HOLD.
Patch by John Tobey <jtobey@banta-im.com>.
* manual/llio.texi: Document readv/writev and mmap functions.
Patch by Michael Deutschmann <michael@talamasca.wkpowerlink.com>.
1998-07-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/Makefile (texis): Depend on texis.awk.
(nonexamples): Filter out add-on chapters.
(chapters.% top-menu.%): Depend on libc-texinfo.sh.
(stamp-summary): Depend on $(texis) except summary.texi.
($(inst_infodir)/libc.info): Simplify command.
* manual/libc-texinfo.sh: Cleaned up to use less temporary files.
Fix the generation of the detailed node listing to make it
complete again.
* manual/math.texi: Fix signature of lgamma_r.
Diffstat (limited to 'debug/catchsegv.sh')
-rwxr-xr-x | debug/catchsegv.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/debug/catchsegv.sh b/debug/catchsegv.sh index 765242ecf8..26407a7ae6 100755 --- a/debug/catchsegv.sh +++ b/debug/catchsegv.sh @@ -24,7 +24,7 @@ shift args="$*" if test $# -eq 0; then - case "$args" in + case "$prog" in --h | --he | --hel | --help) echo 'Usage: catchsegv PROGRAM ARGS...' echo ' --help print this help, then exit' @@ -45,18 +45,18 @@ Written by Ulrich Drepper.' esac fi -LD_PRELOAD="${LD_PRELOAD:+${LD_PRELOAD}:}@SLIB@/libSegFault.so" +LD_PRELOAD="${LD_PRELOAD:+${LD_PRELOAD}:}@SLIB@/libSegFault.so@SOVER@" export LD_PRELOAD SEGFAULT_USE_ALTSTACK=1 export SEGFAULT_USE_ALTSTACK -SEGFAULT_OUTPUT_NAME="$prog.segv.$$" +SEGFAULT_OUTPUT_NAME="${TMPDIR:-/tmp}/`basename $prog`.segv.$$" export SEGFAULT_OUTPUT_NAME $prog $args exval=$? unset LD_PRELOAD -# Check for an segmentation fault. +# Check for an segmentation error. if test $exval -eq 139; then # We caught a segmentation error. The output is in the file with the # name we have in SEGFAULT_OUTPUT_NAME. In the output the names of @@ -66,10 +66,10 @@ if test $exval -eq 139; then read line; echo "$line" while read line; do case "$line" in - [*) addr="`echo $line | sed 's/^[\(.*\)]$/\1/'`" - complete="`addr2line -f -e $prog $addr 2>/dev/null|`" - if $? -eq 0; then - echo "`echo $complete|sed 'N;s/\(.*\)\n\(.*\)/\2(\1)/;'`$line" + [*) addr="`echo $line | sed 's/^\[\(.*\)\]$/\1/'`" + complete="`addr2line -f -e $prog $addr 2>/dev/null`" + if test $? -eq 0; then + echo "`echo $complete|sed 's/\(.*\) \(.*\)/\2(\1)/;'`$line" else echo "$line" fi |