本文整理汇总了C++中SBStream::ref方法的典型用法代码示例。如果您正苦于以下问题:C++ SBStream::ref方法的具体用法?C++ SBStream::ref怎么用?C++ SBStream::ref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SBStream
的用法示例。
在下文中一共展示了SBStream::ref方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetInlinedName
bool
SBBlock::GetDescription (SBStream &description)
{
Stream &strm = description.ref();
if (m_opaque_ptr)
{
lldb::user_id_t id = m_opaque_ptr->GetID();
strm.Printf ("Block: {id: %" PRIu64 "} ", id);
if (IsInlined())
{
strm.Printf (" (inlined, '%s') ", GetInlinedName());
}
lldb_private::SymbolContext sc;
m_opaque_ptr->CalculateSymbolContext (&sc);
if (sc.function)
{
m_opaque_ptr->DumpAddressRanges (&strm,
sc.function->GetAddressRange().GetBaseAddress().GetFileAddress());
}
}
else
strm.PutCString ("No value");
return true;
}
示例2: process_sp
bool
SBProcess::GetDescription (SBStream &description)
{
Stream &strm = description.ref();
ProcessSP process_sp(GetSP());
if (process_sp)
{
char path[PATH_MAX];
GetTarget().GetExecutable().GetPath (path, sizeof(path));
Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
const char *exe_name = NULL;
if (exe_module)
exe_name = exe_module->GetFileSpec().GetFilename().AsCString();
strm.Printf ("SBProcess: pid = %" PRIu64 ", state = %s, threads = %d%s%s",
process_sp->GetID(),
lldb_private::StateAsCString (GetState()),
GetNumThreads(),
exe_name ? ", executable = " : "",
exe_name ? exe_name : "");
}
else
strm.PutCString ("No value");
return true;
}
示例3: if
bool
SBCommandReturnObject::GetDescription (SBStream &description)
{
Stream &strm = description.ref();
if (m_opaque_ap.get())
{
description.Printf ("Status: ");
lldb::ReturnStatus status = m_opaque_ap->GetStatus();
if (status == lldb::eReturnStatusStarted)
strm.PutCString ("Started");
else if (status == lldb::eReturnStatusInvalid)
strm.PutCString ("Invalid");
else if (m_opaque_ap->Succeeded())
strm.PutCString ("Success");
else
strm.PutCString ("Fail");
if (GetOutputSize() > 0)
strm.Printf ("\nOutput Message:\n%s", GetOutput());
if (GetErrorSize() > 0)
strm.Printf ("\nError Message:\n%s", GetError());
}
else
strm.PutCString ("No value");
return true;
}
示例4:
bool
SBFileSpec::GetDescription (SBStream &description) const
{
Stream &strm = description.ref();
char path[PATH_MAX];
if (m_opaque_ap->GetPath(path, sizeof(path)))
strm.PutCString (path);
return true;
}
示例5: GetDescription
bool SBCompileUnit::GetDescription(SBStream &description) {
Stream &strm = description.ref();
if (m_opaque_ptr) {
m_opaque_ptr->Dump(&strm, false);
} else
strm.PutCString("No value");
return true;
}
示例6: GetDescription
bool SBSymbolContext::GetDescription(SBStream &description) {
Stream &strm = description.ref();
if (m_opaque_ap.get()) {
m_opaque_ap->GetDescription(&strm, lldb::eDescriptionLevelFull, NULL);
} else
strm.PutCString("No value");
return true;
}
示例7:
bool
SBValue::GetExpressionPath (SBStream &description)
{
if (m_opaque_sp)
{
m_opaque_sp->GetExpressionPath (description.ref(), false);
return true;
}
return false;
}
示例8: GetDescription
bool SBModule::GetDescription(SBStream &description) {
Stream &strm = description.ref();
ModuleSP module_sp(GetSP());
if (module_sp) {
module_sp->GetDescription(&strm);
} else
strm.PutCString("No value");
return true;
}
示例9: value_sp
bool
SBValue::GetExpressionPath (SBStream &description)
{
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
if (value_sp)
{
value_sp->GetExpressionPath (description.ref(), false);
return true;
}
return false;
}
示例10: GetDescription
bool SBMemoryRegionInfo::GetDescription(SBStream &description) {
Stream &strm = description.ref();
const addr_t load_addr = m_opaque_ap->GetRange().base;
strm.Printf("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 " ", load_addr,
load_addr + m_opaque_ap->GetRange().size);
strm.Printf(m_opaque_ap->GetReadable() ? "R" : "-");
strm.Printf(m_opaque_ap->GetWritable() ? "W" : "-");
strm.Printf(m_opaque_ap->GetExecutable() ? "X" : "-");
strm.Printf("]");
return true;
}
示例11: GetDescription
bool SBSymbolContext::GetDescription(SBStream &description) {
LLDB_RECORD_METHOD(bool, SBSymbolContext, GetDescription, (lldb::SBStream &),
description);
Stream &strm = description.ref();
if (m_opaque_up) {
m_opaque_up->GetDescription(&strm, lldb::eDescriptionLevelFull, NULL);
} else
strm.PutCString("No value");
return true;
}
示例12:
bool
SBSymbolContext::GetDescription (SBStream &description)
{
if (m_opaque_ap.get())
{
description.ref();
m_opaque_ap->GetDescription (description.get(), lldb::eDescriptionLevelFull, NULL);
}
else
description.Printf ("No value");
return true;
}
示例13:
bool
SBCompileUnit::GetDescription (SBStream &description)
{
if (m_opaque_ptr)
{
description.ref();
m_opaque_ptr->Dump (description.get(), false);
}
else
description.Printf ("No Value");
return true;
}
示例14: GetStatus
bool SBThread::GetStatus(SBStream &status) const {
Stream &strm = status.ref();
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
if (exe_ctx.HasThreadScope()) {
exe_ctx.GetThreadPtr()->GetStatus(strm, 0, 1, 1, true);
} else
strm.PutCString("No status");
return true;
}
示例15:
bool
SBEvent::GetDescription (SBStream &description) const
{
Stream &strm = description.ref();
if (get())
{
m_opaque_ptr->Dump (&strm);
}
else
strm.PutCString ("No value");
return true;
}