Exemplo n.º 1
0
Arquivo: Type.cpp Projeto: vargaz/lldb
bool TypeImpl::GetDescription(lldb_private::Stream &strm,
                              lldb::DescriptionLevel description_level) {
  ModuleSP module_sp;
  if (CheckModule(module_sp)) {
    if (m_dynamic_type.IsValid()) {
      strm.Printf("Dynamic:\n");
      m_dynamic_type.DumpTypeDescription(&strm);
      strm.Printf("\nStatic:\n");
    }
    m_static_type.GetCompilerType().DumpTypeDescription(&strm);
  } else {
    strm.PutCString("Invalid TypeImpl module for type has been deleted\n");
  }
  return true;
}
Exemplo n.º 2
0
void
DWARFMappedHash::Header::Dump (lldb_private::Stream& strm, const DIEInfo &hash_data) const
{
    const size_t num_atoms = header_data.atoms.size();
    for (size_t i=0; i<num_atoms; ++i)
    {
        if (i > 0)
            strm.PutCString (", ");
        
        DWARFFormValue form_value (NULL, header_data.atoms[i].form);
        switch (header_data.atoms[i].type)
        {
            case eAtomTypeDIEOffset:    // DIE offset, check form for encoding
                strm.Printf ("{0x%8.8x}", hash_data.offset);
                break;

            case eAtomTypeTag:          // DW_TAG value for the DIE
                {
                    const char *tag_cstr = lldb_private::DW_TAG_value_to_name (hash_data.tag);
                    if (tag_cstr)
                        strm.PutCString (tag_cstr);
                    else
                        strm.Printf ("DW_TAG_(0x%4.4x)", hash_data.tag);
                }
                break;

            case eAtomTypeTypeFlags:    // Flags from enum TypeFlags
                strm.Printf ("0x%2.2x", hash_data.type_flags);
                if (hash_data.type_flags)
                {
                    strm.PutCString (" (");
                    if (hash_data.type_flags & eTypeFlagClassIsImplementation)
                        strm.PutCString (" implementation");
                    strm.PutCString (" )");
                }
                break;

            case eAtomTypeQualNameHash:    // Flags from enum TypeFlags
                strm.Printf ("0x%8.8x", hash_data.qualified_name_hash);
                break;

            default:
                strm.Printf ("AtomType(0x%x)", header_data.atoms[i].type);
                break;
        }
    }
}
Exemplo n.º 3
0
bool
TypeImpl::GetDescription (lldb_private::Stream &strm, 
                          lldb::DescriptionLevel description_level)
{
    if (m_clang_ast_type.IsValid())
    {
        ClangASTType::DumpTypeDescription (m_clang_ast_type.GetASTContext(), 
                                           m_clang_ast_type.GetOpaqueQualType(), 
                                           &strm);
    }
    else
    {
        strm.PutCString ("No value");
    }
    return true;
}
void
GDBRemoteCommunication::History::Dump (lldb_private::Stream &strm) const
{
    const uint32_t size = GetNumPacketsInHistory ();
    const uint32_t first_idx = GetFirstSavedPacketIndex ();
    const uint32_t stop_idx = m_curr_idx + size;
    for (uint32_t i = first_idx;  i < stop_idx; ++i)
    {
        const uint32_t idx = NormalizeIndex (i);
        const Entry &entry = m_packets[idx];
        if (entry.type == ePacketTypeInvalid || entry.packet.empty())
            break;
        strm.Printf ("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s\n",
                     entry.packet_idx,
                     entry.tid,
                     entry.bytes_transmitted,
                     (entry.type == ePacketTypeSend) ? "send" : "read",
                     entry.packet.c_str());
    }
}