From patchwork Sat Jul 16 13:14:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 13818 Received: (qmail 46373 invoked by alias); 16 Jul 2016 13:14:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 46361 invoked by uid 89); 16 Jul 2016 13:14:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2016-07-16 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 16 Jul 2016 13:14:06 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73459883A0 for ; Sat, 16 Jul 2016 13:14:05 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-204-80.brq.redhat.com [10.40.204.80]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6GDE2Mi010916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 16 Jul 2016 09:14:04 -0400 Date: Sat, 16 Jul 2016 15:14:02 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB Message-ID: <20160716131402.GA2961@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) X-IsSubscribed: yes Hi, tested on Fedora 24 x86_64 after: ./configure; make That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2' OK for check-in? Jan gdb/testsuite/ChangeLog 2016-07-16 Jan Kratochvil * gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and "step into captured_main (args)". (test_with_self): Add "captured_main (args);" case. diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index af0026c..2cdd5c1 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -116,6 +116,14 @@ proc do_steps_and_nexts {} { set description "next over lim_at_start initialization" set command "next" } + -re ".*TRY.*$gdb_prompt $" { + set description "next over TRY" + set command "next" + } + -re ".*captured_main \\(args\\);.*$gdb_prompt $" { + set description "step into captured_main (args)" + set command "step" + } -re ".*count . 0x3.*$gdb_prompt $" { set description "next over conditional stack alignment code 1" set command "next" @@ -330,6 +338,13 @@ proc test_with_self { executable } { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.*$gdb_prompt $" { xfail "$description (line numbers scrambled?)" } + -re "captured_main \\(args\\);\r\n$gdb_prompt $" { + gdb_test_multiple "step" "$description" { + -re "captured_main .data.* at .*main.c:.*$gdb_prompt $" { + pass "$description" + } + } + } -re "vfork: No more processes.*$gdb_prompt $" { fail "$description (out of virtual memory)" set timeout $oldtimeout