From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F26E9385E010; Sat, 28 Mar 2020 01:34:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F26E9385E010 From: "keno at juliacomputing dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/25741] New: GDB tries to set breakpoint using Z0, but remove it using z1 Date: Sat, 28 Mar 2020 01:34:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: keno at juliacomputing 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 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: Sat, 28 Mar 2020 01:34:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25741 Bug ID: 25741 Summary: GDB tries to set breakpoint using Z0, but remove it using z1 Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: keno at juliacomputing dot com Target Milestone: --- I'm using GDB to talk to the rr (github.com/mozilla/rr) remote server. In one particular instance, I'm experiencing what I believe to be a bug in GDB. In particular, if I print out the GDB remote log (`set debug remote 1`), I see in relevant part (extracting all Zz packets): ``` (gdb) set debug remote 1 (gdb) handle SIGSEGV pass nostop noprint Signal Stop Print Pass to program Description SIGSEGV No No Yes Segmentation fault (gdb) handle SIGTRAP pass nostop noprint SIGTRAP is used by the debugger. Are you sure you want to change it? (y or n) y Signal Stop Print Pass to program Description SIGTRAP No No Yes Trace/breakpoint trap (gdb) hbreak *0xf7f736db Sending packet: $mf7f736db,1#33...Packet received: E01 Hardware assisted breakpoint 1 at 0xf7f736db (gdb) c Continuing. Sending packet: $Z1,f7f736db,1#7d...Packet received: OK Packet Z1 (hardware-breakpoint) is supported [...] Sending packet: $z1,f7f736db,1#9d...Packet received: OK [...] Sending packet: $Z0,f7f736db,1#7c...Packet received: OK Packet Z0 (software-breakpoint) is supported [...] Breakpoint 1, 0xf7f736db in ?? () (gdb) c [...] Sending packet: $z1,f7f736db,1#9d... ``` Full log at: https://gist.github.com/Keno/5c8345356d3124419bdfb8a80173c7a3. In particular, note that after hitting the watchpoint, GDB tries to re-establish the watchpoint with `Z0` rather than `Z1`. This causes rr to complain on the subsequent `z1` (since no such watchpoint was set only a sw breakpoint). The above trace if from GDB HEAD, compiled just now: GNU gdb (GDB) 10.0.50.20200328-git but I originally saw the issue in the GDB that ships with my OS: GNU gdb (Ubuntu 9.0.50.20191119-0ubuntu1) 9.0.50.20191119-git I have also reported this issue to rr at https://github.com/mozilla/rr/issues/2474, though I believe it is likely to be a GDB issue. --=20 You are receiving this mail because: You are on the CC list for the bug.=