From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 23765395A068; Thu, 8 Dec 2022 14:35:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23765395A068 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670510151; bh=thQN4TyN/mRAfy8sfyboCfMSUv/6IwB64FuH1kYejt8=; h=From:To:Subject:Date:From; b=buJDckiOc+EW6vWk0E6NNgs7tGAHR5tnhTI6C+1thpRUdLtA8Y4rBxOyPkH8YaZ/0 8W8eMRkv5S9cCZnW1Sv3gq5X5ZfIDj+yZE3CwB3XTkBvYB8R8fIVZ+CKCNsqULnshG pjLxEH6dXgdFF1sxBiQ4y3Q6yltQXeDzWPEeJ4nY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: update a pattern in gdb_file_cmd X-Act-Checkin: binutils-gdb X-Git-Author: Enze Li X-Git-Refname: refs/heads/master X-Git-Oldrev: dcb53d93eb0e773c5e63c1fdbc10ec19940e6e02 X-Git-Newrev: c968f038619c319775d41b228c037e4c05ef97a3 Message-Id: <20221208143551.23765395A068@sourceware.org> Date: Thu, 8 Dec 2022 14:35:51 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc968f038619c= 319775d41b228c037e4c05ef97a3 commit c968f038619c319775d41b228c037e4c05ef97a3 Author: Enze Li Date: Thu Dec 8 15:35:47 2022 +0100 gdb/testsuite: update a pattern in gdb_file_cmd =20 When building GDB with the following CFLAGS and CXXFLAGS as part of configure line: =20 CFLAGS=3D-std=3Dgnu11 CXXFLAGS=3D-std=3Dgnu++11 =20 Then run the selftest.exp, I see: =20 =3D=3D=3D=3D=3D=3D Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp ... FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main WARNING: Couldn't test self =20 =3D=3D=3D gdb Summary =3D=3D=3D =20 # of unexpected failures 1 /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory =3D=3D=3D=3D=3D=3D =20 It is the fact that when I use the previously mentioned CFLAGS and CXXFLAGS as part of the configuration line, the default value (-O2 -g) is overridden, then GDB has no debug information. When there's no debug information, GDB should not run the testcase in selftest.exp. =20 The root cause of this FAIL is that the $gdb_file_cmd_debug_info didn't get the right value ("nodebug") during the gdb_file_cmd procedure. =20 That's because in this commit, =20 commit 3453e7e409f44a79ac6695589836edb8a49bfb08 Date: Sat May 19 11:25:20 2018 -0600 =20 Clean up "Reading symbols" output =20 It changed "no debugging..." to "No debugging..." which causes the above problem. This patch only updates the corresponding pattern to fix this issue. =20 With this patch applied, I see: =20 =3D=3D=3D=3D=3D=3D Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp ... =20 =3D=3D=3D gdb Summary =3D=3D=3D =20 # of untested testcases 1 /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory =3D=3D=3D=3D=3D=3D =20 Tested on x86_64-linux. =20 Approved-By: Simon Marchi Diff: --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e4ce3c30c2f..008f59b9f30 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2139,7 +2139,7 @@ proc gdb_file_cmd { arg } { set gdb_file_cmd_debug_info "lzma" return 0 } - -re "(Reading symbols from.*no debugging symbols found.*$gdb_prompt $)" { + -re "(Reading symbols from.*No debugging symbols found.*$gdb_prompt $)" { verbose "\t\tLoaded $arg into $GDB with no debugging symbols" set gdb_file_cmd_msg $expect_out(1,string) set gdb_file_cmd_debug_info "nodebug"