From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D24433857C7E; Fri, 15 Jan 2021 13:23:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D24433857C7E From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/27188] New: FAIL: gdb.base/gdb11531.exp: watchpoint variable triggers at next Date: Fri, 15 Jan 2021 13:23:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 13:23:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27188 Bug ID: 27188 Summary: FAIL: gdb.base/gdb11531.exp: watchpoint variable triggers at next Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On openSUSE Factory, there's a cluster of failing test-case related to watchpoints. The first one of those is: ... FAIL: gdb.base/gdb11531.exp: watchpoint variable triggers at next ... Can be reproduced on the command line, as follows. First we show that the watchpoint works when using continue: ... $ gdb -batch outputs/gdb.base/gdb11531/gdb11531 \ -ex start \ -ex "watch myrec.x" \ -ex continue Temporary breakpoint 1 at 0x4010fa: file gdb11531.c, line 34. Temporary breakpoint 1, main () at gdb11531.c:34 34 myrec.x =3D 5; Hardware watchpoint 2: myrec.x Hardware watchpoint 2: myrec.x Old value =3D 0 New value =3D 5 main () at gdb11531.c:35 35 myrec.y =3D 3.4; ... And now with step instead of continue, the watchpoint no longer triggers: ... $ gdb -batch outputs/gdb.base/gdb11531/gdb11531 \ -ex start \ -ex "watch myrec.x" \ -ex step Temporary breakpoint 1 at 0x4010fa: file gdb11531.c, line 34. Temporary breakpoint 1, main () at gdb11531.c:34 34 myrec.x =3D 5; Hardware watchpoint 2: myrec.x 35 myrec.y =3D 3.4; ... Workaround: disable hardware watchpoints: ... $ gdb -batch outputs/gdb.base/gdb11531/gdb11531 \ -ex start \ -ex "set can-use-hw-watchpoints 0" \ -ex "watch myrec.x" \ -ex step Temporary breakpoint 1 at 0x4010fa: file gdb11531.c, line 34. Temporary breakpoint 1, main () at gdb11531.c:34 34 myrec.x =3D 5; Watchpoint 2: myrec.x Watchpoint 2: myrec.x Old value =3D 0 New value =3D 5 main () at gdb11531.c:35 35 myrec.y =3D 3.4; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=