From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5178 invoked by alias); 18 Sep 2003 20:20:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5170 invoked from network); 18 Sep 2003 20:20:27 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 18 Sep 2003 20:20:27 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.12.9/8.12.9) with ESMTP id h8IKKPiZ026863 for ; Thu, 18 Sep 2003 13:20:25 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Thu, 18 Sep 2003 13:19:59 -0700 Received: from [17.201.22.240] (inghji.apple.com [17.201.22.240]) by scv2.apple.com (8.12.9/8.12.9) with ESMTP id h8IKKHWI018422; Thu, 18 Sep 2003 13:20:17 -0700 (PDT) In-Reply-To: <16234.3108.137932.914275@localhost.redhat.com> References: <1DEB1AE2-E560-11D7-9C6D-00039379E320@apple.com> <16234.3108.137932.914275@localhost.redhat.com> Mime-Version: 1.0 (Apple Message framework v604) Content-Type: multipart/mixed; boundary=Apple-Mail-3--290118716 Message-Id: <8A9F7532-EA15-11D7-A429-00039379E320@apple.com> Cc: gdb-patches@sources.redhat.com From: Jim Ingham Subject: Re: Trivial fix to annota1.exp Date: Thu, 18 Sep 2003 20:20:00 -0000 To: Elena Zannoni X-SW-Source: 2003-09/txt/msg00401.txt.bz2 --Apple-Mail-3--290118716 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 101 By proper you mean not line-wrapped by Mail.app? If so, I would be overjoyed to try an attachment: --Apple-Mail-3--290118716 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="annota1.exp.diff" Content-Disposition: attachment; filename=annota1.exp.diff Content-length: 1254 Index: annota1.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v retrieving revision 1.12 diff -p -r1.12 annota1.exp *** annota1.exp 9 Jul 2003 13:19:08 -0000 1.12 --- annota1.exp 18 Sep 2003 20:14:44 -0000 *************** match_max 3000 *** 296,302 **** verbose "match_max now is: [match_max]" send_gdb "backtrace\n" gdb_expect { ! -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" { pass "backtrace @ signal handler" } -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" } --- 296,302 ---- verbose "match_max now is: [match_max]" send_gdb "backtrace\n" gdb_expect { ! -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" { pass "backtrace @ signal handler" } -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" } --Apple-Mail-3--290118716 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 1923 If this doesn't make it, I would be slightly depressed to point out that the change is 1 character, the "*" after "signal handler called.\rnrnrnr)" to a "+". Jim On Sep 18, 2003, at 12:48 PM, Elena Zannoni wrote: > Jim Ingham writes: >> I think that the backtrace through a signal handler test in >> annota1.exp >> is wrong. It uses a "*" in the regexp for the part that is looking >> for >> the signal handler frame. Because of that, all the test really does >> is >> count the number of frames, and require they be three or more frames. >> It doesn't check that a signal frame is on the stack at all. >> >> I think you really need a "+" instead, or I don't understand the point >> of the test. >> >> Is this okay, it still passes on Linux... >> > > I think you are right. I don't think there is any case where we want > to pass matching 0 occurrences of that pattern. Would you like to > submit a proper patch? > > elena > > >> Index: annota1.exp >> =================================================================== >> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v >> retrieving revision 1.12 >> diff -r1.12 annota1.exp >> 299c299 >> < -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 >> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler >> called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2 >> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" { >> --- >>> -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 >> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler >> called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 >> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" { >> >> Jim >> -- >> Jim Ingham jingham@apple.com >> Developer Tools >> Apple Computer >> -- Jim Ingham jingham@apple.com Developer Tools Apple Computer --Apple-Mail-3--290118716--