From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D76A2385843E; Thu, 21 Mar 2024 09:04:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D76A2385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711011882; bh=bD342uA0/5MIBkAU05m8tXVTfpXqt/a5paQ6WoveEFU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YckUlDHpi1XYannVZ7xUu015hrwdusviIlDz1LkN3620SUJf72Dp01KNFGegC9mnw nbvBrpc82w5IqX4Fkn+bYUWNnYwjmujpfylTUUzdc7GvPIZ5F1T++SEF+SG/RyZjWP Rog4jqWRQmj43BtDZlLx5A3PV2cgGtYhzHR908Cw= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/31485] [gdb/breakpoints] watchpoint not triggered during inferior call Date: Thu, 21 Mar 2024 09:04:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: 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=3D31485 --- Comment #2 from Tom de Vries --- With this patch: ... - disable_watchpoints_before_interactive_call_start (); + //disable_watchpoints_before_interactive_call_start (); ... we have (on x86_64): ... $ gdb -q -iex "set trace-commands on" \ outputs/gdb.base/watchpoint-unaligned/watchpoint-unaligned \ -ex "watch data.u.size8twice[0]" \ -ex start \ -ex "set unwind-on-terminating-exception off" \ -ex "set unwindonsignal off" \ -ex "print data".u.size8twice \ -ex "call write_size8twice()" \ -ex "print data".u.size8twice=20 Reading symbols from outputs/gdb.base/watchpoint-unaligned/watchpoint-unaligned... +watch data.u.size8twice[0] Hardware watchpoint 1: data.u.size8twice[0] +start Temporary breakpoint 2 at 0x400567: file /data/vries/gdb/src/gdb/testsuite/gdb.base/watchpoint-unaligned.c, line 65. Starting program: /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.base/watchpoint-u= naligned/watchpoint-unaligned=20 Temporary breakpoint 2, main () at /data/vries/gdb/src/gdb/testsuite/gdb.base/watchpoint-unaligned.c:65 65 write_size8twice (); +set unwind-on-terminating-exception off +set unwindonsignal off +print data.u.size8twice $1 =3D {0, 0, 0} +call write_size8twice() Hardware watchpoint 1: data.u.size8twice[0] Old value =3D 0 New value =3D 1 write_size8twice () at /data/vries/gdb/src/gdb/testsuite/gdb.base/watchpoint-unaligned.c:54 54 data.u.size8twice[offset + 1] =3D second; The program being debugged stopped while in a function called from GDB. Evaluation of the expression containing the function (write_size8twice) will be abandoned. When the function is done executing, GDB will silently stop. +print data.u.size8twice $2 =3D {1, 0, 0} (gdb)=20 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=