aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
commit5f29bb8a675e8f96452b632e7129113f7dec850e (patch)
tree3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
parent88c643b6fec27eec436c8d138fee6346e92337d6 (diff)
downloadsrc-5f29bb8a675e8f96452b632e7129113f7dec850e.tar.gz
src-5f29bb8a675e8f96452b632e7129113f7dec850e.zip
Vendor import of stripped lldb trunk r366426 (just before the release_90
Notes
Notes: svn path=/vendor/lldb/dist/; revision=351290
Diffstat (limited to 'source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h')
-rw-r--r--source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h40
1 files changed, 5 insertions, 35 deletions
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h b/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
index 2163a027ffbc..0058043017cd 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
+++ b/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
@@ -1,9 +1,8 @@
//===-- DWARFBaseDIE.h -----------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -13,13 +12,12 @@
#include "lldb/Core/dwarf.h"
#include "lldb/lldb-types.h"
-struct DIERef;
+class DIERef;
class DWARFASTParser;
class DWARFAttributes;
class DWARFUnit;
class DWARFDebugInfoEntry;
class DWARFDeclContext;
-class DWARFDIECollection;
class SymbolFileDWARF;
class DWARFBaseDIE {
@@ -39,9 +37,7 @@ public:
: m_cu(const_cast<DWARFUnit *>(cu)),
m_die(const_cast<DWARFDebugInfoEntry *>(die)) {}
- //----------------------------------------------------------------------
// Tests
- //----------------------------------------------------------------------
explicit operator bool() const { return IsValid(); }
bool IsValid() const { return m_cu && m_die; }
@@ -50,16 +46,14 @@ public:
bool Supports_DW_AT_APPLE_objc_complete_type() const;
- //----------------------------------------------------------------------
// Accessors
- //----------------------------------------------------------------------
SymbolFileDWARF *GetDWARF() const;
DWARFUnit *GetCU() const { return m_cu; }
DWARFDebugInfoEntry *GetDIE() const { return m_die; }
- DIERef GetDIERef() const;
+ llvm::Optional<DIERef> GetDIERef() const;
lldb_private::TypeSystem *GetTypeSystem() const;
@@ -79,33 +73,25 @@ public:
m_die = nullptr;
}
- //----------------------------------------------------------------------
// Get the data that contains the attribute values for this DIE. Support
// for .debug_types means that any DIE can have its data either in the
// .debug_info or the .debug_types section; this method will return the
// correct section data.
//
// Clients must validate that this object is valid before calling this.
- //----------------------------------------------------------------------
const lldb_private::DWARFDataExtractor &GetData() const;
- //----------------------------------------------------------------------
// Accessing information about a DIE
- //----------------------------------------------------------------------
dw_tag_t Tag() const;
const char *GetTagAsCString() const;
dw_offset_t GetOffset() const;
- dw_offset_t GetCompileUnitRelativeOffset() const;
-
- //----------------------------------------------------------------------
// Get the LLDB user ID for this DIE. This is often just the DIE offset,
// but it might have a SymbolFileDWARF::GetID() in the high 32 bits if
// we are doing Darwin DWARF in .o file, or DWARF stand alone debug
// info.
- //----------------------------------------------------------------------
lldb::user_id_t GetID() const;
const char *GetName() const;
@@ -114,38 +100,22 @@ public:
lldb::ModuleSP GetModule() const;
- lldb_private::CompileUnit *GetLLDBCompileUnit() const;
-
- //----------------------------------------------------------------------
// Getting attribute values from the DIE.
//
// GetAttributeValueAsXXX() functions should only be used if you are
// looking for one or two attributes on a DIE. If you are trying to
// parse all attributes, use GetAttributes (...) instead
- //----------------------------------------------------------------------
const char *GetAttributeValueAsString(const dw_attr_t attr,
const char *fail_value) const;
uint64_t GetAttributeValueAsUnsigned(const dw_attr_t attr,
uint64_t fail_value) const;
- int64_t GetAttributeValueAsSigned(const dw_attr_t attr,
- int64_t fail_value) const;
-
- uint64_t GetAttributeValueAsReference(const dw_attr_t attr,
- uint64_t fail_value) const;
-
uint64_t GetAttributeValueAsAddress(const dw_attr_t attr,
uint64_t fail_value) const;
size_t GetAttributes(DWARFAttributes &attributes, uint32_t depth = 0) const;
- //----------------------------------------------------------------------
- // Pretty printing
- //----------------------------------------------------------------------
-
- void Dump(lldb_private::Stream *s, const uint32_t recurse_depth) const;
-
protected:
DWARFUnit *m_cu;
DWARFDebugInfoEntry *m_die;