当前位置: 首页>>代码示例>>C++>>正文


C++ SBStream::ref方法代码示例

本文整理汇总了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;
}
开发者ID:2asoft,项目名称:freebsd,代码行数:26,代码来源:SBBlock.cpp

示例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;
}
开发者ID:ATeamMac2014,项目名称:lldb,代码行数:27,代码来源:SBProcess.cpp

示例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;
}
开发者ID:BlueRiverInteractive,项目名称:lldb,代码行数:29,代码来源:SBCommandReturnObject.cpp

示例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;
}
开发者ID:ChaosJohn,项目名称:freebsd,代码行数:9,代码来源:SBFileSpec.cpp

示例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;
}
开发者ID:2trill2spill,项目名称:freebsd,代码行数:10,代码来源:SBCompileUnit.cpp

示例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;
}
开发者ID:2trill2spill,项目名称:freebsd,代码行数:10,代码来源:SBSymbolContext.cpp

示例7:

bool
SBValue::GetExpressionPath (SBStream &description)
{
    if (m_opaque_sp)
    {
        m_opaque_sp->GetExpressionPath (description.ref(), false);
        return true;
    }
    return false;
}
开发者ID:markpeek,项目名称:lldb,代码行数:10,代码来源:SBValue.cpp

示例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;
}
开发者ID:krytarowski,项目名称:lldb,代码行数:11,代码来源:SBModule.cpp

示例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;
}
开发者ID:ChaosJohn,项目名称:freebsd,代码行数:12,代码来源:SBValue.cpp

示例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;
}
开发者ID:CodaFi,项目名称:swift-lldb,代码行数:13,代码来源:SBMemoryRegionInfo.cpp

示例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;
}
开发者ID:llvm-project,项目名称:lldb,代码行数:13,代码来源:SBSymbolContext.cpp

示例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;
}
开发者ID:eightcien,项目名称:lldb,代码行数:13,代码来源:SBSymbolContext.cpp

示例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;
}
开发者ID:eightcien,项目名称:lldb,代码行数:13,代码来源:SBCompileUnit.cpp

示例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;
}
开发者ID:2trill2spill,项目名称:freebsd,代码行数:13,代码来源:SBThread.cpp

示例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;
}
开发者ID:Jean-Daniel,项目名称:lldb,代码行数:14,代码来源:SBEvent.cpp


注:本文中的SBStream::ref方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。