LLDB mainline
|
#include "CPlusPlusLanguage.h"
#include <cctype>
#include <cstring>
#include <functional>
#include <memory>
#include <mutex>
#include <set>
#include "llvm/ADT/StringRef.h"
#include "llvm/Demangle/ItaniumDemangle.h"
#include "lldb/Core/DemangledNameInfo.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/DataFormatters/CXXFunctionPointer.h"
#include "lldb/DataFormatters/DataVisualization.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/DataFormatters/VectorType.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/ValueObject/ValueObjectVariable.h"
#include "BlockPointer.h"
#include "CPlusPlusNameParser.h"
#include "Coroutines.h"
#include "CxxStringTypes.h"
#include "Generic.h"
#include "LibCxx.h"
#include "LibCxxAtomic.h"
#include "LibCxxVariant.h"
#include "LibStdcpp.h"
#include "MSVCUndecoratedNameParser.h"
#include "MsvcStl.h"
#include "lldb/lldb-enumerations.h"
#include "LanguageCPlusPlusProperties.inc"
#include "LanguageCPlusPlusPropertiesEnum.inc"
Go to the source code of this file.
Macros | |
#define | LLDB_PROPERTIES_language_cplusplus |
#define | LLDB_PROPERTIES_language_cplusplus |
Enumerations | |
enum |
#define LLDB_PROPERTIES_language_cplusplus |
Definition at line 2486 of file CPlusPlusLanguage.cpp.
#define LLDB_PROPERTIES_language_cplusplus |
Definition at line 2486 of file CPlusPlusLanguage.cpp.
anonymous enum |
Definition at line 2489 of file CPlusPlusLanguage.cpp.
|
static |
Definition at line 1654 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlDeque(), and lldb_private::formatters::MsvcStlDequeSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1586 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlList(), and lldb_private::formatters::MsvcStlForwardListSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1574 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlList(), and lldb_private::formatters::MsvcStlListSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1642 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlMapLike(), and lldb_private::formatters::MsvcStlMapLikeSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1599 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlOptional(), lldb_private::formatters::LibStdcppOptionalSyntheticFrontEndCreator(), and lldb_private::formatters::MsvcStlOptionalSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1523 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlSmartPointer(), lldb_private::formatters::LibStdcppSmartPointerSummaryProvider(), and lldb_private::formatters::MsvcStlSmartPointerSummaryProvider().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1512 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlSmartPointer(), lldb_private::formatters::LibStdcppSharedPtrSyntheticFrontEndCreator(), and lldb_private::formatters::MsvcStlSmartPointerSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1549 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlTuple(), lldb_private::formatters::LibStdcppTupleSyntheticFrontEndCreator(), and lldb_private::formatters::MsvcStlTupleSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1541 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlUniquePtr(), lldb_private::formatters::LibStdcppUniquePointerSummaryProvider(), and lldb_private::formatters::MsvcStlUniquePtrSummaryProvider().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1531 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlUniquePtr(), lldb_private::formatters::LibStdcppUniquePtrSyntheticFrontEndCreator(), and lldb_private::formatters::MsvcStlUniquePtrSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1629 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlUnordered(), and lldb_private::formatters::MsvcStlUnorderedSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1621 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlVariant(), lldb_private::formatters::LibStdcppVariantSummaryProvider(), and lldb_private::formatters::MsvcStlVariantSummaryProvider().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1610 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::IsMsvcStlVariant(), and lldb_private::formatters::MsvcStlVariantSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 1560 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::MsvcStlVectorSyntheticFrontEndCreator().
Referenced by LoadCommonStlFormatters().
|
static |
Definition at line 246 of file CPlusPlusLanguage.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Mangled::GetDemangledInfo(), lldb_private::Mangled::GetDemangledName(), lldb_private::Mangled::GetMangledName(), lldb_private::SymbolContext::GetPossiblyInlinedFunctionName(), and lldb_private::ConstString::GetStringRef().
Referenced by GetDemangledBasename(), GetDemangledFunctionQualifiers(), GetDemangledFunctionSuffix(), GetDemangledReturnTypeLHS(), GetDemangledReturnTypeRHS(), GetDemangledScope(), GetDemangledTemplateArguments(), and PrintDemangledArgumentList().
|
static |
Definition at line 272 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledBasename().
|
static |
Definition at line 344 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledFunctionQualifiers().
|
static |
Definition at line 410 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledFunctionSuffix().
|
static |
Definition at line 322 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledReturnTypeLHS().
|
static |
Definition at line 368 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledReturnTypeRHS().
|
static |
Definition at line 389 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledScope().
|
static |
Definition at line 301 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), and lldb_private::CPlusPlusLanguage::GetDemangledTemplateArguments().
|
static |
|
static |
Definition at line 2511 of file CPlusPlusLanguage.cpp.
|
static |
Definition at line 181 of file CPlusPlusLanguage.cpp.
Referenced by lldb_private::CPlusPlusLanguage::CxxMethodName::TrySimplifiedParse().
|
static |
Load formatters that are formatting types from more than one STL.
Definition at line 1666 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::AddCXXSummary(), lldb_private::formatters::AddCXXSynthetic(), lldb_private::formatters::ContainerSizeSummaryProvider(), lldb::eFormatterMatchRegex, GenericDequeSyntheticFrontEndCreator(), GenericForwardListSyntheticFrontEndCreator(), GenericListSyntheticFrontEndCreator(), GenericMapLikeSyntheticFrontEndCreator(), lldb_private::formatters::GenericOptionalSummaryProvider(), GenericOptionalSyntheticFrontEndCreator(), GenericSmartPointerSummaryProvider(), GenericSmartPointerSyntheticFrontEndCreator(), GenericTupleSyntheticFrontEndCreator(), GenericUniquePtrSummaryProvider(), GenericUniquePtrSyntheticFrontEndCreator(), GenericUnorderedSyntheticFrontEndCreator(), GenericVariantSummaryProvider(), GenericVariantSyntheticFrontEndCreator(), GenericVectorSyntheticFrontEndCreator(), lldb_private::formatters::IsMsvcStlStringType(), lldb_private::formatters::LibStdcppStringSummaryProvider(), lldb_private::formatters::MsvcStlStringSummaryProvider< StringElementType::ASCII >(), lldb_private::formatters::MsvcStlWStringSummaryProvider(), RegisterStdStringSummaryProvider(), lldb_private::SyntheticChildren::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren(), lldb_private::TypeSummaryImpl::Flags::SetDontShowValue(), lldb_private::SyntheticChildren::Flags::SetFrontEndWantsDereference(), lldb_private::TypeSummaryImpl::Flags::SetHideItemNames(), lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner(), lldb_private::SyntheticChildren::Flags::SetSkipPointers(), lldb_private::TypeSummaryImpl::Flags::SetSkipPointers(), lldb_private::SyntheticChildren::Flags::SetSkipReferences(), and lldb_private::TypeSummaryImpl::Flags::SetSkipReferences().
Referenced by lldb_private::CPlusPlusLanguage::GetFormatters().
|
static |
Definition at line 733 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::AddCXXSummary(), lldb_private::formatters::AddCXXSynthetic(), lldb_private::formatters::ContainerSizeSummaryProvider(), lldb::eFormatterMatchRegex, lldb_private::formatters::GenericOptionalSummaryProvider(), lldb_private::formatters::LibCxxAtomicSummaryProvider(), lldb_private::formatters::LibcxxAtomicSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxBitsetSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxChronoLocalDaysSummaryProvider(), lldb_private::formatters::LibcxxChronoLocalSecondsSummaryProvider(), lldb_private::formatters::LibcxxChronoMonthSummaryProvider(), lldb_private::formatters::LibcxxChronoSysDaysSummaryProvider(), lldb_private::formatters::LibcxxChronoSysSecondsSummaryProvider(), lldb_private::formatters::LibcxxChronoWeekdaySummaryProvider(), lldb_private::formatters::LibcxxChronoYearMonthDaySummaryProvider(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), lldb_private::formatters::LibcxxInitializerListSyntheticFrontEndCreator(), lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxOptionalSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxQueueFrontEndCreator(), lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxSmartPointerSummaryProvider(), lldb_private::formatters::LibcxxStdForwardListSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdProxyArraySyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdRangesRefViewSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdSliceArraySummaryProvider(), lldb_private::formatters::LibcxxStdSliceArraySyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdSpanSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdValarraySyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStringSummaryProviderASCII(), lldb_private::formatters::LibcxxStringSummaryProviderUTF16(), lldb_private::formatters::LibcxxStringSummaryProviderUTF32(), lldb_private::formatters::LibcxxStringViewSummaryProviderASCII(), lldb_private::formatters::LibcxxStringViewSummaryProviderUTF16(), lldb_private::formatters::LibcxxStringViewSummaryProviderUTF32(), lldb_private::formatters::LibcxxTupleFrontEndCreator(), lldb_private::formatters::LibcxxUniquePointerSummaryProvider(), lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEndCreator(), lldb_private::formatters::LibCxxUnorderedMapIteratorSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxVariantFrontEndCreator(), lldb_private::formatters::LibcxxVariantSummaryProvider(), lldb_private::formatters::LibCxxVectorIteratorSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxWStringSummaryProvider(), lldb_private::formatters::LibcxxWStringViewSummaryProvider(), lldb_private::SyntheticChildren::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren(), lldb_private::TypeSummaryImpl::Flags::SetDontShowValue(), lldb_private::SyntheticChildren::Flags::SetFrontEndWantsDereference(), lldb_private::TypeSummaryImpl::Flags::SetHideItemNames(), lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner(), lldb_private::SyntheticChildren::Flags::SetSkipPointers(), lldb_private::TypeSummaryImpl::Flags::SetSkipPointers(), lldb_private::SyntheticChildren::Flags::SetSkipReferences(), lldb_private::TypeSummaryImpl::Flags::SetSkipReferences(), lldb_private::formatters::StdlibCoroutineHandleSummaryProvider(), and lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEndCreator().
Referenced by lldb_private::CPlusPlusLanguage::GetFormatters().
|
static |
Definition at line 1336 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::AddCXXSummary(), lldb_private::formatters::AddCXXSynthetic(), lldb_private::formatters::ContainerSizeSummaryProvider(), lldb::eFormatterMatchExact, lldb::eFormatterMatchRegex, lldb_private::formatters::LibStdcppBitsetSyntheticFrontEndCreator(), lldb_private::formatters::LibstdcppMapIteratorSyntheticFrontEndCreator(), lldb_private::formatters::LibStdcppStringSummaryProvider(), lldb_private::formatters::LibStdcppUniquePtrSyntheticFrontEndCreator(), lldb_private::formatters::LibStdcppVectorIteratorSyntheticFrontEndCreator(), lldb_private::SyntheticChildren::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren(), lldb_private::TypeSummaryImpl::Flags::SetDontShowValue(), lldb_private::SyntheticChildren::Flags::SetFrontEndWantsDereference(), lldb_private::TypeSummaryImpl::Flags::SetHideItemNames(), lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner(), lldb_private::SyntheticChildren::Flags::SetSkipPointers(), lldb_private::TypeSummaryImpl::Flags::SetSkipPointers(), lldb_private::SyntheticChildren::Flags::SetSkipReferences(), lldb_private::TypeSummaryImpl::Flags::SetSkipReferences(), lldb_private::formatters::StdlibCoroutineHandleSummaryProvider(), and lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEndCreator().
Referenced by lldb_private::CPlusPlusLanguage::GetFormatters().
|
static |
Definition at line 1796 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::AddCXXSummary(), lldb_private::formatters::AddCXXSynthetic(), lldb_private::formatters::MsvcStlAtomicSummaryProvider(), lldb_private::formatters::MsvcStlAtomicSyntheticFrontEndCreator(), lldb_private::formatters::MsvcStlStringSummaryProvider(), lldb_private::formatters::MsvcStlStringViewSummaryProvider(), lldb_private::formatters::MsvcStlTreeIterSummaryProvider(), lldb_private::formatters::MsvcStlTreeIterSyntheticFrontEndCreator(), lldb_private::formatters::MsvcStlWStringViewSummaryProvider(), RegisterStdStringSummaryProvider(), RegisterStdStringViewSummaryProvider(), lldb_private::SyntheticChildren::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren(), lldb_private::TypeSummaryImpl::Flags::SetDontShowValue(), lldb_private::TypeSummaryImpl::Flags::SetHideItemNames(), lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner(), lldb_private::SyntheticChildren::Flags::SetSkipPointers(), lldb_private::TypeSummaryImpl::Flags::SetSkipPointers(), lldb_private::SyntheticChildren::Flags::SetSkipReferences(), and lldb_private::TypeSummaryImpl::Flags::SetSkipReferences().
Referenced by lldb_private::CPlusPlusLanguage::GetFormatters().
|
static |
Definition at line 1882 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::AddCXXSummary(), lldb_private::formatters::Char16StringSummaryProvider(), lldb_private::formatters::Char16SummaryProvider(), lldb_private::formatters::Char32StringSummaryProvider(), lldb_private::formatters::Char32SummaryProvider(), lldb_private::formatters::Char8StringSummaryProvider(), lldb_private::formatters::Char8SummaryProvider(), lldb_private::TypeSummaryImpl::Flags::SetCascades(), lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren(), lldb_private::TypeSummaryImpl::Flags::SetDontShowValue(), lldb_private::TypeSummaryImpl::Flags::SetHideItemNames(), lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner(), lldb_private::TypeSummaryImpl::Flags::SetSkipPointers(), lldb_private::TypeSummaryImpl::Flags::SetSkipReferences(), lldb_private::formatters::WCharStringSummaryProvider(), and lldb_private::formatters::WCharSummaryProvider().
Referenced by lldb_private::CPlusPlusLanguage::GetFormatters().
|
static |
Writes out the function name in 'full_name' to 'out_stream' but replaces each argument type with the variable name and the corresponding pretty-printed value.
Definition at line 214 of file CPlusPlusLanguage.cpp.
References lldb_private::Language::MethodName::GetQualifiers(), lldb_private::Language::MethodName::GetReturnType(), lldb_private::Language::MethodName::GetScopeQualifiedName(), lldb_private::Language::MethodName::IsValid(), lldb_private::FormatEntity::PrettyPrintFunctionArguments(), lldb_private::Stream::PutChar(), and lldb_private::Stream::PutCString().
|
static |
Definition at line 430 of file CPlusPlusLanguage.cpp.
References GetAndValidateInfo(), lldb_private::CPlusPlusLanguage::GetDemangledFunctionArguments(), lldb_private::GetLog(), lldb_private::Language, LLDB_LOG_ERROR, and lldb_private::SymbolContext::symbol.
Referenced by lldb_private::CPlusPlusLanguage::HandleFrameFormatVariable().
|
static |
Definition at line 2149 of file CPlusPlusLanguage.cpp.
References lldb_private::VariableList::AppendVariablesWithScope(), lldb_private::ConstString::AsCString(), lldb_private::Mangled::ePreferDemangled, lldb::eValueTypeVariableArgument, lldb_private::SymbolContext::function, lldb_private::ExecutionContext::GetBestExecutionContextScope(), GetFunctionVariableList(), lldb_private::Mangled::GetName(), lldb_private::SymbolContext::GetPossiblyInlinedFunctionName(), lldb_private::VariableList::GetSize(), PrettyPrintFunctionNameWithArgs(), and lldb_private::Stream::PutCString().
|
static |
Definition at line 1291 of file CPlusPlusLanguage.cpp.
References lldb::eFormatterMatchExact, and lldb::eFormatterMatchRegex.
Referenced by LoadCommonStlFormatters(), and LoadMsvcStlFormatters().
|
static |
Definition at line 1314 of file CPlusPlusLanguage.cpp.
References lldb::eFormatterMatchExact, and lldb::eFormatterMatchRegex.
Referenced by LoadMsvcStlFormatters().
|
static |
Definition at line 152 of file CPlusPlusLanguage.cpp.
Referenced by lldb_private::CPlusPlusLanguage::CxxMethodName::GetBasenameNoTemplateParameters(), and lldb_private::CPlusPlusLanguage::CxxMethodName::TrySimplifiedParse().