From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E130C3858D33; Tue, 20 Feb 2024 15:10:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E130C3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708441844; bh=HM6LW4PdbNWtDcKGCVV8KDkz96M8MZv8A5z8H963Twc=; h=From:To:Subject:Date:From; b=b9lmMZ/ZY0l6pO6JDmhhgw7AqglM8rPaiOzUz5WINP5QWkKLlBD4Wr3IdwcFiIWIv 08Ps30W2zU8AhMlA8GIDUwogubuYT0lOOyPIAJMpQCtmBqHuZBlbhCSDtdhmg8oCWo G+TnQAnmeApyApjBaBIMKWP0jmdeuuaNQBnPH4m8= From: "recursivenomad+sourceware at protonmail dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/31403] New: Automatic hardware breakpoints do not count towards hardware-breakpoint-limit Date: Tue, 20 Feb 2024 15:10:44 +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: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: recursivenomad+sourceware at protonmail dot com X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31403 Bug ID: 31403 Summary: Automatic hardware breakpoints do not count towards hardware-breakpoint-limit Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: recursivenomad+sourceware at protonmail dot com Target Milestone: --- I am debugging a Raspberry Pi Pico (RP2040, ARM Cortex-M0+) via a Picoprobe= (a second Pico used as the debug probe), from GDB through OpenOCD. I have encountered this bug on Windows 10 with arm-none-eabi-gdb, and on Debian 12 with gdb-multiarch. I send GDB `set remote hardware-breakpoint-limit 4` at launch. If I manual= ly request `hbreak` four times, the limit is successfully reached, and a fifth `hbreak` request gracefully returns "Hardware breakpoints used exceeds limi= t". If I instead request `break` (noting that GDB reports "Note: automatically using hardware breakpoints for read-only addresses." at launch), I can see = that GDB is successfully sending `Z1` packets; however, these automatic hardware breakpoints do not appear to count towards the gracefully monitored hardware-breakpoint-limit. Listing these breakpoints with `info break` rep= orts they are of Type "breakpoint" (not "hw breakpoint"). The result of this bug is that requesting more breakpoints than the hardware supports will result in a fatal error, requiring GDB to restart. For my development environment, manually submitting `hbreak` is not a grace= ful workaround, as my debugging interface (VSCodium/VSCode) automatically submi= ts `break` when creating breakpoints through the UI. I am curious if there is a way for GDB to track these automatic hardware breakpoints the same as those created manually with `hbreak`? Thank you for your contributions to this project :) --=20 You are receiving this mail because: You are on the CC list for the bug.=