diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
3 files changed, 22 insertions, 12 deletions
| diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 82e9d86..c049829 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -450,6 +450,10 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) {        byte_size = form_value.Unsigned();        break; +    case DW_AT_bit_size: +      data_bit_size = form_value.Unsigned(); +      break; +      case DW_AT_alignment:        alignment = form_value.Unsigned();        break; @@ -1901,6 +1905,17 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,          m_ast.CreateClassTemplateSpecializationDecl(              containing_decl_ctx, GetOwningClangModule(die), class_template_decl,              tag_decl_kind, template_param_infos); +    if (!class_specialization_decl) { +      if (log) { +        dwarf->GetObjectFile()->GetModule()->LogMessage( +            log, +            "SymbolFileDWARF({0:p}) - Failed to create specialization for " +            "clang::ClassTemplateDecl({1}, {2:p}).", +            this, llvm::StringRef(attrs.name), class_template_decl); +      } +      return TypeSP(); +    } +      clang_type =          m_ast.CreateClassTemplateSpecializationType(class_specialization_decl); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h index da58f4c..f5f7071 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h @@ -574,6 +574,7 @@ struct ParsedDWARFTypeAttributes {    lldb_private::plugin::dwarf::DWARFFormValue type;    lldb::LanguageType class_language = lldb::eLanguageTypeUnknown;    std::optional<uint64_t> byte_size; +  std::optional<uint64_t> data_bit_size;    std::optional<uint64_t> alignment;    size_t calling_convention = llvm::dwarf::DW_CC_normal;    uint32_t bit_stride = 0; diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp index 3b936c0..0ccb1804 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -83,8 +83,8 @@ constexpr OptionEnumValueElement g_pdb_reader_enums[] = {      {          ePDBReaderDefault,          "default", -        "Use DIA PDB reader unless LLDB_USE_NATIVE_PDB_READER environment " -        "variable is set", +        "Use native PDB reader unless LLDB_USE_NATIVE_PDB_READER environment " +        "is set to 0",      },      {          ePDBReaderDIA, @@ -109,16 +109,10 @@ enum {  static const bool g_should_use_native_reader_by_default = [] {    llvm::StringRef env_value = ::getenv("LLDB_USE_NATIVE_PDB_READER"); -#if !LLVM_ENABLE_DIA_SDK || !defined(_WIN32) -  // if the environment value is unset, the native reader is requested -  if (env_value.empty()) -    return true; -#endif - -  return env_value.equals_insensitive("on") || -         env_value.equals_insensitive("yes") || -         env_value.equals_insensitive("1") || -         env_value.equals_insensitive("true"); +  return !env_value.equals_insensitive("off") && +         !env_value.equals_insensitive("no") && +         !env_value.equals_insensitive("0") && +         !env_value.equals_insensitive("false");  }();  class PluginProperties : public Properties { | 
