[Lldb-commits] [lldb] r255972 - Make the Language print the description of the Exception Breakpoint resolver. Also
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 17 18:14:05 PST 2015
Author: jingham
Date: Thu Dec 17 20:14:04 2015
New Revision: 255972
URL: http://llvm.org/viewvc/llvm-project?rev=255972&view=rev
Log:
Make the Language print the description of the Exception Breakpoint resolver. Also
have the breakpoint description print the precondition description if one exists.
No behavior change.
<rdar://problem/22885189>
Modified:
lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
lldb/trunk/include/lldb/Target/Language.h
lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
lldb/trunk/source/Breakpoint/Breakpoint.cpp
lldb/trunk/source/Target/Language.cpp
lldb/trunk/source/Target/LanguageRuntime.cpp
lldb/trunk/source/Target/ObjCLanguageRuntime.cpp
Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Thu Dec 17 20:14:04 2015
@@ -163,7 +163,7 @@ public:
ConfigurePrecondition(Args &options);
virtual void
- DescribePrecondition(Stream &stream, lldb::DescriptionLevel level);
+ GetDescription(Stream &stream, lldb::DescriptionLevel level);
};
typedef std::shared_ptr<BreakpointPrecondition> BreakpointPreconditionSP;
Modified: lldb/trunk/include/lldb/Target/Language.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Language.h?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Language.h (original)
+++ lldb/trunk/include/lldb/Target/Language.h Thu Dec 17 20:14:04 2015
@@ -146,6 +146,12 @@ public:
FunctionNameRepresentation representation,
Stream& s);
+ virtual void
+ GetExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s);
+
+ static void
+ GetDefaultExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s);
+
// These are accessors for general information about the Languages lldb knows about:
static lldb::LanguageType
Modified: lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h Thu Dec 17 20:14:04 2015
@@ -204,7 +204,7 @@ public:
~ObjCExceptionPrecondition() override = default;
bool EvaluatePrecondition(StoppointCallbackContext &context) override;
- void DescribePrecondition(Stream &stream, lldb::DescriptionLevel level) override;
+ void GetDescription(Stream &stream, lldb::DescriptionLevel level) override;
Error ConfigurePrecondition(Args &args) override;
protected:
Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Thu Dec 17 20:14:04 2015
@@ -844,6 +844,9 @@ Breakpoint::GetDescription (Stream *s, l
GetOptions()->GetDescription(s, level);
+ if (m_precondition_sp)
+ m_precondition_sp->GetDescription(*s, level);
+
if (level == lldb::eDescriptionLevelFull)
{
if (!m_name_list.empty())
@@ -959,7 +962,7 @@ Breakpoint::BreakpointPrecondition::Eval
}
void
-Breakpoint::BreakpointPrecondition::DescribePrecondition(Stream &stream, lldb::DescriptionLevel level)
+Breakpoint::BreakpointPrecondition::GetDescription(Stream &stream, lldb::DescriptionLevel level)
{
}
Modified: lldb/trunk/source/Target/Language.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Language.cpp?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/source/Target/Language.cpp (original)
+++ lldb/trunk/source/Target/Language.cpp Thu Dec 17 20:14:04 2015
@@ -430,6 +430,19 @@ Language::GetFunctionDisplayName (const
return false;
}
+void
+Language::GetExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
+{
+ GetDefaultExceptionResolverDescription(catch_on, throw_on, s);
+}
+
+void
+Language::GetDefaultExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
+{
+ s.Printf ("Exception breakpoint (catch: %s throw: %s)",
+ catch_on ? "on" : "off",
+ throw_on ? "on" : "off");
+}
//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
Modified: lldb/trunk/source/Target/LanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/source/Target/LanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/LanguageRuntime.cpp Thu Dec 17 20:14:04 2015
@@ -163,10 +163,12 @@ public:
void
GetDescription (Stream *s) override
{
- s->Printf ("Exception breakpoint (catch: %s throw: %s)",
- m_catch_bp ? "on" : "off",
- m_throw_bp ? "on" : "off");
-
+ Language *language_plugin = Language::FindPlugin(m_language);
+ if (language_plugin)
+ language_plugin->GetExceptionResolverDescription(m_catch_bp, m_throw_bp, *s);
+ else
+ Language::GetDefaultExceptionResolverDescription(m_catch_bp, m_throw_bp, *s);
+
SetActualResolver();
if (m_actual_resolver_sp)
{
Modified: lldb/trunk/source/Target/ObjCLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCLanguageRuntime.cpp?rev=255972&r1=255971&r2=255972&view=diff
==============================================================================
--- lldb/trunk/source/Target/ObjCLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/ObjCLanguageRuntime.cpp Thu Dec 17 20:14:04 2015
@@ -426,7 +426,7 @@ ObjCLanguageRuntime::ObjCExceptionPrecon
}
void
-ObjCLanguageRuntime::ObjCExceptionPrecondition::DescribePrecondition(Stream &stream, lldb::DescriptionLevel level)
+ObjCLanguageRuntime::ObjCExceptionPrecondition::GetDescription(Stream &stream, lldb::DescriptionLevel level)
{
}
More information about the lldb-commits
mailing list