Skip to content

Commit 1a69f7a

Browse files
zhangqingmychenhuacai
authored andcommitted
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 <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent edffa33 commit 1a69f7a

File tree

3 files changed

+413
-0
lines changed

3 files changed

+413
-0
lines changed

arch/loongarch/include/uapi/asm/ptrace.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ struct user_fp_state {
4646
uint32_t fcsr;
4747
};
4848

49+
struct user_watch_state {
50+
uint16_t dbg_info;
51+
struct {
52+
uint64_t addr;
53+
uint64_t mask;
54+
uint32_t ctrl;
55+
} dbg_regs[8];
56+
};
57+
4958
#define PTRACE_SYSEMU 0x1f
5059
#define PTRACE_SYSEMU_SINGLESTEP 0x20
5160

0 commit comments

Comments
 (0)