public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gdb: LoongArch: Add support for hardware watchpoint & breakpoint
@ 2024-06-11 11:21 Hui Li
  2024-06-11 11:21 ` [PATCH v2 1/2] gdb: LoongArch: Add support for hardware watchpoint Hui Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hui Li @ 2024-06-11 11:21 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tiezhu Yang

LoongArch defines hardware watchpoint functions for fetch and load/store
operations. After the software configures the watchpoints for fetch and
load/store, the processor hardware will monitor the access addresses of
the fetch and load/store operations and trigger a watchpoint exception
when the watchpoint setting conditions are met.

After this series, watch/rwatch/awatch/hbreak command are supported.

Refer to the following document for hardware watchpoint and breakpoint:
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#control-and-status-registers-related-to-watchpoints

Changes v1 -> v2: 
- Fixed some code format.
- Use PLV3 privilege level in ctrl register to enable hardware breakpoint/watchpoint. 

Hui Li (2):
  gdb: LoongArch: Add support for hardware watchpoint
  gdb: LoongArch: Add support for hardware breakpoint

 gdb/Makefile.in                    |   3 +
 gdb/configure.nat                  |   4 +-
 gdb/loongarch-linux-nat.c          | 351 +++++++++++++++++++++++++++++
 gdb/loongarch-tdep.c               |   1 +
 gdb/nat/loongarch-hw-point.c       | 320 ++++++++++++++++++++++++++
 gdb/nat/loongarch-hw-point.h       | 103 +++++++++
 gdb/nat/loongarch-linux-hw-point.c | 252 +++++++++++++++++++++
 gdb/nat/loongarch-linux-hw-point.h | 126 +++++++++++
 gdb/nat/loongarch-linux.c          | 100 ++++++++
 gdb/nat/loongarch-linux.h          |  42 ++++
 include/elf/common.h               |   4 +
 11 files changed, 1305 insertions(+), 1 deletion(-)
 create mode 100644 gdb/nat/loongarch-hw-point.c
 create mode 100644 gdb/nat/loongarch-hw-point.h
 create mode 100644 gdb/nat/loongarch-linux-hw-point.c
 create mode 100644 gdb/nat/loongarch-linux-hw-point.h
 create mode 100644 gdb/nat/loongarch-linux.c
 create mode 100644 gdb/nat/loongarch-linux.h

-- 
2.38.1


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

end of thread, other threads:[~2024-06-24 21:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-11 11:21 [PATCH v2 0/2] gdb: LoongArch: Add support for hardware watchpoint & breakpoint Hui Li
2024-06-11 11:21 ` [PATCH v2 1/2] gdb: LoongArch: Add support for hardware watchpoint Hui Li
2024-06-11 11:21 ` [PATCH v2 2/2] gdb: LoongArch: Add support for hardware breakpoint Hui Li
2024-06-24 21:55 ` [PATCH v2 0/2] gdb: LoongArch: Add support for hardware watchpoint & breakpoint Tiezhu Yang

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