public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Check for zpoint support when handling watchpoints
@ 2023-03-28 11:54 Mohamed Bouhaouel
  2023-03-28 11:54 ` [PATCH 1/3] gdb, gdbserver, zpoint: report z_point support Mohamed Bouhaouel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mohamed Bouhaouel @ 2023-03-28 11:54 UTC (permalink / raw)
  To: gdb-patches

Hi all,

This set of patches improves the flow of inserting a watchpoint or a
hardware breakpoint.  It consists of checking whether the target
supports the z_point before doing the actual insertion.  Having such a
flow would avoid unnecessary too many warning messages, not
increment the breakpoint counter when not supported, and prevent
commands from being aborted upon resuming.

Below are the behaviors, with and without the patches, of trying to
insert a hardware watchpoint when the target does not support that.

* Original behavior

(gdb) awatch dim0
Hardware watchpoint 2: dim0
Warning:
Could not insert hardware watchpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoint.

(gdb) continue
Hardware watchpoint 2: dim0
Warning:
Could not insert hardware watchpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoint.

Command aborted.
(gdb)

The warning messages keep popping up on each resume command (`continue`,
`step`, ...) until the user manually deletes the watchpoint.

* With patches applied

(gdb) awatch dim0
Target does not support this type of hardware watchpoint.
(gdb)

Regards,
Mohamed

Mohamed Bouhaouel (3):
  gdb, gdbserver, zpoint: report z_point support
  gdb, breakpoint: add a breakpoint type converter
  gdb, zpoint: check for target hardware breakpoint support

 gdb/breakpoint.c       | 20 ++++++++++++++++++++
 gdb/breakpoint.h       |  3 +++
 gdb/remote.c           | 41 ++++++++++++++++++++++++++++++++++++++---
 gdbserver/mem-break.cc |  2 +-
 gdbserver/mem-break.h  |  4 ++++
 gdbserver/server.cc    |  7 +++++++
 6 files changed, 73 insertions(+), 4 deletions(-)

-- 
2.25.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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

end of thread, other threads:[~2023-11-07 10:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 11:54 [PATCH 0/3] Check for zpoint support when handling watchpoints Mohamed Bouhaouel
2023-03-28 11:54 ` [PATCH 1/3] gdb, gdbserver, zpoint: report z_point support Mohamed Bouhaouel
2023-11-07 10:41   ` Guinevere Larsen
2023-03-28 11:54 ` [PATCH 2/3] gdb, breakpoint: add a breakpoint type converter Mohamed Bouhaouel
2023-03-28 11:54 ` [PATCH 3/3] gdb, zpoint: check for target hardware breakpoint support Mohamed Bouhaouel
2023-11-07 10:48 ` [PATCH 0/3] Check for zpoint support when handling watchpoints Guinevere Larsen

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).