From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20154 invoked by alias); 27 Aug 2004 17:55:12 -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 20147 invoked from network); 27 Aug 2004 17:55:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 27 Aug 2004 17:55:11 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7RHtAS0024471 for ; Fri, 27 Aug 2004 13:55:11 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7RHt9715938; Fri, 27 Aug 2004 13:55:09 -0400 Received: from redhat.com (dhcp-172-16-25-160.sfbay.redhat.com [172.16.25.160]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i7RHswV31867; Fri, 27 Aug 2004 10:55:09 -0700 Message-ID: <412F7572.2070704@redhat.com> Date: Fri, 27 Aug 2004 17:55:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040301 MIME-Version: 1.0 To: Manoj Iyer CC: gdb-patches@sources.redhat.com Subject: Re: New thread testcase (resubmit) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00753.txt.bz2 Manoj Iyer wrote: > I have attached two modified versions of my new thread testcase. > > - version 1 > incorporates Michael Chastain's suggestions and it includes > the step and backtrace tests from the thread fucntion. > > -version 2 > incorporates Michael Snyder suggestion to remove the step and backtrace > tests from the testcase. > > Please let me know which one you like and any other comments or changes. > ChangeLog is pasted at the begning of the patch. Version 2 is OK as is, if you're tired of messing with it. You didn't have to remove the backtrace, though, if you'd like to keep that. Also, > +# > +# > +# continue to tf() breakpoint #2 > +# > +gdb_test_multiple "continue\n" "continue to thread fucntion breakpoint #2" { > + -re ".*Breakpoint 2.*tf.* at .*tbug.* .*\r\n.*$gdb_prompt $" { > + pass "continue to tf"; > + } > + -re ".*$gdb_prompt $" { > + fail "continue to tf"; > + return 1; > + } > +} I think this could be simplified to: gdb_test "continue" \ "Breakpoint 2.*tf.* at .*tbug.*" \ "continue to tf" Similarly, your backtrace test could be as simple as: gdb_test "backtrace" \ "#0 .*tf .*at .*tbug.*" \ "backtrace from thread function" I don't think you can predict what will be on any higher frames, but you could test the current frame and make sure backtrace didn't just die or show you the wrong thread. > + > + > +# > +# delete all breakpoints > +# > +send_gdb "delete\n" > +gdb_expect { > + -re "Delete all breakpoint.*$gdb_prompt $" { > + send_gdb "y\n" For this, all you need is the existing procedure call: delete_breakpoints