public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/25741] New: GDB tries to set breakpoint using Z0, but remove it using z1
@ 2020-03-28  1:34 keno at juliacomputing dot com
  2020-03-28  4:01 ` [Bug remote/25741] " keno at juliacomputing dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: keno at juliacomputing dot com @ 2020-03-28  1:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25741

            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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-13 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28  1:34 [Bug remote/25741] New: GDB tries to set breakpoint using Z0, but remove it using z1 keno at juliacomputing dot com
2020-03-28  4:01 ` [Bug remote/25741] " keno at juliacomputing dot com
2020-03-31  0:17 ` cbiesinger at google dot com
2020-04-07  2:28 ` keno at juliacomputing dot com
2020-05-17 18:24 ` cvs-commit at gcc dot gnu.org
2020-06-13 11:45 ` palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).