diff options
| author | Zachary Turner <zturner@google.com> | 2014-12-05 18:46:14 +0000 | 
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2014-12-05 18:46:14 +0000 | 
| commit | 0a526eb85588fbf9cab4a6f95449651311f367e1 (patch) | |
| tree | 953d16fa424017c4e824701c7e6d830195f4120b | |
| parent | 301d184784d8fd50f52e18f2b9516115a61786a2 (diff) | |
| download | bcm5719-llvm-0a526eb85588fbf9cab4a6f95449651311f367e1.tar.gz bcm5719-llvm-0a526eb85588fbf9cab4a6f95449651311f367e1.zip | |
Subtract the size of the breakpoint opcode from the PC when getting the bp site.
llvm-svn: 223498
| -rw-r--r-- | lldb/source/Plugins/Process/Windows/ProcessWindows.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp index 0ab627f5815..08bf698a310 100644 --- a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp @@ -302,6 +302,10 @@ ProcessWindows::RefreshStateAfterStop()      if (active_exception->GetExceptionCode() == EXCEPTION_BREAKPOINT)      {          uint64_t pc = register_context->GetPC(); +        // TODO(zturner): The current EIP is AFTER the BP opcode, which is one byte.  So +        // to find the breakpoint, move the PC back.  A better way to do this is probably +        // to ask the Platform how big a breakpoint opcode is. +        --pc;          BreakpointSiteSP site(GetBreakpointSiteList().FindByAddress(pc));          lldb::break_id_t break_id = LLDB_INVALID_BREAK_ID;          bool should_stop = true; | 

