summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
commitfa0e7b41694bc598cd3df2405d0384ea29d7537e (patch)
tree5e5b6a0774e0d93bb4cfa2f9f83b9c41b38c4448 /contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp
parentd2b9c88b24f95cd9f8e7bd621cfa454ce759c687 (diff)
parent0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (diff)
downloadFreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.zip
FreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.tar.gz
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp56
1 files changed, 37 insertions, 19 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp b/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp
index 9d48d8b..358bffe 100644
--- a/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp
+++ b/contrib/llvm/tools/lldb/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()
{
OpenPOWER on IntegriCloud