From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Nick Clifton , Richard Earnshaw Cc: GDB Patches , SID Discussion Subject: dejagnu hang from target.exp (prune_warnings) Date: Thu, 18 Jan 2001 23:50:00 -0000 Message-id: <3A67F120.30D17FF6@cygnus.com> X-SW-Source: 2001-q1/msg00062.html The change: < 2001-01-12 Richard Earnshaw < < * target.exp (prune_warnings): Prune warnings from NetBSD linker. < checked in by NickC causes dejagnu to hang (or to at least take a very very very very very long walk) when the compiler generates lots of output. Looking at the patch: - # Or the NetBSD ones. - regsub -all "(^|\n)(.*:\[0-9\]+: warning: \[^\n\]* possibly used unsafely, use \[^\n\]*\n?)" $text "\\1" text - regsub -all "(^|\n)(.*: warning: reference to compatibility glob\[^\n\]*\n?)" $text "\\1" text that leading ``.*'' is just too generous :-( The attatched stops the problem for me. Can someone please confirm this doesn't break on NetBSD. enjoy, Andrew Fri Jan 19 18:37:19 2001 Andrew Cagney * lib/target.exp (prune_warnings): Avoid ``.*'' in NetBSD warnings pattern. Index: lib/target.exp =================================================================== RCS file: /cvs/src/src/dejagnu/lib/target.exp,v retrieving revision 1.7 diff -p -r1.7 target.exp *** target.exp 2001/01/12 18:13:40 1.7 --- target.exp 2001/01/19 07:39:47 *************** proc prune_warnings { text } { *** 262,269 **** regsub -all "(^|\n)(ld(|32|64): Giving up.*Use -wall\[^\n\]*\n?)+" $text "\\1" text # Or the NetBSD ones. ! regsub -all "(^|\n)(.*:\[0-9\]+: warning: \[^\n\]* possibly used unsafely, use \[^\n\]*\n?)" $text "\\1" text ! regsub -all "(^|\n)(.*: warning: reference to compatibility glob\[^\n\]*\n?)" $text "\\1" text # GNU ld warns about functions marked as dangerous in GNU libc. regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*function is dangerous\[^\n\]*" $text "" text --- 262,269 ---- regsub -all "(^|\n)(ld(|32|64): Giving up.*Use -wall\[^\n\]*\n?)+" $text "\\1" text # Or the NetBSD ones. ! regsub -all "(^|\n)(\[^\n\]*:\[0-9\]+: warning: \[^\n\]* possibly used unsafely, use \[^\n\]*\n?)" $text "\\1" text ! regsub -all "(^|\n)(\[^\n\]*: warning: reference to compatibility glob\[^\n\]*\n?)" $text "\\1" text # GNU ld warns about functions marked as dangerous in GNU libc. regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*function is dangerous\[^\n\]*" $text "" text