mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 15:41:35 +08:00
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> llvm-svn: 255972
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -844,6 +844,9 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_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::EvaluatePrecondition(StoppointCallbackContex
|
||||
}
|
||||
|
||||
void
|
||||
Breakpoint::BreakpointPrecondition::DescribePrecondition(Stream &stream, lldb::DescriptionLevel level)
|
||||
Breakpoint::BreakpointPrecondition::GetDescription(Stream &stream, lldb::DescriptionLevel level)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -430,6 +430,19 @@ Language::GetFunctionDisplayName (const SymbolContext *sc,
|
||||
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
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -426,7 +426,7 @@ ObjCLanguageRuntime::ObjCExceptionPrecondition::EvaluatePrecondition(StoppointCa
|
||||
}
|
||||
|
||||
void
|
||||
ObjCLanguageRuntime::ObjCExceptionPrecondition::DescribePrecondition(Stream &stream, lldb::DescriptionLevel level)
|
||||
ObjCLanguageRuntime::ObjCExceptionPrecondition::GetDescription(Stream &stream, lldb::DescriptionLevel level)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user