From patchwork Fri Jun 6 12:43:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 1350 Received: (qmail 4045 invoked by alias); 6 Jun 2014 12:46:14 -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 4032 invoked by uid 89); 6 Jun 2014 12:46:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 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, 06 Jun 2014 12:46:12 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WstX7-0000nv-Dq from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 06 Jun 2014 05:46:09 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 6 Jun 2014 05:46:09 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Fri, 6 Jun 2014 05:46:08 -0700 From: Yao Qi To: Subject: [PATCH] Restrict the pattern in gdb.base/jit.exp Date: Fri, 6 Jun 2014 20:43:59 +0800 Message-ID: <1402058639-21563-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes I see the following fail in some thumb multi-lib in arm-none-linux-gnueabi, info function jit_function^M All functions matching regular expression "jit_function":^M ^M Non-debugging symbols:^M 0x00000790 __real_jit_function_XXXX^M 0x0000079c __jit_function_XXXX_from_arm^M 0x0000079c jit_function_0000^M 0x00000790 __real_jit_function_XXXX^M 0x0000079c __jit_function_XXXX_from_arm^M 0x0000079c jit_function_0001^M (gdb) FAIL: gdb.base/jit.exp: one_jit_test-2: info function jit_function the test expects to see only jit_function_0000 and jit_function_0001 one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" Symbols with the prefix "__real_" or suffix "_from_arm" is generated by gcc/ld for arm/thumb interworking. This patch is to restrict the pattern from "jit_function" to "^jit_function", the output becomes expected. gdb/testsuite: 2014-06-06 Yao Qi * gdb.base/jit.exp (one_jit_test): Restrict the pattern from "jit_function" to "^jit_function". --- gdb/testsuite/gdb.base/jit.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp index 366c8b3..ca6e6c3 100644 --- a/gdb/testsuite/gdb.base/jit.exp +++ b/gdb/testsuite/gdb.base/jit.exp @@ -93,7 +93,7 @@ proc one_jit_test {count match_str} { gdb_breakpoint [gdb_get_line_number "break here 1"] gdb_continue_to_breakpoint "break here 1" - gdb_test "info function jit_function" "$match_str" + gdb_test "info function ^jit_function" "$match_str" # This is just to help debugging when things fail if {$verbose > 0} {