aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Symbol
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
commit94994d372d014ce4c8758b9605d63fae651bd8aa (patch)
tree51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /include/lldb/Symbol
parent39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff)
downloadsrc-94994d372d014ce4c8758b9605d63fae651bd8aa.tar.gz
src-94994d372d014ce4c8758b9605d63fae651bd8aa.zip
Vendor import of lldb trunk r351319 (just before the release_80 branchvendor/lldb/lldb-trunk-r351319
Notes
Notes: svn path=/vendor/lldb/dist/; revision=343181 svn path=/vendor/lldb/lldb-trunk-r351319/; revision=343182; tag=vendor/lldb/lldb-trunk-r351319
Diffstat (limited to 'include/lldb/Symbol')
-rw-r--r--include/lldb/Symbol/Block.h12
-rw-r--r--include/lldb/Symbol/ClangASTContext.h73
-rw-r--r--include/lldb/Symbol/ClangASTImporter.h4
-rw-r--r--include/lldb/Symbol/ClangExternalASTSourceCallbacks.h4
-rw-r--r--include/lldb/Symbol/ClangExternalASTSourceCommon.h4
-rw-r--r--include/lldb/Symbol/ClangUtil.h6
-rw-r--r--include/lldb/Symbol/CompileUnit.h35
-rw-r--r--include/lldb/Symbol/CompilerType.h14
-rw-r--r--include/lldb/Symbol/DebugMacros.h4
-rw-r--r--include/lldb/Symbol/Function.h109
-rw-r--r--include/lldb/Symbol/GoASTContext.h421
-rw-r--r--include/lldb/Symbol/JavaASTContext.h350
-rw-r--r--include/lldb/Symbol/LineTable.h59
-rw-r--r--include/lldb/Symbol/OCamlASTContext.h318
-rw-r--r--include/lldb/Symbol/ObjectContainer.h4
-rw-r--r--include/lldb/Symbol/ObjectFile.h46
-rw-r--r--include/lldb/Symbol/SymbolContext.h22
-rw-r--r--include/lldb/Symbol/SymbolContextScope.h4
-rw-r--r--include/lldb/Symbol/SymbolFile.h83
-rw-r--r--include/lldb/Symbol/SymbolVendor.h42
-rw-r--r--include/lldb/Symbol/Symtab.h13
-rw-r--r--include/lldb/Symbol/TypeSystem.h11
-rw-r--r--include/lldb/Symbol/UnwindPlan.h64
-rw-r--r--include/lldb/Symbol/UnwindTable.h2
24 files changed, 366 insertions, 1338 deletions
diff --git a/include/lldb/Symbol/Block.h b/include/lldb/Symbol/Block.h
index 1664362431f9..2428a1d3ffca 100644
--- a/include/lldb/Symbol/Block.h
+++ b/include/lldb/Symbol/Block.h
@@ -10,12 +10,8 @@
#ifndef liblldb_Block_h_
#define liblldb_Block_h_
-// C Includes
-// C++ Includes
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/AddressRange.h"
#include "lldb/Core/RangeMap.h"
#include "lldb/Symbol/CompilerType.h"
@@ -327,6 +323,14 @@ public:
return m_inlineInfoSP.get();
}
+ //------------------------------------------------------------------
+ /// Get the symbol file which contains debug info for this block's
+ /// symbol context module.
+ ///
+ /// @return A pointer to the symbol file or nullptr.
+ //------------------------------------------------------------------
+ SymbolFile *GetSymbolFile();
+
CompilerDeclContext GetDeclContext();
//------------------------------------------------------------------
diff --git a/include/lldb/Symbol/ClangASTContext.h b/include/lldb/Symbol/ClangASTContext.h
index 9364149d98e7..4cff9b256570 100644
--- a/include/lldb/Symbol/ClangASTContext.h
+++ b/include/lldb/Symbol/ClangASTContext.h
@@ -10,10 +10,8 @@
#ifndef liblldb_ClangASTContext_h_
#define liblldb_ClangASTContext_h_
-// C Includes
#include <stdint.h>
-// C++ Includes
#include <functional>
#include <initializer_list>
#include <map>
@@ -23,13 +21,12 @@
#include <utility>
#include <vector>
-// Other libraries and framework includes
#include "clang/AST/ASTContext.h"
#include "clang/AST/ExternalASTMerger.h"
#include "clang/AST/TemplateBase.h"
+#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/SmallVector.h"
-// Project includes
#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
#include "lldb/Core/ClangForward.h"
#include "lldb/Symbol/CompilerType.h"
@@ -214,19 +211,24 @@ public:
static CompilerType GetTypeForDecl(clang::ObjCInterfaceDecl *objc_decl);
template <typename RecordDeclType>
- CompilerType GetTypeForIdentifier(const ConstString &type_name) {
+ CompilerType
+ GetTypeForIdentifier(const ConstString &type_name,
+ clang::DeclContext *decl_context = nullptr) {
CompilerType compiler_type;
if (type_name.GetLength()) {
clang::ASTContext *ast = getASTContext();
if (ast) {
+ if (!decl_context)
+ decl_context = ast->getTranslationUnitDecl();
+
clang::IdentifierInfo &myIdent =
ast->Idents.get(type_name.GetCString());
clang::DeclarationName myName =
ast->DeclarationNames.getIdentifier(&myIdent);
clang::DeclContext::lookup_result result =
- ast->getTranslationUnitDecl()->lookup(myName);
+ decl_context->lookup(myName);
if (!result.empty()) {
clang::NamedDecl *named_decl = result[0];
@@ -372,7 +374,17 @@ public:
const CompilerType &result_type,
const CompilerType *args,
unsigned num_args, bool is_variadic,
- unsigned type_quals);
+ unsigned type_quals,
+ clang::CallingConv cc);
+
+ static CompilerType CreateFunctionType(clang::ASTContext *ast,
+ const CompilerType &result_type,
+ const CompilerType *args,
+ unsigned num_args, bool is_variadic,
+ unsigned type_quals) {
+ return ClangASTContext::CreateFunctionType(
+ ast, result_type, args, num_args, is_variadic, type_quals, clang::CC_C);
+ }
CompilerType CreateFunctionType(const CompilerType &result_type,
const CompilerType *args, unsigned num_args,
@@ -381,7 +393,17 @@ public:
getASTContext(), result_type, args, num_args, is_variadic, type_quals);
}
- clang::ParmVarDecl *CreateParameterDeclaration(const char *name,
+ CompilerType CreateFunctionType(const CompilerType &result_type,
+ const CompilerType *args, unsigned num_args,
+ bool is_variadic, unsigned type_quals,
+ clang::CallingConv cc) {
+ return ClangASTContext::CreateFunctionType(getASTContext(), result_type,
+ args, num_args, is_variadic,
+ type_quals, cc);
+ }
+
+ clang::ParmVarDecl *CreateParameterDeclaration(clang::DeclContext *decl_ctx,
+ const char *name,
const CompilerType &param_type,
int storage);
@@ -720,7 +742,8 @@ public:
size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) override;
uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
- bool omit_empty_base_classes) override;
+ bool omit_empty_base_classes,
+ const ExecutionContext *exe_ctx) override;
CompilerType GetBuiltinTypeByName(const ConstString &name) override;
@@ -809,7 +832,7 @@ public:
// Modifying RecordType
//----------------------------------------------------------------------
static clang::FieldDecl *AddFieldToRecordType(const CompilerType &type,
- const char *name,
+ llvm::StringRef name,
const CompilerType &field_type,
lldb::AccessType access,
uint32_t bitfield_bit_size);
@@ -819,7 +842,7 @@ public:
static void SetIsPacked(const CompilerType &type);
static clang::VarDecl *AddVariableToRecordType(const CompilerType &type,
- const char *name,
+ llvm::StringRef name,
const CompilerType &var_type,
lldb::AccessType access);
@@ -831,19 +854,17 @@ public:
bool is_static, bool is_inline, bool is_explicit,
bool is_attr_used, bool is_artificial);
+ void AddMethodOverridesForCXXRecordType(lldb::opaque_compiler_type_t type);
+
// C++ Base Classes
- clang::CXXBaseSpecifier *
+ std::unique_ptr<clang::CXXBaseSpecifier>
CreateBaseClassSpecifier(lldb::opaque_compiler_type_t type,
lldb::AccessType access, bool is_virtual,
bool base_of_class);
- static void DeleteBaseClassSpecifiers(clang::CXXBaseSpecifier **base_classes,
- unsigned num_base_classes);
-
- bool
- SetBaseClassesForClassType(lldb::opaque_compiler_type_t type,
- clang::CXXBaseSpecifier const *const *base_classes,
- unsigned num_base_classes);
+ bool TransferBaseClasses(
+ lldb::opaque_compiler_type_t type,
+ std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases);
static bool SetObjCSuperClass(const CompilerType &type,
const CompilerType &superclass_compiler_type);
@@ -879,10 +900,12 @@ public:
//----------------------------------------------------------------------
// Modifying Enumeration types
//----------------------------------------------------------------------
- bool AddEnumerationValueToEnumerationType(
- lldb::opaque_compiler_type_t type,
- const CompilerType &enumerator_qual_type, const Declaration &decl,
- const char *name, int64_t enum_value, uint32_t enum_value_bit_size);
+ clang::EnumConstantDecl *AddEnumerationValueToEnumerationType(
+ const CompilerType &enum_type, const Declaration &decl, const char *name,
+ int64_t enum_value, uint32_t enum_value_bit_size);
+ clang::EnumConstantDecl *AddEnumerationValueToEnumerationType(
+ const CompilerType &enum_type, const Declaration &decl, const char *name,
+ const llvm::APSInt &value);
CompilerType GetEnumerationIntegerType(lldb::opaque_compiler_type_t type);
@@ -904,6 +927,8 @@ public:
//----------------------------------------------------------------------
// Dumping types
//----------------------------------------------------------------------
+ void Dump(Stream &s);
+
void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
Stream *s, lldb::Format format, const DataExtractor &data,
lldb::offset_t data_offset, size_t data_byte_size,
@@ -935,6 +960,8 @@ public:
static clang::TagDecl *GetAsTagDecl(const CompilerType &type);
+ static clang::TypedefNameDecl *GetAsTypedefDecl(const CompilerType &type);
+
clang::CXXRecordDecl *GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type);
static clang::ObjCInterfaceDecl *
diff --git a/include/lldb/Symbol/ClangASTImporter.h b/include/lldb/Symbol/ClangASTImporter.h
index 52a164a1d2dd..465d7e24a1e7 100644
--- a/include/lldb/Symbol/ClangASTImporter.h
+++ b/include/lldb/Symbol/ClangASTImporter.h
@@ -10,14 +10,11 @@
#ifndef liblldb_ClangASTImporter_h_
#define liblldb_ClangASTImporter_h_
-// C Includes
-// C++ Includes
#include <map>
#include <memory>
#include <set>
#include <vector>
-// Other libraries and framework includes
#include "clang/AST/ASTImporter.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Decl.h"
@@ -25,7 +22,6 @@
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
-// Project includes
#include "lldb/Symbol/CompilerDeclContext.h"
#include "lldb/lldb-types.h"
diff --git a/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h b/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
index ef0010314e1d..c077665e51ee 100644
--- a/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
+++ b/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
@@ -10,15 +10,11 @@
#ifndef liblldb_ClangExternalASTSourceCallbacks_h_
#define liblldb_ClangExternalASTSourceCallbacks_h_
-// C Includes
#include <stdint.h>
-// C++ Includes
-// Other libraries and framework includes
#include "clang/AST/CharUnits.h"
#include "llvm/ADT/DenseMap.h"
-// Project includes
#include "lldb/Core/ClangForward.h"
#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
#include "lldb/Symbol/CompilerType.h"
diff --git a/include/lldb/Symbol/ClangExternalASTSourceCommon.h b/include/lldb/Symbol/ClangExternalASTSourceCommon.h
index 3e700ba2439c..894c91f157da 100644
--- a/include/lldb/Symbol/ClangExternalASTSourceCommon.h
+++ b/include/lldb/Symbol/ClangExternalASTSourceCommon.h
@@ -20,7 +20,6 @@
// file. So we have to define NDEBUG when including clang headers to avoid any
// mismatches. This is covered by rdar://problem/8691220
-// C Includes
#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
#define LLDB_DEFINED_NDEBUG_FOR_CLANG
#define NDEBUG
@@ -35,11 +34,8 @@
#include <assert.h>
#endif
-// C++ Includes
-// Other libraries and framework includes
#include "clang/AST/ExternalASTSource.h"
-// Project includes
#include "lldb/Core/dwarf.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-enumerations.h"
diff --git a/include/lldb/Symbol/ClangUtil.h b/include/lldb/Symbol/ClangUtil.h
index cb380221152a..c8638f782548 100644
--- a/include/lldb/Symbol/ClangUtil.h
+++ b/include/lldb/Symbol/ClangUtil.h
@@ -16,6 +16,10 @@
#include "lldb/Symbol/CompilerType.h"
+namespace clang {
+class TagDecl;
+}
+
namespace lldb_private {
struct ClangUtil {
static bool IsClangType(const CompilerType &ct);
@@ -25,6 +29,8 @@ struct ClangUtil {
static clang::QualType GetCanonicalQualType(const CompilerType &ct);
static CompilerType RemoveFastQualifiers(const CompilerType &ct);
+
+ static clang::TagDecl *GetAsTagDecl(const CompilerType &type);
};
}
diff --git a/include/lldb/Symbol/CompileUnit.h b/include/lldb/Symbol/CompileUnit.h
index b816439cee13..a4d19cd3d8ae 100644
--- a/include/lldb/Symbol/CompileUnit.h
+++ b/include/lldb/Symbol/CompileUnit.h
@@ -18,6 +18,8 @@
#include "lldb/Utility/UserID.h"
#include "lldb/lldb-enumerations.h"
+#include "llvm/ADT/DenseMap.h"
+
namespace lldb_private {
//----------------------------------------------------------------------
/// @class CompileUnit CompileUnit.h "lldb/Symbol/CompileUnit.h"
@@ -163,21 +165,19 @@ public:
void GetDescription(Stream *s, lldb::DescriptionLevel level) const;
//------------------------------------------------------------------
- /// Get a shared pointer to a function in this compile unit by index.
+ /// Apply a lambda to each function in this compile unit.
///
- /// Typically called when iterating though all functions in a compile unit
- /// after all functions have been parsed. This provides raw access to the
- /// function shared pointer list and will not cause the SymbolFile plug-in
- /// to parse any unparsed functions.
+ /// This provides raw access to the function shared pointer list and will not
+ /// cause the SymbolFile plug-in to parse any unparsed functions.
///
- /// @param[in] idx
- /// An index into the function list.
+ /// @note Prefer using FindFunctionByUID over this if possible.
///
- /// @return
- /// A shared pointer to a function that might contain a NULL
- /// Function class pointer.
+ /// @param[in] lambda
+ /// The lambda that should be applied to every function. The lambda can
+ /// return true if the iteration should be aborted earlier.
//------------------------------------------------------------------
- lldb::FunctionSP GetFunctionAtIndex(size_t idx);
+ void ForeachFunction(
+ llvm::function_ref<bool(const lldb::FunctionSP &)> lambda) const;
//------------------------------------------------------------------
/// Dump the compile unit contents to the stream \a s.
@@ -391,7 +391,7 @@ public:
//------------------------------------------------------------------
uint32_t ResolveSymbolContext(const FileSpec &file_spec, uint32_t line,
bool check_inlines, bool exact,
- uint32_t resolve_scope,
+ lldb::SymbolContextItem resolve_scope,
SymbolContextList &sc_list);
//------------------------------------------------------------------
@@ -409,15 +409,20 @@ public:
//------------------------------------------------------------------
bool GetIsOptimized();
+ //------------------------------------------------------------------
+ /// Returns the number of functions in this compile unit
+ //------------------------------------------------------------------
+ size_t GetNumFunctions() const { return m_functions_by_uid.size(); }
+
protected:
void *m_user_data; ///< User data for the SymbolFile parser to store
///information into.
lldb::LanguageType
m_language; ///< The programming language enumeration value.
Flags m_flags; ///< Compile unit flags that help with partial parsing.
- std::vector<lldb::FunctionSP> m_functions; ///< The sparsely populated list of
- ///shared pointers to functions
- ///< that gets populated as functions get partially parsed.
+
+ /// Maps UIDs to functions.
+ llvm::DenseMap<lldb::user_id_t, lldb::FunctionSP> m_functions_by_uid;
std::vector<ConstString> m_imported_modules; ///< All modules, including the
///current module, imported by
///this
diff --git a/include/lldb/Symbol/CompilerType.h b/include/lldb/Symbol/CompilerType.h
index 1170832a7396..353313d8e2a3 100644
--- a/include/lldb/Symbol/CompilerType.h
+++ b/include/lldb/Symbol/CompilerType.h
@@ -10,14 +10,10 @@
#ifndef liblldb_CompilerType_h_
#define liblldb_CompilerType_h_
-// C Includes
-// C++ Includes
#include <functional>
#include <string>
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/ClangForward.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/APSInt.h"
@@ -291,9 +287,10 @@ public:
struct IntegralTemplateArgument;
- uint64_t GetByteSize(ExecutionContextScope *exe_scope) const;
-
- uint64_t GetBitSize(ExecutionContextScope *exe_scope) const;
+ /// Return the size of the type in bytes.
+ llvm::Optional<uint64_t> GetByteSize(ExecutionContextScope *exe_scope) const;
+ /// Return the size of the type in bits.
+ llvm::Optional<uint64_t> GetBitSize(ExecutionContextScope *exe_scope) const;
lldb::Encoding GetEncoding(uint64_t &count) const;
@@ -301,7 +298,8 @@ public:
size_t GetTypeBitAlign() const;
- uint32_t GetNumChildren(bool omit_empty_base_classes) const;
+ uint32_t GetNumChildren(bool omit_empty_base_classes,
+ const ExecutionContext *exe_ctx) const;
lldb::BasicType GetBasicTypeEnumeration() const;
diff --git a/include/lldb/Symbol/DebugMacros.h b/include/lldb/Symbol/DebugMacros.h
index 640da027cd59..86700994fbcc 100644
--- a/include/lldb/Symbol/DebugMacros.h
+++ b/include/lldb/Symbol/DebugMacros.h
@@ -10,13 +10,9 @@
#ifndef liblldb_DebugMacros_h_
#define liblldb_DebugMacros_h_
-// C Includes
-// C++ Includes
#include <memory>
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-private.h"
diff --git a/include/lldb/Symbol/Function.h b/include/lldb/Symbol/Function.h
index 28c6b4857b10..447abd2e6f78 100644
--- a/include/lldb/Symbol/Function.h
+++ b/include/lldb/Symbol/Function.h
@@ -16,6 +16,7 @@
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Declaration.h"
#include "lldb/Utility/UserID.h"
+#include "llvm/ADT/ArrayRef.h"
namespace lldb_private {
@@ -290,6 +291,64 @@ private:
Declaration m_call_decl;
};
+class Function;
+
+//----------------------------------------------------------------------
+/// @class CallEdge Function.h "lldb/Symbol/Function.h"
+///
+/// Represent a call made within a Function. This can be used to find a path
+/// in the call graph between two functions.
+//----------------------------------------------------------------------
+class CallEdge {
+public:
+ /// Construct a call edge using a symbol name to identify the calling
+ /// function, and a return PC within the calling function to identify a
+ /// specific call site.
+ ///
+ /// TODO: A symbol name may not be globally unique. To disambiguate ODR
+ /// conflicts, it's necessary to determine the \c Target a call edge is
+ /// associated with before resolving it.
+ CallEdge(const char *symbol_name, lldb::addr_t return_pc);
+
+ CallEdge(CallEdge &&) = default;
+ CallEdge &operator=(CallEdge &&) = default;
+
+ /// Get the callee's definition.
+ ///
+ /// Note that this might lazily invoke the DWARF parser.
+ Function *GetCallee(ModuleList &images);
+
+ /// Get the load PC address of the instruction which executes after the call
+ /// returns. Returns LLDB_INVALID_ADDRESS iff this is a tail call. \p caller
+ /// is the Function containing this call, and \p target is the Target which
+ /// made the call.
+ lldb::addr_t GetReturnPCAddress(Function &caller, Target &target) const;
+
+ /// Like \ref GetReturnPCAddress, but returns an unslid function-local PC
+ /// offset.
+ lldb::addr_t GetUnresolvedReturnPCAddress() const { return return_pc; }
+
+private:
+ void ParseSymbolFileAndResolve(ModuleList &images);
+
+ /// Either the callee's mangled name or its definition, discriminated by
+ /// \ref resolved.
+ union {
+ const char *symbol_name;
+ Function *def;
+ } lazy_callee;
+
+ /// An invalid address if this is a tail call. Otherwise, the function-local
+ /// PC offset. Adding this PC offset to the function's base load address
+ /// gives the return PC for the call.
+ lldb::addr_t return_pc;
+
+ /// Whether or not an attempt was made to find the callee's definition.
+ bool resolved;
+
+ DISALLOW_COPY_AND_ASSIGN(CallEdge);
+};
+
//----------------------------------------------------------------------
/// @class Function Function.h "lldb/Symbol/Function.h"
/// A class that describes a function.
@@ -349,40 +408,6 @@ public:
Type *func_type, const AddressRange &range);
//------------------------------------------------------------------
- /// Construct with a compile unit, function UID, function type UID, optional
- /// mangled name, function type, and a section offset based address range.
- ///
- /// @param[in] comp_unit
- /// The compile unit to which this function belongs.
- ///
- /// @param[in] func_uid
- /// The UID for this function. This value is provided by the
- /// SymbolFile plug-in and can be any value that allows
- /// the plug-in to quickly find and parse more detailed
- /// information when and if more information is needed.
- ///
- /// @param[in] func_type_uid
- /// The type UID for the function Type to allow for lazy type
- /// parsing from the debug information.
- ///
- /// @param[in] mangled
- /// The optional mangled name for this function. If empty, there
- /// is no mangled information.
- ///
- /// @param[in] func_type
- /// The optional function type. If NULL, the function type will
- /// be parsed on demand when accessed using the
- /// Function::GetType() function by asking the SymbolFile
- /// plug-in to get the type for \a func_type_uid.
- ///
- /// @param[in] range
- /// The section offset based address for this function.
- //------------------------------------------------------------------
- Function(CompileUnit *comp_unit, lldb::user_id_t func_uid,
- lldb::user_id_t func_type_uid, const char *mangled, Type *func_type,
- const AddressRange &range);
-
- //------------------------------------------------------------------
/// Destructor.
//------------------------------------------------------------------
~Function() override;
@@ -431,6 +456,18 @@ public:
void GetEndLineSourceInfo(FileSpec &source_file, uint32_t &line_no);
//------------------------------------------------------------------
+ /// Get the outgoing call edges from this function, sorted by their return
+ /// PC addresses (in increasing order).
+ //------------------------------------------------------------------
+ llvm::MutableArrayRef<CallEdge> GetCallEdges();
+
+ //------------------------------------------------------------------
+ /// Get the outgoing tail-calling edges from this function. If none exist,
+ /// return None.
+ //------------------------------------------------------------------
+ llvm::MutableArrayRef<CallEdge> GetTailCallingEdges();
+
+ //------------------------------------------------------------------
/// Get accessor for the block list.
///
/// @return
@@ -621,6 +658,10 @@ protected:
Flags m_flags;
uint32_t
m_prologue_byte_size; ///< Compute the prologue size once and cache it
+
+ bool m_call_edges_resolved = false; ///< Whether call site info has been
+ /// parsed.
+ std::vector<CallEdge> m_call_edges; ///< Outgoing call edges.
private:
DISALLOW_COPY_AND_ASSIGN(Function);
};
diff --git a/include/lldb/Symbol/GoASTContext.h b/include/lldb/Symbol/GoASTContext.h
deleted file mode 100644
index 29c8cdceacff..000000000000
--- a/include/lldb/Symbol/GoASTContext.h
+++ /dev/null
@@ -1,421 +0,0 @@
-//===-- GoASTContext.h ------------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_GoASTContext_h_
-#define liblldb_GoASTContext_h_
-
-// C Includes
-// C++ Includes
-#include <map>
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Symbol/CompilerType.h"
-#include "lldb/Symbol/TypeSystem.h"
-#include "lldb/Utility/ConstString.h"
-
-namespace lldb_private {
-
-class Declaration;
-class GoType;
-
-class GoASTContext : public TypeSystem {
-public:
- GoASTContext();
- ~GoASTContext() override;
-
- //------------------------------------------------------------------
- // PluginInterface functions
- //------------------------------------------------------------------
- ConstString GetPluginName() override;
-
- uint32_t GetPluginVersion() override;
-
- static ConstString GetPluginNameStatic();
-
- static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
- Module *module, Target *target);
-
- static void EnumerateSupportedLanguages(
- std::set<lldb::LanguageType> &languages_for_types,
- std::set<lldb::LanguageType> &languages_for_expressions);
-
- static void Initialize();
-
- static void Terminate();
-
- DWARFASTParser *GetDWARFParser() override;
-
- void SetAddressByteSize(int byte_size) { m_pointer_byte_size = byte_size; }
-
- //------------------------------------------------------------------
- // llvm casting support
- //------------------------------------------------------------------
- static bool classof(const TypeSystem *ts) {
- return ts->getKind() == TypeSystem::eKindGo;
- }
-
- //----------------------------------------------------------------------
- // CompilerDecl functions
- //----------------------------------------------------------------------
- ConstString DeclGetName(void *opaque_decl) override { return ConstString(); }
-
- //----------------------------------------------------------------------
- // CompilerDeclContext functions
- //----------------------------------------------------------------------
-
- bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override {
- return false;
- }
-
- ConstString DeclContextGetName(void *opaque_decl_ctx) override {
- return ConstString();
- }
-
- ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override {
- return ConstString();
- }
-
- bool
- DeclContextIsClassMethod(void *opaque_decl_ctx,
- lldb::LanguageType *language_ptr,
- bool *is_instance_method_ptr,
- ConstString *language_object_name_ptr) override {
- return false;
- }
-
- //----------------------------------------------------------------------
- // Creating Types
- //----------------------------------------------------------------------
-
- CompilerType CreateArrayType(const ConstString &name,
- const CompilerType &element_type,
- uint64_t length);
-
- CompilerType CreateBaseType(int go_kind,
- const ConstString &type_name_const_str,
- uint64_t byte_size);
-
- // For interface, map, chan.
- CompilerType CreateTypedefType(int kind, const ConstString &name,
- CompilerType impl);
-
- CompilerType CreateVoidType(const ConstString &name);
- CompilerType CreateFunctionType(const lldb_private::ConstString &name,
- CompilerType *params, size_t params_count,
- bool is_variadic);
-
- CompilerType CreateStructType(int kind, const ConstString &name,
- uint32_t byte_size);
-
- void CompleteStructType(const CompilerType &type);
-
- void AddFieldToStruct(const CompilerType &struct_type,
- const ConstString &name, const CompilerType &field_type,
- uint32_t byte_offset);
-
- //----------------------------------------------------------------------
- // Tests
- //----------------------------------------------------------------------
-
- static bool IsGoString(const CompilerType &type);
- static bool IsGoSlice(const CompilerType &type);
- static bool IsGoInterface(const CompilerType &type);
- static bool IsDirectIface(uint8_t kind);
- static bool IsPointerKind(uint8_t kind);
-
- bool IsArrayType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size,
- bool *is_incomplete) override;
-
- bool IsAggregateType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCharType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCompleteType(lldb::opaque_compiler_type_t type) override;
-
- bool IsDefined(lldb::opaque_compiler_type_t type) override;
-
- bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count,
- bool &is_complex) override;
-
- bool IsFunctionType(lldb::opaque_compiler_type_t type,
- bool *is_variadic_ptr = nullptr) override;
-
- size_t
- GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type,
- const size_t index) override;
-
- bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) override;
-
- bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *function_pointer_type_ptr) override;
-
- bool IsIntegerType(lldb::opaque_compiler_type_t type,
- bool &is_signed) override;
-
- bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type,
- CompilerType *target_type, // Can pass nullptr
- bool check_cplusplus, bool check_objc) override;
-
- bool IsPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- bool IsScalarType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVoidType(lldb::opaque_compiler_type_t type) override;
-
- bool SupportsLanguage(lldb::LanguageType language) override;
-
- //----------------------------------------------------------------------
- // Type Completion
- //----------------------------------------------------------------------
-
- bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
-
- //----------------------------------------------------------------------
- // AST related queries
- //----------------------------------------------------------------------
-
- uint32_t GetPointerByteSize() override;
-
- //----------------------------------------------------------------------
- // Accessors
- //----------------------------------------------------------------------
-
- ConstString GetTypeName(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetTypeInfo(
- lldb::opaque_compiler_type_t type,
- CompilerType *pointee_or_element_compiler_type = nullptr) override;
-
- lldb::LanguageType
- GetMinimumLanguage(lldb::opaque_compiler_type_t type) override;
-
- lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) override;
-
- //----------------------------------------------------------------------
- // Creating related types
- //----------------------------------------------------------------------
-
- CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type,
- uint64_t *stride = nullptr) override;
-
- CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override;
-
- // Returns -1 if this isn't a function of if the function doesn't have a
- // prototype Returns a value >= 0 if there is a prototype.
- int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- CompilerType
- GetFunctionReturnType(lldb::opaque_compiler_type_t type) override;
-
- size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type) override;
-
- TypeMemberFunctionImpl
- GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- CompilerType GetPointeeType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetPointerType(lldb::opaque_compiler_type_t type) override;
-
- //----------------------------------------------------------------------
- // Exploring the type
- //----------------------------------------------------------------------
-
- uint64_t GetBitSize(lldb::opaque_compiler_type_t type,
- ExecutionContextScope *exe_scope) override;
-
- lldb::Encoding GetEncoding(lldb::opaque_compiler_type_t type,
- uint64_t &count) override;
-
- lldb::Format GetFormat(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
- bool omit_empty_base_classes) override;
-
- lldb::BasicType
- GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding,
- size_t bit_size) override;
-
- uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx,
- std::string &name, uint64_t *bit_offset_ptr,
- uint32_t *bitfield_bit_size_ptr,
- bool *is_bitfield_ptr) override;
-
- uint32_t GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- uint32_t
- GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- CompilerType GetDirectBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override {
- return CompilerType();
- }
-
- CompilerType GetVirtualBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override {
- return CompilerType();
- }
-
- CompilerType GetChildCompilerTypeAtIndex(
- lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
- bool transparent_pointers, bool omit_empty_base_classes,
- bool ignore_array_bounds, std::string &child_name,
- uint32_t &child_byte_size, int32_t &child_byte_offset,
- uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
- bool &child_is_base_class, bool &child_is_deref_of_parent,
- ValueObject *valobj, uint64_t &language_flags) override;
-
- // Lookup a child given a name. This function will match base class names and
- // member member names in "clang_type" only, not descendants.
- uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
- const char *name,
- bool omit_empty_base_classes) override;
-
- // Lookup a child member given a name. This function will match member names
- // only and will descend into "clang_type" children in search for the first
- // member in this class, or any base class that matches "name".
- // TODO: Return all matches for a given name by returning a
- // vector<vector<uint32_t>>
- // so we catch all names that match a given child name, not just the first.
- size_t
- GetIndexOfChildMemberWithName(lldb::opaque_compiler_type_t type,
- const char *name, bool omit_empty_base_classes,
- std::vector<uint32_t> &child_indexes) override;
-
- size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- //----------------------------------------------------------------------
- // Dumping types
- //----------------------------------------------------------------------
- void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- bool show_types, bool show_summary, bool verbose,
- uint32_t depth) override;
-
- bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s,
- lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- ExecutionContextScope *exe_scope) override;
-
- void DumpTypeDescription(
- lldb::opaque_compiler_type_t type) override; // Dump to stdout
-
- void DumpTypeDescription(lldb::opaque_compiler_type_t type,
- Stream *s) override;
-
- //----------------------------------------------------------------------
- // TODO: These methods appear unused. Should they be removed?
- //----------------------------------------------------------------------
-
- bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) override;
-
- void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size) override;
-
- // Converts "s" to a floating point value and place resulting floating point
- // bytes in the "dst" buffer.
- size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) override;
-
- //----------------------------------------------------------------------
- // TODO: Determine if these methods should move to ClangASTContext.
- //----------------------------------------------------------------------
-
- bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) override;
-
- bool IsCStringType(lldb::opaque_compiler_type_t type,
- uint32_t &length) override;
-
- size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) override;
-
- bool IsBeingDefined(lldb::opaque_compiler_type_t type) override;
-
- bool IsConst(lldb::opaque_compiler_type_t type) override;
-
- uint32_t IsHomogeneousAggregate(lldb::opaque_compiler_type_t type,
- CompilerType *base_type_ptr) override;
-
- bool IsPolymorphicClass(lldb::opaque_compiler_type_t type) override;
-
- bool IsTypedefType(lldb::opaque_compiler_type_t type) override;
-
- // If the current object represents a typedef type, get the underlying type
- CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVectorType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size) override;
-
- CompilerType
- GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetNonReferenceType(lldb::opaque_compiler_type_t type) override;
-
- bool IsReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr,
- bool *is_rvalue = nullptr) override;
-
-private:
- typedef std::map<ConstString, std::unique_ptr<GoType>> TypeMap;
- int m_pointer_byte_size;
- int m_int_byte_size;
- std::unique_ptr<TypeMap> m_types;
- std::unique_ptr<DWARFASTParser> m_dwarf_ast_parser_ap;
-
- GoASTContext(const GoASTContext &) = delete;
- const GoASTContext &operator=(const GoASTContext &) = delete;
-};
-
-class GoASTContextForExpr : public GoASTContext {
-public:
- GoASTContextForExpr(lldb::TargetSP target) : m_target_wp(target) {}
- UserExpression *
- GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix,
- lldb::LanguageType language,
- Expression::ResultType desired_type,
- const EvaluateExpressionOptions &options) override;
-
-private:
- lldb::TargetWP m_target_wp;
-};
-}
-#endif // liblldb_GoASTContext_h_
diff --git a/include/lldb/Symbol/JavaASTContext.h b/include/lldb/Symbol/JavaASTContext.h
deleted file mode 100644
index 41a881dcf4eb..000000000000
--- a/include/lldb/Symbol/JavaASTContext.h
+++ /dev/null
@@ -1,350 +0,0 @@
-//===-- JavaASTContext.h ----------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_JavaASTContext_h_
-#define liblldb_JavaASTContext_h_
-
-// C Includes
-// C++ Includes
-#include <map>
-#include <memory>
-#include <set>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Symbol/TypeSystem.h"
-#include "lldb/Utility/ConstString.h"
-
-namespace lldb_private {
-
-class JavaASTContext : public TypeSystem {
-public:
- class JavaType;
- typedef std::map<ConstString, std::unique_ptr<JavaType>> JavaTypeMap;
-
- JavaASTContext(const ArchSpec &arch);
- ~JavaASTContext() override;
-
- //------------------------------------------------------------------
- // PluginInterface functions
- //------------------------------------------------------------------
- ConstString GetPluginName() override;
-
- uint32_t GetPluginVersion() override;
-
- static ConstString GetPluginNameStatic();
-
- static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
- Module *module, Target *target);
-
- static void EnumerateSupportedLanguages(
- std::set<lldb::LanguageType> &languages_for_types,
- std::set<lldb::LanguageType> &languages_for_expressions);
-
- static void Initialize();
-
- static void Terminate();
-
- DWARFASTParser *GetDWARFParser() override;
-
- uint32_t GetPointerByteSize() override;
-
- //----------------------------------------------------------------------
- // CompilerDecl functions
- //----------------------------------------------------------------------
- ConstString DeclGetName(void *opaque_decl) override;
-
- //----------------------------------------------------------------------
- // CompilerDeclContext functions
- //----------------------------------------------------------------------
-
- std::vector<CompilerDecl>
- DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
- const bool ignore_imported_decls) override;
-
- bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override;
-
- ConstString DeclContextGetName(void *opaque_decl_ctx) override;
-
- bool DeclContextIsClassMethod(void *opaque_decl_ctx,
- lldb::LanguageType *language_ptr,
- bool *is_instance_method_ptr,
- ConstString *language_object_name_ptr) override;
-
- //----------------------------------------------------------------------
- // Tests
- //----------------------------------------------------------------------
-
- bool IsArrayType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size,
- bool *is_incomplete) override;
-
- bool IsAggregateType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCharType(lldb::opaque_compiler_type_t type) override;
-
- bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count,
- bool &is_complex) override;
-
- bool IsFunctionType(lldb::opaque_compiler_type_t type,
- bool *is_variadic_ptr = nullptr) override;
-
- size_t
- GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type,
- const size_t index) override;
-
- bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) override;
-
- bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *function_pointer_type_ptr) override;
-
- bool IsIntegerType(lldb::opaque_compiler_type_t type,
- bool &is_signed) override;
-
- bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type,
- CompilerType *target_type, bool check_cplusplus,
- bool check_objc) override;
-
- bool IsPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- bool IsReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr,
- bool *is_rvalue = nullptr) override;
-
- bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- bool IsScalarType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVoidType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCStringType(lldb::opaque_compiler_type_t type,
- uint32_t &length) override;
-
- bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) override;
-
- bool IsTypedefType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVectorType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size) override;
-
- bool IsPolymorphicClass(lldb::opaque_compiler_type_t type) override;
-
- bool IsCompleteType(lldb::opaque_compiler_type_t type) override;
-
- bool IsConst(lldb::opaque_compiler_type_t type) override;
-
- bool IsBeingDefined(lldb::opaque_compiler_type_t type) override;
-
- bool IsDefined(lldb::opaque_compiler_type_t type) override;
-
- uint32_t IsHomogeneousAggregate(lldb::opaque_compiler_type_t type,
- CompilerType *base_type_ptr) override;
-
- bool SupportsLanguage(lldb::LanguageType language) override;
-
- bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
-
- ConstString GetTypeName(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetTypeInfo(
- lldb::opaque_compiler_type_t type,
- CompilerType *pointee_or_element_compiler_type = nullptr) override;
-
- lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) override;
-
- lldb::LanguageType
- GetMinimumLanguage(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type,
- uint64_t *stride = nullptr) override;
-
- CompilerType GetPointeeType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetPointerType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType
- GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetNonReferenceType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) override;
-
- CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding,
- size_t bit_size) override;
-
- size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) override;
-
- lldb::BasicType
- GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
-
- uint64_t GetBitSize(lldb::opaque_compiler_type_t type,
- ExecutionContextScope *exe_scope) override;
-
- lldb::Encoding GetEncoding(lldb::opaque_compiler_type_t type,
- uint64_t &count) override;
-
- lldb::Format GetFormat(lldb::opaque_compiler_type_t type) override;
-
- unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) override;
-
- size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override;
-
- int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- CompilerType
- GetFunctionReturnType(lldb::opaque_compiler_type_t type) override;
-
- size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type) override;
-
- TypeMemberFunctionImpl
- GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx,
- std::string &name, uint64_t *bit_offset_ptr,
- uint32_t *bitfield_bit_size_ptr,
- bool *is_bitfield_ptr) override;
-
- uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
- bool omit_empty_base_classes) override;
-
- uint32_t GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetDirectBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override;
-
- CompilerType GetVirtualBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override;
-
- size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) override;
-
- void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- bool show_types, bool show_summary, bool verbose,
- uint32_t depth) override;
-
- bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s,
- lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- ExecutionContextScope *exe_scope) override;
-
- void DumpTypeDescription(lldb::opaque_compiler_type_t type) override;
-
- void DumpTypeDescription(lldb::opaque_compiler_type_t type,
- Stream *s) override;
-
- void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size) override;
-
- CompilerType GetChildCompilerTypeAtIndex(
- lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
- bool transparent_pointers, bool omit_empty_base_classes,
- bool ignore_array_bounds, std::string &child_name,
- uint32_t &child_byte_size, int32_t &child_byte_offset,
- uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
- bool &child_is_base_class, bool &child_is_deref_of_parent,
- ValueObject *valobj, uint64_t &language_flags) override;
-
- uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
- const char *name,
- bool omit_empty_base_classes) override;
-
- size_t
- GetIndexOfChildMemberWithName(lldb::opaque_compiler_type_t type,
- const char *name, bool omit_empty_base_classes,
- std::vector<uint32_t> &child_indexes) override;
-
- CompilerType
- GetLValueReferenceType(lldb::opaque_compiler_type_t type) override;
-
- ConstString DeclContextGetScopeQualifiedName(
- lldb::opaque_compiler_type_t opaque_decl_ctx) override;
-
- CompilerType CreateBaseType(const ConstString &name);
-
- CompilerType CreateObjectType(const ConstString &name,
- const ConstString &linkage_name,
- uint32_t byte_size);
-
- CompilerType CreateArrayType(const ConstString &linkage_name,
- const CompilerType &element_type,
- const DWARFExpression &length_expression,
- const lldb::addr_t data_offset);
-
- CompilerType CreateReferenceType(const CompilerType &pointee_type);
-
- void CompleteObjectType(const CompilerType &object_type);
-
- void AddBaseClassToObject(const CompilerType &object_type,
- const CompilerType &member_type,
- uint32_t member_offset);
-
- void AddMemberToObject(const CompilerType &object_type,
- const ConstString &name,
- const CompilerType &member_type,
- uint32_t member_offset);
-
- void SetDynamicTypeId(const CompilerType &type,
- const DWARFExpression &type_id);
-
- static uint64_t CalculateDynamicTypeId(ExecutionContext *exe_ctx,
- const CompilerType &type,
- ValueObject &in_value);
-
- static ConstString GetLinkageName(const CompilerType &type);
-
- static uint32_t CalculateArraySize(const CompilerType &type,
- ValueObject &in_value);
-
- static uint64_t CalculateArrayElementOffset(const CompilerType &type,
- size_t index);
-
- //------------------------------------------------------------------
- // llvm casting support
- //------------------------------------------------------------------
- static bool classof(const TypeSystem *ts) {
- return ts->getKind() == TypeSystem::eKindJava;
- }
-
-private:
- uint32_t m_pointer_byte_size;
- std::unique_ptr<DWARFASTParser> m_dwarf_ast_parser_ap;
- JavaTypeMap m_array_type_map;
- JavaTypeMap m_base_type_map;
- JavaTypeMap m_reference_type_map;
- JavaTypeMap m_object_type_map;
-
- JavaASTContext(const JavaASTContext &) = delete;
- const JavaASTContext &operator=(const JavaASTContext &) = delete;
-};
-}
-#endif // liblldb_JavaASTContext_h_
diff --git a/include/lldb/Symbol/LineTable.h b/include/lldb/Symbol/LineTable.h
index fe8be0c55764..684972d50789 100644
--- a/include/lldb/Symbol/LineTable.h
+++ b/include/lldb/Symbol/LineTable.h
@@ -10,12 +10,8 @@
#ifndef liblldb_LineTable_h_
#define liblldb_LineTable_h_
-// C Includes
-// C++ Includes
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/RangeMap.h"
#include "lldb/Core/Section.h"
@@ -242,21 +238,22 @@ public:
protected:
struct Entry {
Entry()
- : file_addr(LLDB_INVALID_ADDRESS), line(0), column(0), file_idx(0),
+ : file_addr(LLDB_INVALID_ADDRESS), line(0),
is_start_of_statement(false), is_start_of_basic_block(false),
is_prologue_end(false), is_epilogue_begin(false),
- is_terminal_entry(false) {}
+ is_terminal_entry(false), column(0), file_idx(0) {}
Entry(lldb::addr_t _file_addr, uint32_t _line, uint16_t _column,
uint16_t _file_idx, bool _is_start_of_statement,
bool _is_start_of_basic_block, bool _is_prologue_end,
bool _is_epilogue_begin, bool _is_terminal_entry)
- : file_addr(_file_addr), line(_line), column(_column),
- file_idx(_file_idx), is_start_of_statement(_is_start_of_statement),
+ : file_addr(_file_addr), line(_line),
+ is_start_of_statement(_is_start_of_statement),
is_start_of_basic_block(_is_start_of_basic_block),
is_prologue_end(_is_prologue_end),
is_epilogue_begin(_is_epilogue_begin),
- is_terminal_entry(_is_terminal_entry) {}
+ is_terminal_entry(_is_terminal_entry), column(_column),
+ file_idx(_file_idx) {}
int bsearch_compare(const void *key, const void *arrmem);
@@ -310,26 +307,30 @@ protected:
//------------------------------------------------------------------
// Member variables.
//------------------------------------------------------------------
- lldb::addr_t file_addr; ///< The file address for this line entry
- uint32_t line; ///< The source line number, or zero if there is no line
- ///number information.
- uint16_t column; ///< The column number of the source line, or zero if there
- ///is no column information.
- uint16_t file_idx : 11, ///< The file index into CompileUnit's file table,
- ///or zero if there is no file information.
- is_start_of_statement : 1, ///< Indicates this entry is the beginning of
- ///a statement.
- is_start_of_basic_block : 1, ///< Indicates this entry is the beginning
- ///of a basic block.
- is_prologue_end : 1, ///< Indicates this entry is one (of possibly many)
- ///where execution should be suspended for an entry
- ///breakpoint of a function.
- is_epilogue_begin : 1, ///< Indicates this entry is one (of possibly
- ///many) where execution should be suspended for
- ///an exit breakpoint of a function.
- is_terminal_entry : 1; ///< Indicates this entry is that of the first
- ///byte after the end of a sequence of target
- ///machine instructions.
+ /// The file address for this line entry.
+ lldb::addr_t file_addr;
+ /// The source line number, or zero if there is no line number
+ /// information.
+ uint32_t line : 27;
+ /// Indicates this entry is the beginning of a statement.
+ uint32_t is_start_of_statement : 1;
+ /// Indicates this entry is the beginning of a basic block.
+ uint32_t is_start_of_basic_block : 1;
+ /// Indicates this entry is one (of possibly many) where execution
+ /// should be suspended for an entry breakpoint of a function.
+ uint32_t is_prologue_end : 1;
+ /// Indicates this entry is one (of possibly many) where execution
+ /// should be suspended for an exit breakpoint of a function.
+ uint32_t is_epilogue_begin : 1;
+ /// Indicates this entry is that of the first byte after the end
+ /// of a sequence of target machine instructions.
+ uint32_t is_terminal_entry : 1;
+ /// The column number of the source line, or zero if there is no
+ /// column information.
+ uint16_t column;
+ /// The file index into CompileUnit's file table, or zero if there
+ /// is no file information.
+ uint16_t file_idx;
};
struct EntrySearchInfo {
diff --git a/include/lldb/Symbol/OCamlASTContext.h b/include/lldb/Symbol/OCamlASTContext.h
deleted file mode 100644
index 7144886e1c75..000000000000
--- a/include/lldb/Symbol/OCamlASTContext.h
+++ /dev/null
@@ -1,318 +0,0 @@
-//===-- OCamlASTContext.h ------------------------------------------*- C++
-//-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_OCamlASTContext_h_
-#define liblldb_OCamlASTContext_h_
-
-// C Includes
-// C++ Includes
-#include <map>
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Symbol/CompilerType.h"
-#include "lldb/Symbol/TypeSystem.h"
-#include "lldb/Utility/ConstString.h"
-
-namespace lldb_private {
-
-class OCamlASTContext : public TypeSystem {
-public:
- class OCamlType;
- typedef std::map<ConstString, std::unique_ptr<OCamlType>> OCamlTypeMap;
-
- OCamlASTContext();
- ~OCamlASTContext() override;
-
- ConstString GetPluginName() override;
-
- uint32_t GetPluginVersion() override;
-
- static ConstString GetPluginNameStatic();
-
- static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
- Module *module, Target *target);
-
- static void EnumerateSupportedLanguages(
- std::set<lldb::LanguageType> &languages_for_types,
- std::set<lldb::LanguageType> &languages_for_expressions);
-
- static void Initialize();
-
- static void Terminate();
-
- DWARFASTParser *GetDWARFParser() override;
-
- void SetAddressByteSize(int byte_size) { m_pointer_byte_size = byte_size; }
-
- static bool classof(const TypeSystem *ts) {
- return ts->getKind() == TypeSystem::eKindOCaml;
- }
-
- ConstString DeclGetName(void *opaque_decl) override { return ConstString(); }
-
- bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override {
- return false;
- }
-
- ConstString DeclContextGetName(void *opaque_decl_ctx) override {
- return ConstString();
- }
-
- ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override {
- return ConstString();
- }
-
- bool
- DeclContextIsClassMethod(void *opaque_decl_ctx,
- lldb::LanguageType *language_ptr,
- bool *is_instance_method_ptr,
- ConstString *language_object_name_ptr) override {
- return false;
- }
-
- bool SupportsLanguage(lldb::LanguageType language) override;
- uint32_t GetPointerByteSize() override;
-
- bool IsArrayType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size,
- bool *is_incomplete) override;
-
- bool IsAggregateType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCharType(lldb::opaque_compiler_type_t type) override;
-
- bool IsCompleteType(lldb::opaque_compiler_type_t type) override;
-
- bool IsDefined(lldb::opaque_compiler_type_t type) override;
-
- bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count,
- bool &is_complex) override;
-
- bool IsFunctionType(lldb::opaque_compiler_type_t type,
- bool *is_variadic_ptr = nullptr) override;
-
- size_t
- GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type,
- const size_t index) override;
-
- bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) override;
-
- bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *function_pointer_type_ptr) override;
-
- bool IsIntegerType(lldb::opaque_compiler_type_t type,
- bool &is_signed) override;
-
- bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type,
- CompilerType *target_type, bool check_cplusplus,
- bool check_objc) override;
-
- bool IsPointerType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- bool IsScalarType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVoidType(lldb::opaque_compiler_type_t type) override;
-
- bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
-
- ConstString GetTypeName(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetTypeInfo(
- lldb::opaque_compiler_type_t type,
- CompilerType *pointee_or_element_compiler_type = nullptr) override;
-
- lldb::LanguageType
- GetMinimumLanguage(lldb::opaque_compiler_type_t type) override;
-
- lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type,
- uint64_t *stride = nullptr) override;
-
- CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override;
-
- int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- CompilerType
- GetFunctionReturnType(lldb::opaque_compiler_type_t type) override;
-
- size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type) override;
-
- TypeMemberFunctionImpl
- GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx) override;
-
- CompilerType GetPointeeType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetPointerType(lldb::opaque_compiler_type_t type) override;
-
- uint64_t GetBitSize(lldb::opaque_compiler_type_t type,
- ExecutionContextScope *exe_scope) override;
-
- lldb::Encoding GetEncoding(lldb::opaque_compiler_type_t type,
- uint64_t &count) override;
-
- lldb::Format GetFormat(lldb::opaque_compiler_type_t type) override;
-
- uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
- bool omit_empty_base_classes) override;
-
- lldb::BasicType
- GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding,
- size_t bit_size) override;
-
- uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx,
- std::string &name, uint64_t *bit_offset_ptr,
- uint32_t *bitfield_bit_size_ptr,
- bool *is_bitfield_ptr) override;
-
- uint32_t GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- uint32_t
- GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- CompilerType GetDirectBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override {
- return CompilerType();
- }
-
- CompilerType GetVirtualBaseClassAtIndex(lldb::opaque_compiler_type_t type,
- size_t idx,
- uint32_t *bit_offset_ptr) override {
- return CompilerType();
- }
-
- CompilerType GetChildCompilerTypeAtIndex(
- lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
- bool transparent_pointers, bool omit_empty_base_classes,
- bool ignore_array_bounds, std::string &child_name,
- uint32_t &child_byte_size, int32_t &child_byte_offset,
- uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
- bool &child_is_base_class, bool &child_is_deref_of_parent,
- ValueObject *valobj, uint64_t &language_flags) override;
-
- uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
- const char *name,
- bool omit_empty_base_classes) override;
-
- size_t
- GetIndexOfChildMemberWithName(lldb::opaque_compiler_type_t type,
- const char *name, bool omit_empty_base_classes,
- std::vector<uint32_t> &child_indexes) override;
-
- size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override {
- return 0;
- }
-
- void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- bool show_types, bool show_summary, bool verbose,
- uint32_t depth) override;
-
- bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s,
- lldb::Format format, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size,
- uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
- ExecutionContextScope *exe_scope) override;
-
- void DumpTypeDescription(lldb::opaque_compiler_type_t type) override;
-
- void DumpTypeDescription(lldb::opaque_compiler_type_t type,
- Stream *s) override;
-
- bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) override;
-
- void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
- Stream *s, const DataExtractor &data,
- lldb::offset_t data_offset, size_t data_byte_size) override;
-
- size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) override;
-
- bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr) override;
-
- unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) override;
-
- bool IsCStringType(lldb::opaque_compiler_type_t type,
- uint32_t &length) override;
-
- size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) override;
-
- bool IsBeingDefined(lldb::opaque_compiler_type_t type) override;
-
- bool IsConst(lldb::opaque_compiler_type_t type) override;
-
- uint32_t IsHomogeneousAggregate(lldb::opaque_compiler_type_t type,
- CompilerType *base_type_ptr) override;
-
- bool IsPolymorphicClass(lldb::opaque_compiler_type_t type) override;
-
- bool IsTypedefType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
-
- bool IsVectorType(lldb::opaque_compiler_type_t type,
- CompilerType *element_type, uint64_t *size) override;
-
- CompilerType
- GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) override;
-
- CompilerType GetNonReferenceType(lldb::opaque_compiler_type_t type) override;
-
- bool IsReferenceType(lldb::opaque_compiler_type_t type,
- CompilerType *pointee_type = nullptr,
- bool *is_rvalue = nullptr) override;
-
- CompilerType CreateBaseType(const ConstString &name, uint64_t);
-
-private:
- int m_pointer_byte_size;
- std::unique_ptr<DWARFASTParser> m_dwarf_ast_parser_ap;
- OCamlTypeMap m_base_type_map;
-
- OCamlASTContext(const OCamlASTContext &) = delete;
- const OCamlASTContext &operator=(const OCamlASTContext &) = delete;
-};
-
-class OCamlASTContextForExpr : public OCamlASTContext {
-public:
- OCamlASTContextForExpr(lldb::TargetSP target) : m_target_wp(target) {}
-
-private:
- lldb::TargetWP m_target_wp;
-};
-}
-#endif // liblldb_OCamlASTContext_h_
diff --git a/include/lldb/Symbol/ObjectContainer.h b/include/lldb/Symbol/ObjectContainer.h
index 2138d22808c3..1e14856ea6ea 100644
--- a/include/lldb/Symbol/ObjectContainer.h
+++ b/include/lldb/Symbol/ObjectContainer.h
@@ -10,10 +10,6 @@
#ifndef liblldb_ObjectContainer_h_
#define liblldb_ObjectContainer_h_
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Utility/DataExtractor.h"
diff --git a/include/lldb/Symbol/ObjectFile.h b/include/lldb/Symbol/ObjectFile.h
index 1e9ae8b45417..c6bafcecb6f6 100644
--- a/include/lldb/Symbol/ObjectFile.h
+++ b/include/lldb/Symbol/ObjectFile.h
@@ -40,7 +40,7 @@ public:
virtual void PopulateSectionList(lldb_private::ObjectFile *obj_file,
lldb_private::SectionList &section_list) = 0;
- virtual bool GetArchitecture(lldb_private::ArchSpec &arch) = 0;
+ virtual ArchSpec GetArchitecture() = 0;
};
//----------------------------------------------------------------------
@@ -305,19 +305,13 @@ public:
virtual const FileSpec &GetFileSpec() const { return m_file; }
//------------------------------------------------------------------
- /// Get the name of the cpu, vendor and OS for this object file.
- ///
- /// This value is a string that represents the target triple where the cpu
- /// type, the vendor and the OS are encoded into a string.
- ///
- /// @param[out] target_triple
- /// The string value of the target triple.
+ /// Get the ArchSpec for this object file.
///
/// @return
- /// \b True if the target triple was able to be computed, \b
- /// false otherwise.
+ /// The ArchSpec of this object file. In case of error, an invalid
+ /// ArchSpec object is returned.
//------------------------------------------------------------------
- virtual bool GetArchitecture(ArchSpec &arch) = 0;
+ virtual ArchSpec GetArchitecture() = 0;
//------------------------------------------------------------------
/// Gets the section list for the currently selected architecture (and
@@ -551,18 +545,16 @@ public:
virtual lldb_private::Address GetEntryPointAddress() { return Address(); }
//------------------------------------------------------------------
- /// Returns the address that represents the header of this object file.
+ /// Returns base address of this object file.
///
- /// The header address is defined as where the header for the object file is
- /// that describes the content of the file. If the header doesn't appear in
- /// a section that is defined in the object file, an address with no section
- /// is returned that has the file offset set in the m_file_offset member of
- /// the lldb_private::Address object.
- ///
- /// @return
- /// Returns the entry address for this module.
+ /// This also sometimes referred to as the "preferred load address" or the
+ /// "image base address". Addresses within object files are often expressed
+ /// relative to this base. If this address corresponds to a specific section
+ /// (usually the first byte of the first section) then the returned address
+ /// will have this section set. Otherwise, the address will just have the
+ /// offset member filled in, indicating that this represents a file address.
//------------------------------------------------------------------
- virtual lldb_private::Address GetHeaderAddress() {
+ virtual lldb_private::Address GetBaseAddress() {
return Address(m_memory_addr);
}
@@ -817,4 +809,16 @@ private:
} // namespace lldb_private
+namespace llvm {
+template <> struct format_provider<lldb_private::ObjectFile::Type> {
+ static void format(const lldb_private::ObjectFile::Type &type,
+ raw_ostream &OS, StringRef Style);
+};
+
+template <> struct format_provider<lldb_private::ObjectFile::Strata> {
+ static void format(const lldb_private::ObjectFile::Strata &strata,
+ raw_ostream &OS, StringRef Style);
+};
+} // namespace llvm
+
#endif // liblldb_ObjectFile_h_
diff --git a/include/lldb/Symbol/SymbolContext.h b/include/lldb/Symbol/SymbolContext.h
index 0ec0006f193a..a7afffb705d2 100644
--- a/include/lldb/Symbol/SymbolContext.h
+++ b/include/lldb/Symbol/SymbolContext.h
@@ -10,14 +10,10 @@
#ifndef liblldb_SymbolContext_h_
#define liblldb_SymbolContext_h_
-// C Includes
-// C++ Includes
#include <memory>
#include <string>
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/Address.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Symbol/LineEntry.h"
@@ -232,7 +228,7 @@ public:
bool GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range,
Status &error);
-
+
//------------------------------------------------------------------
/// Find the best global data symbol visible from this context.
///
@@ -469,10 +465,6 @@ public:
bool AppendIfUnique(const SymbolContext &sc, bool merge_symbol_into_function);
- bool MergeSymbolContextIntoFunctionContext(const SymbolContext &symbol_sc,
- uint32_t start_idx = 0,
- uint32_t stop_idx = UINT32_MAX);
-
uint32_t AppendIfUnique(const SymbolContextList &sc_list,
bool merge_symbol_into_function);
@@ -531,18 +523,6 @@ public:
return m_symbol_contexts[idx];
}
- //------------------------------------------------------------------
- /// Get accessor for the last symbol context in the list.
- ///
- /// @param[out] sc
- /// A reference to the symbol context to fill in.
- ///
- /// @return
- /// Returns \b true if \a sc was filled in, \b false if the
- /// list is empty.
- //------------------------------------------------------------------
- bool GetLastContext(SymbolContext &sc) const;
-
bool RemoveContextAtIndex(size_t idx);
//------------------------------------------------------------------
diff --git a/include/lldb/Symbol/SymbolContextScope.h b/include/lldb/Symbol/SymbolContextScope.h
index c2fbb5272fc0..85718b9bba4f 100644
--- a/include/lldb/Symbol/SymbolContextScope.h
+++ b/include/lldb/Symbol/SymbolContextScope.h
@@ -10,10 +10,6 @@
#ifndef liblldb_SymbolContextScope_h_
#define liblldb_SymbolContextScope_h_
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/SymbolFile.h b/include/lldb/Symbol/SymbolFile.h
index 7b77c60a3c3d..433c20da99e2 100644
--- a/include/lldb/Symbol/SymbolFile.h
+++ b/include/lldb/Symbol/SymbolFile.h
@@ -14,11 +14,20 @@
#include "lldb/Symbol/CompilerDecl.h"
#include "lldb/Symbol/CompilerDeclContext.h"
#include "lldb/Symbol/CompilerType.h"
+#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/Type.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/DenseSet.h"
+#include <mutex>
+
+#if defined(LLDB_CONFIGURATION_DEBUG)
+#define ASSERT_MODULE_LOCK(expr) (expr->AssertModuleLock())
+#else
+#define ASSERT_MODULE_LOCK(expr) ((void)0)
+#endif
+
namespace lldb_private {
class SymbolFile : public PluginInterface {
@@ -93,6 +102,12 @@ public:
virtual uint32_t CalculateAbilities() = 0;
//------------------------------------------------------------------
+ /// Symbols file subclasses should override this to return the Module that
+ /// owns the TypeSystem that this symbol file modifies type information in.
+ //------------------------------------------------------------------
+ virtual std::recursive_mutex &GetModuleMutex() const;
+
+ //------------------------------------------------------------------
/// Initialize the SymbolFile object.
///
/// The SymbolFile object with the best set of abilities (detected
@@ -110,24 +125,38 @@ public:
virtual uint32_t GetNumCompileUnits() = 0;
virtual lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) = 0;
- virtual lldb::LanguageType
- ParseCompileUnitLanguage(const SymbolContext &sc) = 0;
- virtual size_t ParseCompileUnitFunctions(const SymbolContext &sc) = 0;
- virtual bool ParseCompileUnitLineTable(const SymbolContext &sc) = 0;
- virtual bool ParseCompileUnitDebugMacros(const SymbolContext &sc) = 0;
- virtual bool ParseCompileUnitSupportFiles(const SymbolContext &sc,
- FileSpecList &support_files) = 0;
- virtual bool
- ParseCompileUnitIsOptimized(const lldb_private::SymbolContext &sc) {
- return false;
- }
+ virtual lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) = 0;
+ virtual size_t ParseFunctions(CompileUnit &comp_unit) = 0;
+ virtual bool ParseLineTable(CompileUnit &comp_unit) = 0;
+ virtual bool ParseDebugMacros(CompileUnit &comp_unit) = 0;
+ virtual bool ParseSupportFiles(CompileUnit &comp_unit,
+ FileSpecList &support_files) = 0;
+ virtual size_t ParseTypes(CompileUnit &comp_unit) = 0;
+ virtual bool ParseIsOptimized(CompileUnit &comp_unit) { return false; }
+
virtual bool
ParseImportedModules(const SymbolContext &sc,
std::vector<ConstString> &imported_modules) = 0;
- virtual size_t ParseFunctionBlocks(const SymbolContext &sc) = 0;
- virtual size_t ParseTypes(const SymbolContext &sc) = 0;
+ virtual size_t ParseBlocksRecursive(Function &func) = 0;
virtual size_t ParseVariablesForContext(const SymbolContext &sc) = 0;
virtual Type *ResolveTypeUID(lldb::user_id_t type_uid) = 0;
+
+
+ /// The characteristics of an array type.
+ struct ArrayInfo {
+ int64_t first_index;
+ llvm::SmallVector<uint64_t, 1> element_orders;
+ uint32_t byte_stride;
+ uint32_t bit_stride;
+ };
+ /// If \c type_uid points to an array type, return its characteristics.
+ /// To support variable-length array types, this function takes an
+ /// optional \p ExtecutionContext. If \c exe_ctx is non-null, the
+ /// dynamic characteristics for that context are returned.
+ virtual llvm::Optional<ArrayInfo>
+ GetDynamicArrayInfoForUID(lldb::user_id_t type_uid,
+ const lldb_private::ExecutionContext *exe_ctx) = 0;
+
virtual bool CompleteType(CompilerType &compiler_type) = 0;
virtual void ParseDeclsForContext(CompilerDeclContext decl_ctx) {}
virtual CompilerDecl GetDeclForUID(lldb::user_id_t uid) {
@@ -140,12 +169,14 @@ public:
return CompilerDeclContext();
}
virtual uint32_t ResolveSymbolContext(const Address &so_addr,
- uint32_t resolve_scope,
+ lldb::SymbolContextItem resolve_scope,
SymbolContext &sc) = 0;
virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec,
uint32_t line, bool check_inlines,
- uint32_t resolve_scope,
+ lldb::SymbolContextItem resolve_scope,
SymbolContextList &sc_list);
+
+ virtual void DumpClangAST(Stream &s) {}
virtual uint32_t
FindGlobalVariables(const ConstString &name,
const CompilerDeclContext *parent_decl_ctx,
@@ -155,15 +186,15 @@ public:
VariableList &variables);
virtual uint32_t FindFunctions(const ConstString &name,
const CompilerDeclContext *parent_decl_ctx,
- uint32_t name_type_mask, bool include_inlines,
- bool append, SymbolContextList &sc_list);
+ lldb::FunctionNameType name_type_mask,
+ bool include_inlines, bool append,
+ SymbolContextList &sc_list);
virtual uint32_t FindFunctions(const RegularExpression &regex,
bool include_inlines, bool append,
SymbolContextList &sc_list);
virtual uint32_t
- FindTypes(const SymbolContext &sc, const ConstString &name,
- const CompilerDeclContext *parent_decl_ctx, bool append,
- uint32_t max_matches,
+ FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+ bool append, uint32_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);
virtual size_t FindTypes(const std::vector<CompilerContext> &context,
@@ -177,7 +208,7 @@ public:
// types) = 0;
virtual TypeList *GetTypeList();
virtual size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
- uint32_t type_mask,
+ lldb::TypeClass type_mask,
lldb_private::TypeList &type_list) = 0;
virtual void PreloadSymbols();
@@ -186,7 +217,7 @@ public:
GetTypeSystemForLanguage(lldb::LanguageType language);
virtual CompilerDeclContext
- FindNamespace(const SymbolContext &sc, const ConstString &name,
+ FindNamespace(const ConstString &name,
const CompilerDeclContext *parent_decl_ctx) {
return CompilerDeclContext();
}
@@ -194,6 +225,12 @@ public:
ObjectFile *GetObjectFile() { return m_obj_file; }
const ObjectFile *GetObjectFile() const { return m_obj_file; }
+ virtual std::vector<CallEdge> ParseCallEdgesInFunction(UserID func_id) {
+ return {};
+ }
+
+ virtual void AddSymbols(Symtab &symtab) {}
+
//------------------------------------------------------------------
/// Notify the SymbolFile that the file addresses in the Sections
/// for this module have been changed.
@@ -203,6 +240,8 @@ public:
virtual void Dump(Stream &s) {}
protected:
+ void AssertModuleLock();
+
ObjectFile *m_obj_file; // The object file that symbols can be extracted from.
uint32_t m_abilities;
bool m_calculated_abilities;
diff --git a/include/lldb/Symbol/SymbolVendor.h b/include/lldb/Symbol/SymbolVendor.h
index 312b146f2970..d48f646d52cd 100644
--- a/include/lldb/Symbol/SymbolVendor.h
+++ b/include/lldb/Symbol/SymbolVendor.h
@@ -46,37 +46,37 @@ public:
virtual void Dump(Stream *s);
- virtual lldb::LanguageType ParseCompileUnitLanguage(const SymbolContext &sc);
+ virtual lldb::LanguageType ParseLanguage(CompileUnit &comp_unit);
- virtual size_t ParseCompileUnitFunctions(const SymbolContext &sc);
+ virtual size_t ParseFunctions(CompileUnit &comp_unit);
- virtual bool ParseCompileUnitLineTable(const SymbolContext &sc);
+ virtual bool ParseLineTable(CompileUnit &comp_unit);
- virtual bool ParseCompileUnitDebugMacros(const SymbolContext &sc);
+ virtual bool ParseDebugMacros(CompileUnit &comp_unit);
- virtual bool ParseCompileUnitSupportFiles(const SymbolContext &sc,
- FileSpecList &support_files);
+ virtual bool ParseSupportFiles(CompileUnit &comp_unit,
+ FileSpecList &support_files);
- virtual bool ParseCompileUnitIsOptimized(const SymbolContext &sc);
+ virtual bool ParseIsOptimized(CompileUnit &comp_unit);
+
+ virtual size_t ParseTypes(CompileUnit &comp_unit);
virtual bool ParseImportedModules(const SymbolContext &sc,
std::vector<ConstString> &imported_modules);
- virtual size_t ParseFunctionBlocks(const SymbolContext &sc);
-
- virtual size_t ParseTypes(const SymbolContext &sc);
+ virtual size_t ParseBlocksRecursive(Function &func);
virtual size_t ParseVariablesForContext(const SymbolContext &sc);
virtual Type *ResolveTypeUID(lldb::user_id_t type_uid);
virtual uint32_t ResolveSymbolContext(const Address &so_addr,
- uint32_t resolve_scope,
+ lldb::SymbolContextItem resolve_scope,
SymbolContext &sc);
virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec,
uint32_t line, bool check_inlines,
- uint32_t resolve_scope,
+ lldb::SymbolContextItem resolve_scope,
SymbolContextList &sc_list);
virtual size_t FindGlobalVariables(const ConstString &name,
@@ -90,17 +90,17 @@ public:
virtual size_t FindFunctions(const ConstString &name,
const CompilerDeclContext *parent_decl_ctx,
- uint32_t name_type_mask, bool include_inlines,
- bool append, SymbolContextList &sc_list);
+ lldb::FunctionNameType name_type_mask,
+ bool include_inlines, bool append,
+ SymbolContextList &sc_list);
virtual size_t FindFunctions(const RegularExpression &regex,
bool include_inlines, bool append,
SymbolContextList &sc_list);
virtual size_t
- FindTypes(const SymbolContext &sc, const ConstString &name,
- const CompilerDeclContext *parent_decl_ctx, bool append,
- size_t max_matches,
+ FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+ bool append, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);
@@ -108,7 +108,7 @@ public:
bool append, TypeMap &types);
virtual CompilerDeclContext
- FindNamespace(const SymbolContext &sc, const ConstString &name,
+ FindNamespace(const ConstString &name,
const CompilerDeclContext *parent_decl_ctx);
virtual size_t GetNumCompileUnits();
@@ -122,8 +122,8 @@ public:
const TypeList &GetTypeList() const { return m_type_list; }
- virtual size_t GetTypes(SymbolContextScope *sc_scope, uint32_t type_mask,
- TypeList &type_list);
+ virtual size_t GetTypes(SymbolContextScope *sc_scope,
+ lldb::TypeClass type_mask, TypeList &type_list);
SymbolFile *GetSymbolFile() { return m_sym_file_ap.get(); }
@@ -164,6 +164,8 @@ protected:
// file)
std::unique_ptr<SymbolFile> m_sym_file_ap; // A single symbol file. Subclasses
// can add more of these if needed.
+ Symtab *m_symtab; // Save a symtab once to not pass it through `AddSymbols` of
+ // the symbol file each time when it is needed
private:
//------------------------------------------------------------------
diff --git a/include/lldb/Symbol/Symtab.h b/include/lldb/Symbol/Symtab.h
index 3d24862af365..286e4f48c2e8 100644
--- a/include/lldb/Symbol/Symtab.h
+++ b/include/lldb/Symbol/Symtab.h
@@ -168,12 +168,12 @@ private:
Visibility symbol_visibility) const {
switch (symbol_debug_type) {
case eDebugNo:
- if (m_symbols[idx].IsDebug() == true)
+ if (m_symbols[idx].IsDebug())
return false;
break;
case eDebugYes:
- if (m_symbols[idx].IsDebug() == false)
+ if (!m_symbols[idx].IsDebug())
return false;
break;
@@ -197,6 +197,15 @@ private:
void SymbolIndicesToSymbolContextList(std::vector<uint32_t> &symbol_indexes,
SymbolContextList &sc_list);
+ void RegisterMangledNameEntry(
+ NameToIndexMap::Entry &entry, std::set<const char *> &class_contexts,
+ std::vector<std::pair<NameToIndexMap::Entry, const char *>> &backlog,
+ RichManglingContext &rmc);
+
+ void RegisterBacklogEntry(const NameToIndexMap::Entry &entry,
+ const char *decl_context,
+ const std::set<const char *> &class_contexts);
+
DISALLOW_COPY_AND_ASSIGN(Symtab);
};
diff --git a/include/lldb/Symbol/TypeSystem.h b/include/lldb/Symbol/TypeSystem.h
index 94d1b9cdf3fd..6afbd188a234 100644
--- a/include/lldb/Symbol/TypeSystem.h
+++ b/include/lldb/Symbol/TypeSystem.h
@@ -10,18 +10,14 @@
#ifndef liblldb_TypeSystem_h_
#define liblldb_TypeSystem_h_
-// C Includes
-// C++ Includes
#include <functional>
#include <map>
#include <mutex>
#include <string>
-// Other libraries and framework includes
#include "llvm/ADT/APSInt.h"
#include "llvm/Support/Casting.h"
-// Project includes
#include "lldb/Core/PluginInterface.h"
#include "lldb/Expression/Expression.h"
#include "lldb/Symbol/CompilerDecl.h"
@@ -72,8 +68,6 @@ public:
enum LLVMCastKind {
eKindClang,
eKindSwift,
- eKindGo,
- eKindJava,
eKindOCaml,
kNumKinds
};
@@ -286,7 +280,8 @@ public:
virtual lldb::Format GetFormat(lldb::opaque_compiler_type_t type) = 0;
virtual uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
- bool omit_empty_base_classes) = 0;
+ bool omit_empty_base_classes,
+ const ExecutionContext *exe_ctx) = 0;
virtual CompilerType GetBuiltinTypeByName(const ConstString &name);
@@ -347,7 +342,7 @@ public:
const char *name, bool omit_empty_base_classes,
std::vector<uint32_t> &child_indexes) = 0;
- virtual size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) = 0;
+ virtual size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type);
virtual lldb::TemplateArgumentKind
GetTemplateArgumentKind(lldb::opaque_compiler_type_t type, size_t idx);
diff --git a/include/lldb/Symbol/UnwindPlan.h b/include/lldb/Symbol/UnwindPlan.h
index a76ea23b46bc..7a5cf7f02a67 100644
--- a/include/lldb/Symbol/UnwindPlan.h
+++ b/include/lldb/Symbol/UnwindPlan.h
@@ -10,14 +10,10 @@
#ifndef liblldb_UnwindPlan_h
#define liblldb_UnwindPlan_h
-// C Includes
-// C++ Includes
#include <map>
#include <memory>
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Core/AddressRange.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Stream.h"
@@ -28,14 +24,22 @@ namespace lldb_private {
// The UnwindPlan object specifies how to unwind out of a function - where this
// function saves the caller's register values before modifying them (for non-
// volatile aka saved registers) and how to find this frame's Canonical Frame
-// Address (CFA).
+// Address (CFA) or Aligned Frame Address (AFA).
+// CFA is a DWARF's Canonical Frame Address.
// Most commonly, registers are saved on the stack, offset some bytes from the
// Canonical Frame Address, or CFA, which is the starting address of this
// function's stack frame (the CFA is same as the eh_frame's CFA, whatever that
// may be on a given architecture). The CFA address for the stack frame does
// not change during the lifetime of the function.
+// AFA is an artificially introduced Aligned Frame Address.
+// It is used only for stack frames with realignment (e.g. when some of the
+// locals has an alignment requirement higher than the stack alignment right
+// after the function call). It is used to access register values saved on the
+// stack after the realignment (and so they are inaccessible through the CFA).
+// AFA usually equals the stack pointer value right after the realignment.
+
// Internally, the UnwindPlan is structured as a vector of register locations
// organized by code address in the function, showing which registers have been
// saved at that point and where they are saved. It can be thought of as the
@@ -61,6 +65,8 @@ public:
same, // reg is unchanged
atCFAPlusOffset, // reg = deref(CFA + offset)
isCFAPlusOffset, // reg = CFA + offset
+ atAFAPlusOffset, // reg = deref(AFA + offset)
+ isAFAPlusOffset, // reg = AFA + offset
inOtherRegister, // reg = other reg
atDWARFExpression, // reg = deref(eval(dwarf_expr))
isDWARFExpression // reg = eval(dwarf_expr)
@@ -90,6 +96,10 @@ public:
bool IsAtCFAPlusOffset() const { return m_type == atCFAPlusOffset; }
+ bool IsAFAPlusOffset() const { return m_type == isAFAPlusOffset; }
+
+ bool IsAtAFAPlusOffset() const { return m_type == atAFAPlusOffset; }
+
bool IsInOtherRegister() const { return m_type == inOtherRegister; }
bool IsAtDWARFExpression() const { return m_type == atDWARFExpression; }
@@ -106,6 +116,16 @@ public:
m_location.offset = offset;
}
+ void SetAtAFAPlusOffset(int32_t offset) {
+ m_type = atAFAPlusOffset;
+ m_location.offset = offset;
+ }
+
+ void SetIsAFAPlusOffset(int32_t offset) {
+ m_type = isAFAPlusOffset;
+ m_location.offset = offset;
+ }
+
void SetInRegister(uint32_t reg_num) {
m_type = inOtherRegister;
m_location.reg_num = reg_num;
@@ -120,9 +140,16 @@ public:
RestoreType GetLocationType() const { return m_type; }
int32_t GetOffset() const {
- if (m_type == atCFAPlusOffset || m_type == isCFAPlusOffset)
+ switch(m_type)
+ {
+ case atCFAPlusOffset:
+ case isCFAPlusOffset:
+ case atAFAPlusOffset:
+ case isAFAPlusOffset:
return m_location.offset;
- return 0;
+ default:
+ return 0;
+ }
}
void GetDWARFExpr(const uint8_t **opcodes, uint16_t &len) const {
@@ -169,20 +196,20 @@ public:
} m_location;
};
- class CFAValue {
+ class FAValue {
public:
enum ValueType {
unspecified, // not specified
- isRegisterPlusOffset, // CFA = register + offset
- isRegisterDereferenced, // CFA = [reg]
- isDWARFExpression // CFA = eval(dwarf_expr)
+ isRegisterPlusOffset, // FA = register + offset
+ isRegisterDereferenced, // FA = [reg]
+ isDWARFExpression // FA = eval(dwarf_expr)
};
- CFAValue() : m_type(unspecified), m_value() {}
+ FAValue() : m_type(unspecified), m_value() {}
- bool operator==(const CFAValue &rhs) const;
+ bool operator==(const FAValue &rhs) const;
- bool operator!=(const CFAValue &rhs) const { return !(*this == rhs); }
+ bool operator!=(const FAValue &rhs) const { return !(*this == rhs); }
void SetUnspecified() { m_type = unspecified; }
@@ -279,7 +306,7 @@ public:
uint16_t length;
} expr;
} m_value;
- }; // class CFAValue
+ }; // class FAValue
public:
Row();
@@ -302,7 +329,9 @@ public:
void SlideOffset(lldb::addr_t offset) { m_offset += offset; }
- CFAValue &GetCFAValue() { return m_cfa_value; }
+ FAValue &GetCFAValue() { return m_cfa_value; }
+
+ FAValue &GetAFAValue() { return m_afa_value; }
bool SetRegisterLocationToAtCFAPlusOffset(uint32_t reg_num, int32_t offset,
bool can_replace);
@@ -329,7 +358,8 @@ public:
typedef std::map<uint32_t, RegisterLocation> collection;
lldb::addr_t m_offset; // Offset into the function for this row
- CFAValue m_cfa_value;
+ FAValue m_cfa_value;
+ FAValue m_afa_value;
collection m_register_locations;
}; // class Row
diff --git a/include/lldb/Symbol/UnwindTable.h b/include/lldb/Symbol/UnwindTable.h
index 5c83e3003192..061e7ddc0f99 100644
--- a/include/lldb/Symbol/UnwindTable.h
+++ b/include/lldb/Symbol/UnwindTable.h
@@ -50,7 +50,7 @@ public:
GetUncachedFuncUnwindersContainingAddress(const Address &addr,
SymbolContext &sc);
- bool GetArchitecture(lldb_private::ArchSpec &arch);
+ ArchSpec GetArchitecture();
private:
void Dump(Stream &s);