From patchwork Fri Sep 18 19:04:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 8793 Received: (qmail 32010 invoked by alias); 18 Sep 2015 19:05:17 -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 31999 invoked by uid 89); 18 Sep 2015 19:05:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Sep 2015 19:05:15 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Zd0y8-00076p-17 from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Fri, 18 Sep 2015 12:05:12 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Sep 2015 12:05:11 -0700 Message-ID: <55FC6036.7090302@codesourcery.com> Date: Fri, 18 Sep 2015 13:04:22 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gdb-patches Subject: [committed, testsuite] Fix pathname prefix and timeout issues in gdb.mi/mi-pending.exp This patch fixes another problem with hard-wired pathname prefixes that are inappropriate for remote-host testing. This time it's in the command used to set the pending breakpoint in gdb.mi/mi-pending.exp. It was setting the breakpoint using the pathname to the source file on the host where the .exp file is running, which may not be correct on the remote host. The net result is that it was failing ever to set or stop at the breakpoint in its intended location. Using the bare basename of the file, without a directory prefix, seems to work fine for both the local and remote testing scenarios. Also, for some reason the continue-to-breakpoint test had a hard-wired timeout of 5 seconds. This was tripping for the slow-ish remote target I've been testing on, and I don't see any purpose in overriding the target board's default timeout, so I've removed that. I think both of these fixes qualify as obvious, so I've committed this patch. -Sandra diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index 88c6870..5426db5 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -64,8 +64,8 @@ mi_gdb_test "-break-insert -f pendfunc1" \ "MI pending breakpoint on pendfunc1" # Set pending breakpoint with a condition via MI. -mi_gdb_test "-break-insert -f -c x==4 ${libsrc1}:pendfunc2" \ - ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",pending=\"${libsrc1}:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libsrc1}:pendfunc2\"\}"\ +mi_gdb_test "-break-insert -f -c x==4 ${libfile1}.c:pendfunc2" \ + ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",pending=\"${libfile1}.c:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libfile1}.c:pendfunc2\"\}"\ "MI pending breakpoint on ${libfile1}.c:pendfunc2 if x==4" # Set breakpoint so that we can stop when the thread is created @@ -112,7 +112,7 @@ mi_send_resuming_command "exec-continue" "continuing execution to thread conditi # Check if we stopped in thread 2 like we should. set testname "Run till MI pending breakpoint on pendfunc3 on thread 2" -gdb_expect 5 { +gdb_expect { -re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" { pass $testname return 0