Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way

Two flags are introduced:
- preferred display language (as in, ObjC vs. C++)
- summary capping (as in, should a limit be put to the amount of data retrieved)

The meaning - if any - of these options is for individual formatters to establish
The topic of a subsequent commit will be to actually wire these through to individual data formatters

llvm-svn: 221482
This commit is contained in:
Enrico Granata
2014-11-06 21:23:20 +00:00
parent 442293e83f
commit c1247f5596
15 changed files with 341 additions and 2 deletions

View File

@@ -640,6 +640,29 @@ SBValue::GetSummary ()
}
return cstr;
}
const char *
SBValue::GetSummary (lldb::SBTypeSummaryOptions& options)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *cstr = NULL;
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
if (value_sp)
{
cstr = value_sp->GetSummaryAsCString(options.ref());
}
if (log)
{
if (cstr)
log->Printf ("SBValue(%p)::GetSummary() => \"%s\"",
static_cast<void*>(value_sp.get()), cstr);
else
log->Printf ("SBValue(%p)::GetSummary() => NULL",
static_cast<void*>(value_sp.get()));
}
return cstr;
}
#endif // LLDB_DISABLE_PYTHON
const char *