From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 6E4033942023 for ; Wed, 11 Mar 2020 16:57:29 +0000 (GMT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D07DADAD for ; Wed, 11 Mar 2020 16:57:28 +0000 (UTC) Date: Wed, 11 Mar 2020 17:57:27 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix printf regexp in gdb.server/sysroot.exp Message-ID: <20200311165725.GA8090@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 16:57:30 -0000 Hi, When running gdb.server/sysroot.exp, I run into this FAIL: ... (gdb) continue^M Continuing.^M ^M Breakpoint 2, __printf (format=0x4005c4 "Hello World!\n") at printf.c:28^M 28 {^M (gdb) FAIL: gdb.server/sysroot.exp: sysroot=local: continue to printf ... for this test: ... gdb_test "continue" "Breakpoint $decimal.* printf .*" "continue to printf" ... Without debug info for glibc installed, we have instead: ... (gdb) continue^M Continuing.^M ^M Breakpoint 2, 0x00007ffff773c550 in printf () from /lib64/libc.so.6^M (gdb) PASS: gdb.server/sysroot.exp: sysroot=local: continue to printf ... Fix this by allowing for GLIBC's printf alias __printf to be printed: ... gdb_test "continue" "Breakpoint $decimal.* (__)?printf .*" \ "continue to printf" ... Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix printf regexp in gdb.server/sysroot.exp gdb/testsuite/ChangeLog: 2020-03-11 Tom de Vries * gdb.server/sysroot.exp: Allow GLIBC's printf alias __printf. --- gdb/testsuite/gdb.server/sysroot.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index fd6f43b1b1..2c68ebf287 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -73,5 +73,6 @@ foreach_with_prefix sysroot { "local" "remote" } { # Test that we can stop inside a library. gdb_breakpoint printf - gdb_test "continue" "Breakpoint $decimal.* printf .*" "continue to printf" + gdb_test "continue" "Breakpoint $decimal.* (__)?printf .*" \ + "continue to printf" }