summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/include/uapi
diff options
context:
space:
mode:
authorQing Zhang <zhangqing@loongson.cn>2023-02-25 15:52:57 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-02-25 22:12:17 +0800
commit1a69f7a161a78aead07cd4b811d796950e892fa4 (patch)
treec5fc4f8eacaf302b0ce9a14a400c77f28e25a3d6 /arch/loongarch/include/uapi
parentedffa33c7bb5a73e90c754c7a497162b77d7c55f (diff)
downloadlinux-1a69f7a161a78aead07cd4b811d796950e892fa4.tar.gz
linux-1a69f7a161a78aead07cd4b811d796950e892fa4.tar.bz2
linux-1a69f7a161a78aead07cd4b811d796950e892fa4.zip
LoongArch: ptrace: Expose hardware breakpoints to debuggers
Implement the regset-based ptrace interface that exposes hardware breakpoints to user-space debuggers to query and set instruction and data breakpoints. Signed-off-by: Qing Zhang <zhangqing@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/uapi')
-rw-r--r--arch/loongarch/include/uapi/asm/ptrace.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/loongarch/include/uapi/asm/ptrace.h b/arch/loongarch/include/uapi/asm/ptrace.h
index 083193f4a5d5..cc48ed262021 100644
--- a/arch/loongarch/include/uapi/asm/ptrace.h
+++ b/arch/loongarch/include/uapi/asm/ptrace.h
@@ -46,6 +46,15 @@ struct user_fp_state {
uint32_t fcsr;
};
+struct user_watch_state {
+ uint16_t dbg_info;
+ struct {
+ uint64_t addr;
+ uint64_t mask;
+ uint32_t ctrl;
+ } dbg_regs[8];
+};
+
#define PTRACE_SYSEMU 0x1f
#define PTRACE_SYSEMU_SINGLESTEP 0x20