diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-09-08 01:16:50 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-08 01:16:50 +0000 |
| commit | af3d4af4ebec2c519823a745665729ded3f9bbce (patch) | |
| tree | 4d04e8e2c4e48ed30a0e578370541cf36b7c381d /lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h | |
| parent | 213b454698ed53fc00203d0ea7be34f46dd0858d (diff) | |
| download | bcm5719-llvm-af3d4af4ebec2c519823a745665729ded3f9bbce.tar.gz bcm5719-llvm-af3d4af4ebec2c519823a745665729ded3f9bbce.zip | |
Add logic to the DNBArchImplX86_64/DNBArchImplI386::NotifyException() callback method
in order to distinguish the real single step exception from a watchpoint exception
which uses the same exc_type of EXC_BREAKPOINT and exc_code of EXC_I386_SGL.
This is done by checking the debug status register to find out whether the watchpoint
data break event has fired, and, if yes, stuff the data break address into the exception's
exc_sub_code field on the debugserver side for lldb to consume on the other end.
llvm-svn: 139274
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h')
| -rw-r--r-- | lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h index 9a00e004466..bbe3643ecab 100644 --- a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h +++ b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h @@ -54,7 +54,7 @@ public: virtual uint32_t NumSupportedHardwareWatchpoints(); virtual uint32_t EnableHardwareWatchpoint (nub_addr_t addr, nub_size_t size, bool read, bool write); virtual bool DisableHardwareWatchpoint (uint32_t hw_break_index); - virtual uint32_t GetHardwareWatchpointHit(); + virtual uint32_t GetHardwareWatchpointHit(nub_addr_t &addr); protected: kern_return_t EnableHardwareSingleStep (bool enable); @@ -233,6 +233,7 @@ protected: static bool IsWatchpointVacant(const DBG &debug_state, uint32_t hw_index); static void ClearWatchpointHits(DBG &debug_state); static bool IsWatchpointHit(const DBG &debug_state, uint32_t hw_index); + static nub_addr_t GetWatchAddress(const DBG &debug_state, uint32_t hw_index); MachThread *m_thread; State m_state; |

