本文整理汇总了C++中ConstString::Dump方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstString::Dump方法的具体用法?C++ ConstString::Dump怎么用?C++ ConstString::Dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstString
的用法示例。
在下文中一共展示了ConstString::Dump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
bool
SymbolContext::DumpStopContext (
Stream *s,
ExecutionContextScope *exe_scope,
const Address &addr,
bool show_fullpaths,
bool show_module,
bool show_inlined_frames,
bool show_function_arguments,
bool show_function_name
) const
{
bool dumped_something = false;
if (show_module && module_sp)
{
if (show_fullpaths)
*s << module_sp->GetFileSpec();
else
*s << module_sp->GetFileSpec().GetFilename();
s->PutChar('`');
dumped_something = true;
}
if (function != nullptr)
{
SymbolContext inline_parent_sc;
Address inline_parent_addr;
if (show_function_name == false)
{
s->Printf("<");
dumped_something = true;
}
else
{
ConstString name;
if (show_function_arguments == false)
name = function->GetNameNoArguments();
if (!name)
name = function->GetName();
if (name)
name.Dump(s);
}
if (addr.IsValid())
{
const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetOffset();
if (show_function_name == false)
{
// Print +offset even if offset is 0
dumped_something = true;
s->Printf("+%" PRIu64 ">", function_offset);
}
else if (function_offset)
{
dumped_something = true;
s->Printf(" + %" PRIu64, function_offset);
}
}
if (GetParentOfInlinedScope (addr, inline_parent_sc, inline_parent_addr))
{
dumped_something = true;
Block *inlined_block = block->GetContainingInlinedBlock();
const InlineFunctionInfo* inlined_block_info = inlined_block->GetInlinedFunctionInfo();
s->Printf (" [inlined] %s", inlined_block_info->GetName(function->GetLanguage()).GetCString());
lldb_private::AddressRange block_range;
if (inlined_block->GetRangeContainingAddress(addr, block_range))
{
const addr_t inlined_function_offset = addr.GetOffset() - block_range.GetBaseAddress().GetOffset();
if (inlined_function_offset)
{
s->Printf(" + %" PRIu64, inlined_function_offset);
}
}
const Declaration &call_site = inlined_block_info->GetCallSite();
if (call_site.IsValid())
{
s->PutCString(" at ");
call_site.DumpStopContext (s, show_fullpaths);
}
if (show_inlined_frames)
{
s->EOL();
s->Indent();
const bool show_function_name = true;
return inline_parent_sc.DumpStopContext (s, exe_scope, inline_parent_addr, show_fullpaths, show_module, show_inlined_frames, show_function_arguments, show_function_name);
}
}
else
{
if (line_entry.IsValid())
{
dumped_something = true;
s->PutCString(" at ");
if (line_entry.DumpStopContext(s, show_fullpaths))
dumped_something = true;
}
}
}
//.........这里部分代码省略.........