diff options
author | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2015-06-18 04:53:18 +0000 |
---|---|---|
committer | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2015-06-18 04:53:18 +0000 |
commit | 3579996399bb2b53f21313ed527896b99bd24b50 (patch) | |
tree | b39882e9e7a1baa2db71aa722ae4e30e4ef47ee6 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | |
parent | 58e5bdb091b7484185b9510229ef7a8a1b1ea44e (diff) | |
download | bcm5719-llvm-3579996399bb2b53f21313ed527896b99bd24b50.tar.gz bcm5719-llvm-3579996399bb2b53f21313ed527896b99bd24b50.zip |
[LLDB][MIPS] Hardware Watchpoints for MIPS
Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, dsanders, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D9142
llvm-svn: 239991
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index f6cefa9e001..be07b436580 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -2011,6 +2011,27 @@ NativeProcessLinux::MonitorSIGTRAP(const siginfo_t *info, lldb::pid_t pid) break; case SI_KERNEL: +#if defined __mips__ + // For mips there is no special signal for watchpoint + // So we check for watchpoint in kernel trap + if (thread_sp) + { + // If a watchpoint was hit, report it + uint32_t wp_index; + Error error = thread_sp->GetRegisterContext()->GetWatchpointHitIndex(wp_index, NULL); + if (error.Fail() && log) + log->Printf("NativeProcessLinux::%s() " + "received error while checking for watchpoint hits, " + "pid = %" PRIu64 " error = %s", + __FUNCTION__, pid, error.AsCString()); + if (wp_index != LLDB_INVALID_INDEX32) + { + MonitorWatchpoint(pid, thread_sp, wp_index); + break; + } + } + // NO BREAK +#endif case TRAP_BRKPT: MonitorBreakpoint(pid, thread_sp); break; |