Skip to content

Commit

Permalink
LoongArch: ptrace: Expose hardware breakpoints to debuggers
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zhangqingmy authored and chenhuacai committed Feb 25, 2023
1 parent edffa33 commit 1a69f7a
Show file tree
Hide file tree
Showing 3 changed files with 413 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/loongarch/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading

0 comments on commit 1a69f7a

Please sign in to comment.