diff options
Diffstat (limited to 'source/Target/LanguageRuntime.cpp')
| -rw-r--r-- | source/Target/LanguageRuntime.cpp | 56 | 
1 files changed, 37 insertions, 19 deletions
| diff --git a/source/Target/LanguageRuntime.cpp b/source/Target/LanguageRuntime.cpp index 9d48d8b2de7f..358bffee3a4d 100644 --- a/source/Target/LanguageRuntime.cpp +++ b/source/Target/LanguageRuntime.cpp @@ -10,6 +10,7 @@  #include "lldb/Target/LanguageRuntime.h"  #include "lldb/Target/Target.h"  #include "lldb/Core/PluginManager.h" +#include "lldb/Core/SearchFilter.h"  using namespace lldb;  using namespace lldb_private; @@ -19,17 +20,22 @@ class ExceptionSearchFilter : public SearchFilter  {  public:      ExceptionSearchFilter (const lldb::TargetSP &target_sp, -                           lldb::LanguageType language) : +                           lldb::LanguageType language, +                           bool update_module_list = true) :          SearchFilter (target_sp),          m_language (language),          m_language_runtime (NULL),          m_filter_sp ()      { -        UpdateModuleListIfNeeded (); +        if (update_module_list) +            UpdateModuleListIfNeeded ();      } -     -    virtual bool -    ModulePasses (const lldb::ModuleSP &module_sp) + +    virtual +    ~ExceptionSearchFilter() {}; + +    bool +    ModulePasses (const lldb::ModuleSP &module_sp) override      {          UpdateModuleListIfNeeded ();          if (m_filter_sp) @@ -37,8 +43,8 @@ public:          return false;      } -    virtual bool -    ModulePasses (const FileSpec &spec) +    bool +    ModulePasses (const FileSpec &spec) override      {          UpdateModuleListIfNeeded ();          if (m_filter_sp) @@ -47,16 +53,16 @@ public:      } -    virtual void -    Search (Searcher &searcher) +    void +    Search (Searcher &searcher) override      {          UpdateModuleListIfNeeded ();          if (m_filter_sp)              m_filter_sp->Search (searcher);      } -    virtual void -    GetDescription (Stream *s) +    void +    GetDescription (Stream *s) override      {          UpdateModuleListIfNeeded ();          if (m_filter_sp) @@ -68,6 +74,12 @@ protected:      LanguageRuntime *m_language_runtime;      SearchFilterSP m_filter_sp; +    SearchFilterSP +    DoCopyForBreakpoint(Breakpoint &breakpoint) override +    { +        return SearchFilterSP(new ExceptionSearchFilter(TargetSP(), m_language, false)); +    } +      void      UpdateModuleListIfNeeded ()      { @@ -124,11 +136,11 @@ public:      {      } -    virtual Searcher::CallbackReturn +    Searcher::CallbackReturn      SearchCallback (SearchFilter &filter,                      SymbolContext &context,                      Address *addr, -                    bool containing) +                    bool containing) override      {          if (SetActualResolver()) @@ -137,8 +149,8 @@ public:              return eCallbackReturnStop;      } -    virtual Searcher::Depth -    GetDepth () +    Searcher::Depth +    GetDepth () override      {          if (SetActualResolver())              return m_actual_resolver_sp->GetDepth(); @@ -146,8 +158,8 @@ public:              return eDepthTarget;      } -    virtual void -    GetDescription (Stream *s) +    void +    GetDescription (Stream *s) override      {          s->Printf ("Exception breakpoint (catch: %s throw: %s)",                     m_catch_bp ? "on" : "off", @@ -163,8 +175,8 @@ public:              s->Printf (" the correct runtime exception handler will be determined when you run");      } -    virtual void -    Dump (Stream *s) const +    void +    Dump (Stream *s) const override      {      } @@ -174,6 +186,12 @@ public:          return V->getResolverID() == BreakpointResolver::ExceptionResolver;      }  protected: +    BreakpointResolverSP +    CopyForBreakpoint (Breakpoint &breakpoint) override +    { +        return BreakpointResolverSP(new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp)); +    } +      bool      SetActualResolver()      { | 
