diff options
| author | Zachary Turner <zturner@google.com> | 2014-12-09 19:13:50 +0000 | 
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2014-12-09 19:13:50 +0000 | 
| commit | c8d9748c06ad4b6cd372a1564eaebf6398c31e13 (patch) | |
| tree | ada225bd8a14f0945a544bf48b9c11a1e3f968a0 /lldb/source/Plugins/Process | |
| parent | 2defbada38d1a8fe8c215aa162b26e4db19e69b3 (diff) | |
| download | bcm5719-llvm-c8d9748c06ad4b6cd372a1564eaebf6398c31e13.tar.gz bcm5719-llvm-c8d9748c06ad4b6cd372a1564eaebf6398c31e13.zip | |
Create a valid stop info for all non-breakpoint exceptions.
llvm-svn: 223812
Diffstat (limited to 'lldb/source/Plugins/Process')
| -rw-r--r-- | lldb/source/Plugins/Process/Windows/ProcessWindows.cpp | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp index 08bf698a310..bedecd44125 100644 --- a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp @@ -41,6 +41,8 @@  #include "ProcessWindows.h"  #include "TargetThreadWindows.h" +#include "llvm/Support/raw_ostream.h" +  using namespace lldb;  using namespace lldb_private; @@ -236,7 +238,7 @@ Error  ProcessWindows::DoResume()  {      Error error; -    if (GetPrivateState() == eStateStopped) +    if (GetPrivateState() == eStateStopped || GetPrivateState() == eStateCrashed)      {          if (m_session_data->m_debugger->GetActiveException())          { @@ -299,9 +301,9 @@ ProcessWindows::RefreshStateAfterStop()      ThreadSP stop_thread = m_thread_list.GetSelectedThread();      RegisterContextSP register_context = stop_thread->GetRegisterContext(); +    uint64_t pc = register_context->GetPC();      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. @@ -318,6 +320,14 @@ ProcessWindows::RefreshStateAfterStop()          stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread, break_id, should_stop);          stop_thread->SetStopInfo(stop_info);      } +    else +    { +        std::string desc; +        llvm::raw_string_ostream desc_stream(desc); +        desc_stream << "Exception " << active_exception->GetExceptionCode() << " encountered at address " << pc; +        stop_info = StopInfo::CreateStopReasonWithException(*stop_thread, desc_stream.str().c_str()); +        stop_thread->SetStopInfo(stop_info); +    }  }  bool | 

