diff options
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index c73c7c9..40a5665 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -545,6 +545,8 @@ struct ppc_linux_nat_target final : public linux_nat_target void low_new_clone (struct lwp_info *, pid_t) override; + void low_init_process (pid_t pid) override; + void low_forget_process (pid_t pid) override; void low_prepare_to_resume (struct lwp_info *) override; @@ -2705,6 +2707,19 @@ ppc_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len, return 0; } +/* Implement the "low_init_process" target_ops method. */ + +void +ppc_linux_nat_target::low_init_process (pid_t pid) +{ + /* Set the hardware debug register capacity. This requires the process to be + ptrace-stopped, otherwise detection will fail and software watchpoints will + be used instead of hardware. If we allow this to be done lazily, we + cannot guarantee that it's called when the process is ptrace-stopped, so + do it now. */ + m_dreg_interface.detect (ptid_t (pid, pid)); +} + /* Clean up the per-process info associated with PID. When using the HWDEBUG interface, we also erase the per-thread state of installed debug registers for all the threads that belong to the group of PID. |