diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:37:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:37:19 +0000 |
| commit | 85d8ef8f1f0e0e063a8571944302be2d2026f823 (patch) | |
| tree | 9d2de4884bec31a1e16bbf0b5a6bfb90d96e16af /source/Target | |
| parent | 027f1c9655391dcb2b0117f931f720211ac933db (diff) | |
Import stripped lldb 3.7.0 release (r246257).vendor/lldb/lldb-release_370-r246257
Notes
svn path=/vendor/lldb/dist/; revision=287514
svn path=/vendor/lldb/lldb-release_370-r246257/; revision=287515; tag=vendor/lldb/lldb-release_370-r246257
Diffstat (limited to 'source/Target')
| -rw-r--r-- | source/Target/StopInfo.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/Target/StopInfo.cpp b/source/Target/StopInfo.cpp index 4f6ef7a92949..9bbb00dbf0da 100644 --- a/source/Target/StopInfo.cpp +++ b/source/Target/StopInfo.cpp @@ -615,10 +615,11 @@ public: Watchpoint *watchpoint; }; - StopInfoWatchpoint (Thread &thread, break_id_t watch_id) : + StopInfoWatchpoint (Thread &thread, break_id_t watch_id, lldb::addr_t watch_hit_addr) : StopInfo(thread, watch_id), m_should_stop(false), - m_should_stop_is_valid(false) + m_should_stop_is_valid(false), + m_watch_hit_addr(watch_hit_addr) { } @@ -745,6 +746,21 @@ protected: } } + /* + * MIPS: Last 3bits of the watchpoint address are masked by the kernel. For example: + * 'n' is at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is set at 'm', then + * watch exception is generated even when 'n' is read/written. To handle this case, + * server emulates the instruction at PC and finds the base address of the load/store + * instruction and appends it in the description of the stop-info packet. If watchpoint + * is not set on this address by user then this do not stop. + */ + if (m_watch_hit_addr != LLDB_INVALID_ADDRESS) + { + WatchpointSP wp_hit_sp = thread_sp->CalculateTarget()->GetWatchpointList().FindByAddress(m_watch_hit_addr); + if (!wp_hit_sp) + m_should_stop = false; + } + if (m_should_stop && wp_sp->GetConditionText() != NULL) { // We need to make sure the user sees any parse errors in their condition, so we'll hook the @@ -857,6 +873,7 @@ protected: private: bool m_should_stop; bool m_should_stop_is_valid; + lldb::addr_t m_watch_hit_addr; }; @@ -1154,9 +1171,9 @@ StopInfo::CreateStopReasonWithBreakpointSiteID (Thread &thread, break_id_t break } StopInfoSP -StopInfo::CreateStopReasonWithWatchpointID (Thread &thread, break_id_t watch_id) +StopInfo::CreateStopReasonWithWatchpointID (Thread &thread, break_id_t watch_id, lldb::addr_t watch_hit_addr) { - return StopInfoSP (new StopInfoWatchpoint (thread, watch_id)); + return StopInfoSP (new StopInfoWatchpoint (thread, watch_id, watch_hit_addr)); } StopInfoSP |
