shafik updated this revision to Diff 412548. shafik added a comment. Updating diff based on comments
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120836/new/ https://reviews.llvm.org/D120836 Files: lldb/include/lldb/Core/dwarf.h lldb/include/lldb/Symbol/DWARFCallFrameInfo.h lldb/source/Expression/DWARFExpression.cpp lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp lldb/source/Symbol/DWARFCallFrameInfo.cpp lldb/source/Symbol/PostfixExpression.cpp lldb/unittests/Expression/DWARFExpressionTest.cpp lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
Index: lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp =================================================================== --- lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp +++ lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp @@ -39,6 +39,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; class SymbolFileDWARFTests : public testing::Test { SubsystemRAII<FileSystem, HostInfo, ObjectFilePECOFF, SymbolFileDWARF, Index: lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp =================================================================== --- lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp +++ lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp @@ -15,6 +15,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; namespace { class DWARFASTParserClangTests : public testing::Test {}; Index: lldb/unittests/Expression/DWARFExpressionTest.cpp =================================================================== --- lldb/unittests/Expression/DWARFExpressionTest.cpp +++ lldb/unittests/Expression/DWARFExpressionTest.cpp @@ -22,6 +22,7 @@ #include "gtest/gtest.h" using namespace lldb_private; +using namespace dwarf; static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr, lldb::ModuleSP module_sp = {}, Index: lldb/source/Symbol/PostfixExpression.cpp =================================================================== --- lldb/source/Symbol/PostfixExpression.cpp +++ lldb/source/Symbol/PostfixExpression.cpp @@ -18,6 +18,7 @@ using namespace lldb_private; using namespace lldb_private::postfix; +using namespace llvm::dwarf; static llvm::Optional<BinaryOpNode::OpType> GetBinaryOpType(llvm::StringRef token) { Index: lldb/source/Symbol/DWARFCallFrameInfo.cpp =================================================================== --- lldb/source/Symbol/DWARFCallFrameInfo.cpp +++ lldb/source/Symbol/DWARFCallFrameInfo.cpp @@ -24,6 +24,7 @@ using namespace lldb; using namespace lldb_private; +using namespace llvm::dwarf; // GetDwarfEHPtr // Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp =================================================================== --- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -80,6 +80,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; using namespace clang; using llvm::StringSwitch; Index: lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp +++ lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp @@ -25,6 +25,7 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::npdb; +using namespace lldb_private::dwarf; using namespace llvm::pdb; static std::unique_ptr<IPDBFrameData> Index: lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp @@ -10,6 +10,8 @@ #include "lldb/Core/Declaration.h" +using namespace lldb_private::dwarf; + bool UniqueDWARFASTTypeList::Find(const DWARFDIE &die, const lldb_private::Declaration &decl, const int32_t byte_size, Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -96,6 +96,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; LLDB_PLUGIN_DEFINE(SymbolFileDWARF) Index: lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp @@ -25,6 +25,7 @@ using namespace lldb_private; using namespace lldb; +using namespace dwarf; void ManualDWARFIndex::Index() { if (m_indexed) Index: lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp @@ -9,6 +9,8 @@ #include "HashedNameToDIE.h" #include "llvm/ADT/StringRef.h" +using namespace lldb_private::dwarf; + bool DWARFMappedHash::ExtractDIEArray( const DIEInfoArray &die_info_array, llvm::function_ref<bool(DIERef ref)> callback) { Index: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp @@ -16,6 +16,7 @@ using namespace lldb_private; using namespace lldb; +using namespace dwarf; llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>> DebugNamesDWARFIndex::Create(Module &module, DWARFDataExtractor debug_names, Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h @@ -69,7 +69,8 @@ dw_offset_t GetTypeOffset() const { return m_type_offset; } uint64_t GetDWOId() const { return m_dwo_id; } bool IsTypeUnit() const { - return m_unit_type == DW_UT_type || m_unit_type == DW_UT_split_type; + return m_unit_type == llvm::dwarf::DW_UT_type || + m_unit_type == llvm::dwarf::DW_UT_split_type; } uint32_t GetNextUnitOffset() const { return m_offset + m_length + 4; } Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -25,6 +25,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; using namespace std; extern int g_verbose; Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -20,6 +20,7 @@ class DWARFUnit; using namespace lldb_private; +using namespace dwarf; void DWARFFormValue::Clear() { m_unit = nullptr; Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp @@ -8,6 +8,8 @@ #include "DWARFDeclContext.h" +using namespace lldb_private::dwarf; + const char *DWARFDeclContext::GetQualifiedName() const { if (m_qualified_name.empty()) { // The declaration context array for a class named "foo" in namespace Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp @@ -14,6 +14,7 @@ #include "DWARFDataExtractor.h" using namespace lldb_private; +using namespace dwarf; DWARFDebugMacroHeader DWARFDebugMacroHeader::ParseHeader(const DWARFDataExtractor &debug_macro_data, Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -31,6 +31,7 @@ #include "SymbolFileDWARFDwo.h" using namespace lldb_private; +using namespace dwarf; using namespace std; extern int g_verbose; Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -15,6 +15,7 @@ #include "DWARFUnit.h" using namespace lldb_private; +using namespace dwarf; namespace { Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp @@ -10,6 +10,8 @@ #include "DWARFUnit.h" #include "DWARFDebugInfo.h" +using namespace lldb_private::dwarf; + DWARFAttributes::DWARFAttributes() : m_infos() {} DWARFAttributes::~DWARFAttributes() = default; Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp @@ -16,6 +16,7 @@ #include "DWARFFormValue.h" using namespace lldb_private; +using namespace dwarf; DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration() : m_attributes() {} Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -57,6 +57,7 @@ using namespace lldb; using namespace lldb_private; +using namespace dwarf; DWARFASTParserClang::DWARFASTParserClang(TypeSystemClang &ast) : m_ast(ast), m_die_to_decl_ctx(), m_decl_ctx_to_die() {} Index: lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp @@ -16,6 +16,7 @@ using namespace lldb_private; using namespace lldb; +using namespace dwarf; std::unique_ptr<AppleDWARFIndex> AppleDWARFIndex::Create( Module &module, DWARFDataExtractor apple_names, Index: lldb/source/Expression/DWARFExpression.cpp =================================================================== --- lldb/source/Expression/DWARFExpression.cpp +++ lldb/source/Expression/DWARFExpression.cpp @@ -43,6 +43,7 @@ using namespace lldb; using namespace lldb_private; +using namespace llvm::dwarf; static lldb::addr_t ReadAddressFromDebugAddrSection(const DWARFUnit *dwarf_cu, Index: lldb/include/lldb/Symbol/DWARFCallFrameInfo.h =================================================================== --- lldb/include/lldb/Symbol/DWARFCallFrameInfo.h +++ lldb/include/lldb/Symbol/DWARFCallFrameInfo.h @@ -106,7 +106,8 @@ CIE(dw_offset_t offset) : cie_offset(offset), version(-1), code_align(0), data_align(0), return_addr_reg_num(LLDB_INVALID_REGNUM), inst_offset(0), - inst_length(0), ptr_encoding(0), lsda_addr_encoding(DW_EH_PE_omit), + inst_length(0), ptr_encoding(0), + lsda_addr_encoding(llvm::dwarf::DW_EH_PE_omit), personality_loc(LLDB_INVALID_ADDRESS) {} }; Index: lldb/include/lldb/Core/dwarf.h =================================================================== --- lldb/include/lldb/Core/dwarf.h +++ lldb/include/lldb/Core/dwarf.h @@ -15,8 +15,11 @@ // Get the DWARF constant definitions from llvm #include "llvm/BinaryFormat/Dwarf.h" -// and stuff them in our default namespace -using namespace llvm::dwarf; +namespace lldb_private { +namespace dwarf { + using namespace llvm::dwarf; +} +} typedef uint32_t dw_uleb128_t; typedef int32_t dw_sleb128_t;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits