From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7862) id 78F313857004; Mon, 12 Sep 2022 12:17:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78F313857004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662985078; bh=UyKeueFvRm2ud8g8OJySMrgmlbTYcKp5P1HNIjwExlE=; h=From:To:Subject:Date:From; b=aD4bFArDKyhe95f2mSk1Jf77hjd0ZfHjw0bS9MQt9ZGi2okj+C+wtcI53Kksp2ok8 Lp1BiOlzdaGDprNXVGiE/jvY8g9Z0aTxXqjCv0YbSbGS7cH/eBdFGr+wUh8lwBmMQz J57fQMj53oVQ1pzbCL8/1CKPFfzGkQ+TnJMtOW/I= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bruno Larsen To: gdb-cvs@sourceware.org Subject: [binutils-gdb] update gdb.base/info-program.exp to not fail with clang X-Act-Checkin: binutils-gdb X-Git-Author: Bruno Larsen X-Git-Refname: refs/heads/master X-Git-Oldrev: e33020494502d0879c418d69d5a2fd6f6453863a X-Git-Newrev: 8a0eb1994337e7140715bced108c92db06bef612 Message-Id: <20220912121758.78F313857004@sourceware.org> Date: Mon, 12 Sep 2022 12:17:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8a0eb1994337= e7140715bced108c92db06bef612 commit 8a0eb1994337e7140715bced108c92db06bef612 Author: Bruno Larsen Date: Wed Jul 20 16:44:31 2022 -0300 update gdb.base/info-program.exp to not fail with clang =20 The test specifically mentions that it doesn't care where the program stops, however it was still testing for a specific location. The clang compiler emits different line information for epilogue, so GDB reports a different stopping location, depending on the used compiler. With this patch the test works even with clang. Diff: --- gdb/testsuite/gdb.base/info-program.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.ba= se/info-program.exp index facc13efa2f..1dc470b6e79 100644 --- a/gdb/testsuite/gdb.base/info-program.exp +++ b/gdb/testsuite/gdb.base/info-program.exp @@ -26,9 +26,9 @@ if { ![runto_main] } { gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped at breakp= oint $decimal\.\r\nType \"info stack\" or \"info registers\" for more infor= mation\." \ "info program after run to main" =20 -# We don't really care where this step lands, so long as it gets -# the inferior pushed off the breakpoint it's currently on... -gdb_test "next" "$decimal\t.*" "step before info program" +# We don't really care where this step lands, so long as GDB reports +# that the inferior stopped due to a step in the subsequent test. +gdb_test "next" ".*" "step before info program" =20 gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped after bei= ng stepped\.\r\nType \"info stack\" or \"info registers\" for more informat= ion\." \ "info program after next"