From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD6B43858C39; Fri, 30 Dec 2022 13:00:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD6B43858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672405245; bh=Ed5zHhID9jmZFc6Occx/VOjdrplR2CCXawxo/XI2Vfo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LpLJ8VszgHx5trQq6esRwuiDEQbhBxkEsADKGo0ltV2KoY3gczStr9W3dq1BSKx/3 JbRUGAAT9c6E689LsIbE0A1HhtYRjnynBuLHkwxKH3VurI3ysiuB+lM0KavNeSmYea g7grtXwWi3b/rI9p0QDXA67+kjfU0B1M7Scox4Qk= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/29920] [gdb/testsuite] FAIL: gdb.cp/step-and-next-inline.exp: no_header: next step 1 Date: Fri, 30 Dec 2022 13:00:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29920 --- Comment #5 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db1b0f69cb4a2= ccd421419f9703edfcc5c3032dc0 commit b1b0f69cb4a2ccd421419f9703edfcc5c3032dc0 Author: Tom de Vries Date: Fri Dec 30 14:00:39 2022 +0100 [gdb/testsuite] Fix gdb.cp/step-and-next-inline.exp with -fcf-protection On Ubuntu 22.04.1 x86_64, I run into: ... (gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: not in inline 1 next^M 51 if (t !=3D NULL^M (gdb) FAIL: gdb.cp/step-and-next-inline.exp: no_header: next step 1 ... This is due to -fcf-protection, which adds the endbr64 at the start of get_alias_set: ... 0000000000001180 <_Z13get_alias_setP4tree>: 1180: f3 0f 1e fa endbr64 1184: 48 85 ff test %rdi,%rdi ... so the extra insn gets an is-stmt line number entry: ... INDEX LINE ADDRESS IS-STMT PROLOGUE-END ... 11 50 0x0000000000001180 Y 12 50 0x0000000000001180 13 51 0x0000000000001184 Y 14 54 0x0000000000001184 ... and when stepping into get_alias_set we step to line 50: ... (gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: in main step^M get_alias_set (t=3Dt@entry=3D0x555555558018 ) at step-and-next-inline.cc:50^M 50 {^M ... In contrast, with -fcf-protection=3Dnone, we get: ... 0000000000001170 <_Z13get_alias_setP4tree>: 1170: 48 85 ff test %rdi,%rdi ... and: ... INDEX LINE ADDRESS IS-STMT PROLOGUE-END ... 11 50 0x0000000000001170 Y 12 51 0x0000000000001170 Y 13 54 0x0000000000001170 ... so when stepping into get_alias_set we step to line 51: ... (gdb) PASS: gdb.cp/step-and-next-inline.exp: no_header: in main step^M get_alias_set (t=3Dt@entry=3D0x555555558018 ) at step-and-next-inline.cc:51^M 51 if (t !=3D NULL^M ... Fix this by rewriting the gdb_test issuing the step command to check wh= ich line the step lands on, and issuing an extra next if needed. Tested on x86_64-linux, both with and without -fcf-protection=3Dnone. PR testsuite/29920 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29920 --=20 You are receiving this mail because: You are on the CC list for the bug.=