summaryrefslogtreecommitdiff
path: root/include/lldb/Symbol
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:04:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:04:10 +0000
commit74a628f776edb588bff8f8f5cc16eac947c9d631 (patch)
treedc32e010ac4902621e5a279bfeb48628f7f0e166 /include/lldb/Symbol
parentafed7be32164a598f8172282c249af7266c48b46 (diff)
Notes
Diffstat (limited to 'include/lldb/Symbol')
-rw-r--r--include/lldb/Symbol/ArmUnwindInfo.h2
-rw-r--r--include/lldb/Symbol/Block.h5
-rw-r--r--include/lldb/Symbol/ClangASTContext.h2
-rw-r--r--include/lldb/Symbol/CompactUnwindInfo.h2
-rw-r--r--include/lldb/Symbol/CompileUnit.h4
-rw-r--r--include/lldb/Symbol/CompilerDecl.h2
-rw-r--r--include/lldb/Symbol/CompilerDeclContext.h2
-rw-r--r--include/lldb/Symbol/CompilerType.h2
-rw-r--r--include/lldb/Symbol/DWARFCallFrameInfo.h6
-rw-r--r--include/lldb/Symbol/DebugMacros.h2
-rw-r--r--include/lldb/Symbol/DeclVendor.h1
-rw-r--r--include/lldb/Symbol/Declaration.h2
-rw-r--r--include/lldb/Symbol/Function.h2
-rw-r--r--include/lldb/Symbol/GoASTContext.h2
-rw-r--r--include/lldb/Symbol/JavaASTContext.h2
-rw-r--r--include/lldb/Symbol/LineEntry.h2
-rw-r--r--include/lldb/Symbol/OCamlASTContext.h2
-rw-r--r--include/lldb/Symbol/ObjectContainer.h6
-rw-r--r--include/lldb/Symbol/ObjectFile.h60
-rw-r--r--include/lldb/Symbol/Symbol.h2
-rw-r--r--include/lldb/Symbol/Type.h5
-rw-r--r--include/lldb/Symbol/UnwindPlan.h4
-rw-r--r--include/lldb/Symbol/Variable.h2
23 files changed, 89 insertions, 32 deletions
diff --git a/include/lldb/Symbol/ArmUnwindInfo.h b/include/lldb/Symbol/ArmUnwindInfo.h
index cc80c0fa9663..ef67a31e7d0d 100644
--- a/include/lldb/Symbol/ArmUnwindInfo.h
+++ b/include/lldb/Symbol/ArmUnwindInfo.h
@@ -12,9 +12,9 @@
#include <vector>
-#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/RangeMap.h"
#include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Utility/DataExtractor.h"
#include "lldb/lldb-private.h"
/*
diff --git a/include/lldb/Symbol/Block.h b/include/lldb/Symbol/Block.h
index eb96318dac04..a5387cca21c5 100644
--- a/include/lldb/Symbol/Block.h
+++ b/include/lldb/Symbol/Block.h
@@ -18,11 +18,12 @@
// Project includes
#include "lldb/Core/AddressRange.h"
#include "lldb/Core/RangeMap.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/SymbolContextScope.h"
+#include "lldb/Utility/Stream.h"
+#include "lldb/Utility/UserID.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/ClangASTContext.h b/include/lldb/Symbol/ClangASTContext.h
index 4262ecb4bf0e..ef1659159697 100644
--- a/include/lldb/Symbol/ClangASTContext.h
+++ b/include/lldb/Symbol/ClangASTContext.h
@@ -31,9 +31,9 @@
// Project includes
#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
#include "lldb/Core/ClangForward.h"
-#include "lldb/Core/ConstString.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-enumerations.h"
class DWARFASTParserClang;
diff --git a/include/lldb/Symbol/CompactUnwindInfo.h b/include/lldb/Symbol/CompactUnwindInfo.h
index 133a886812b3..630067241735 100644
--- a/include/lldb/Symbol/CompactUnwindInfo.h
+++ b/include/lldb/Symbol/CompactUnwindInfo.h
@@ -13,10 +13,10 @@
#include <mutex>
#include <vector>
-#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/RangeMap.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/DataExtractor.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/CompileUnit.h b/include/lldb/Symbol/CompileUnit.h
index 8465f3bb5777..e7a1ebc8c00f 100644
--- a/include/lldb/Symbol/CompileUnit.h
+++ b/include/lldb/Symbol/CompileUnit.h
@@ -12,10 +12,10 @@
#include "lldb/Core/FileSpecList.h"
#include "lldb/Core/ModuleChild.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Symbol/DebugMacros.h"
#include "lldb/Symbol/Function.h"
+#include "lldb/Utility/Stream.h"
+#include "lldb/Utility/UserID.h"
#include "lldb/lldb-enumerations.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/CompilerDecl.h b/include/lldb/Symbol/CompilerDecl.h
index a612fb689c81..5d744d999bea 100644
--- a/include/lldb/Symbol/CompilerDecl.h
+++ b/include/lldb/Symbol/CompilerDecl.h
@@ -10,8 +10,8 @@
#ifndef liblldb_CompilerDecl_h_
#define liblldb_CompilerDecl_h_
-#include "lldb/Core/ConstString.h"
#include "lldb/Symbol/CompilerType.h"
+#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/CompilerDeclContext.h b/include/lldb/Symbol/CompilerDeclContext.h
index e4f3e7459aa7..179a1be0248b 100644
--- a/include/lldb/Symbol/CompilerDeclContext.h
+++ b/include/lldb/Symbol/CompilerDeclContext.h
@@ -12,7 +12,7 @@
#include <vector>
-#include "lldb/Core/ConstString.h"
+#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/CompilerType.h b/include/lldb/Symbol/CompilerType.h
index 68221609c0cb..c5bca54ed43f 100644
--- a/include/lldb/Symbol/CompilerType.h
+++ b/include/lldb/Symbol/CompilerType.h
@@ -23,6 +23,8 @@
namespace lldb_private {
+class DataExtractor;
+
//----------------------------------------------------------------------
// A class that can carry around a clang ASTContext and a opaque clang
// QualType. A clang::QualType can be easily reconstructed from an
diff --git a/include/lldb/Symbol/DWARFCallFrameInfo.h b/include/lldb/Symbol/DWARFCallFrameInfo.h
index c221a36bd6c8..085def8ff0e5 100644
--- a/include/lldb/Symbol/DWARFCallFrameInfo.h
+++ b/include/lldb/Symbol/DWARFCallFrameInfo.h
@@ -14,13 +14,13 @@
#include <mutex>
#include "lldb/Core/AddressRange.h"
-#include "lldb/Core/DataExtractor.h"
-#include "lldb/Core/Flags.h"
+#include "lldb/Utility/Flags.h"
+
#include "lldb/Core/RangeMap.h"
-#include "lldb/Core/VMRange.h"
#include "lldb/Core/dwarf.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/VMRange.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/DebugMacros.h b/include/lldb/Symbol/DebugMacros.h
index 4d4a3273db64..640da027cd59 100644
--- a/include/lldb/Symbol/DebugMacros.h
+++ b/include/lldb/Symbol/DebugMacros.h
@@ -17,7 +17,7 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/ConstString.h"
+#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/DeclVendor.h b/include/lldb/Symbol/DeclVendor.h
index 5ee8b19b6ed0..16d514fdf1bd 100644
--- a/include/lldb/Symbol/DeclVendor.h
+++ b/include/lldb/Symbol/DeclVendor.h
@@ -11,6 +11,7 @@
#define liblldb_DeclVendor_h_
#include "lldb/Core/ClangForward.h"
+#include "lldb/lldb-defines.h"
#include <vector>
diff --git a/include/lldb/Symbol/Declaration.h b/include/lldb/Symbol/Declaration.h
index 1846e2fdca82..581176e23961 100644
--- a/include/lldb/Symbol/Declaration.h
+++ b/include/lldb/Symbol/Declaration.h
@@ -10,7 +10,7 @@
#ifndef liblldb_Declaration_h_
#define liblldb_Declaration_h_
-#include "lldb/Host/FileSpec.h"
+#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/Function.h b/include/lldb/Symbol/Function.h
index 232d0790f492..9d376007a411 100644
--- a/include/lldb/Symbol/Function.h
+++ b/include/lldb/Symbol/Function.h
@@ -12,10 +12,10 @@
#include "lldb/Core/AddressRange.h"
#include "lldb/Core/Mangled.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Expression/DWARFExpression.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Declaration.h"
+#include "lldb/Utility/UserID.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/GoASTContext.h b/include/lldb/Symbol/GoASTContext.h
index 5530a35493dc..6feac7abf162 100644
--- a/include/lldb/Symbol/GoASTContext.h
+++ b/include/lldb/Symbol/GoASTContext.h
@@ -20,9 +20,9 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/ConstString.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Utility/ConstString.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/JavaASTContext.h b/include/lldb/Symbol/JavaASTContext.h
index 6e97674847f4..4fdd2371b67e 100644
--- a/include/lldb/Symbol/JavaASTContext.h
+++ b/include/lldb/Symbol/JavaASTContext.h
@@ -18,8 +18,8 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/ConstString.h"
#include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Utility/ConstString.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/LineEntry.h b/include/lldb/Symbol/LineEntry.h
index 3076ec41d878..b9a1a1442d47 100644
--- a/include/lldb/Symbol/LineEntry.h
+++ b/include/lldb/Symbol/LineEntry.h
@@ -11,7 +11,7 @@
#define liblldb_LineEntry_h_
#include "lldb/Core/AddressRange.h"
-#include "lldb/Host/FileSpec.h"
+#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/OCamlASTContext.h b/include/lldb/Symbol/OCamlASTContext.h
index 9560866d33e6..a261d43519e0 100644
--- a/include/lldb/Symbol/OCamlASTContext.h
+++ b/include/lldb/Symbol/OCamlASTContext.h
@@ -21,9 +21,9 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/ConstString.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Utility/ConstString.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/ObjectContainer.h b/include/lldb/Symbol/ObjectContainer.h
index 6f38b50ba567..110379234fb5 100644
--- a/include/lldb/Symbol/ObjectContainer.h
+++ b/include/lldb/Symbol/ObjectContainer.h
@@ -14,11 +14,11 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Host/Endian.h"
-#include "lldb/Host/FileSpec.h"
+#include "lldb/Utility/DataExtractor.h"
+#include "lldb/Utility/Endian.h"
+#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/ObjectFile.h b/include/lldb/Symbol/ObjectFile.h
index e2e4500ace46..03564eca4b58 100644
--- a/include/lldb/Symbol/ObjectFile.h
+++ b/include/lldb/Symbol/ObjectFile.h
@@ -10,14 +10,15 @@
#ifndef liblldb_ObjectFile_h_
#define liblldb_ObjectFile_h_
-#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/FileSpecList.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Host/Endian.h"
-#include "lldb/Host/FileSpec.h"
#include "lldb/Symbol/Symtab.h"
#include "lldb/Symbol/UnwindTable.h"
+#include "lldb/Utility/DataExtractor.h"
+#include "lldb/Utility/Endian.h"
+#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/UUID.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
@@ -563,6 +564,45 @@ public:
virtual uint32_t GetNumThreadContexts() { return 0; }
+ //------------------------------------------------------------------
+ /// Some object files may have an identifier string embedded in them,
+ /// e.g. in a Mach-O core file using the LC_IDENT load command (which
+ /// is obsolete, but can still be found in some old files)
+ ///
+ /// @return
+ /// Returns the identifier string if one exists, else an empty
+ /// string.
+ //------------------------------------------------------------------
+ virtual std::string GetIdentifierString () {
+ return std::string();
+ }
+
+ //------------------------------------------------------------------
+ /// When the ObjectFile is a core file, lldb needs to locate the
+ /// "binary" in the core file. lldb can iterate over the pages looking
+ /// for a valid binary, but some core files may have metadata
+ /// describing where the main binary is exactly which removes ambiguity
+ /// when there are multiple binaries present in the captured memory pages.
+ ///
+ /// @param[out] address
+ /// If the address of the binary is specified, this will be set.
+ /// This is an address is the virtual address space of the core file
+ /// memory segments; it is not an offset into the object file.
+ /// If no address is available, will be set to LLDB_INVALID_ADDRESS.
+ ///
+ /// @param[out] uuid
+ /// If the uuid of the binary is specified, this will be set.
+ /// If no UUID is available, will be cleared.
+ ///
+ /// @return
+ /// Returns true if either address or uuid has been set.
+ //------------------------------------------------------------------
+ virtual bool GetCorefileMainBinaryInfo (lldb::addr_t &address, UUID &uuid) {
+ address = LLDB_INVALID_ADDRESS;
+ uuid.Clear();
+ return false;
+ }
+
virtual lldb::RegisterContextSP
GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) {
return lldb::RegisterContextSP();
@@ -774,6 +814,20 @@ public:
llvm::StringRef name,
lldb::SymbolType symbol_type_hint = lldb::eSymbolTypeUndefined);
+ //------------------------------------------------------------------
+ /// Loads this objfile to memory.
+ ///
+ /// Loads the bits needed to create an executable image to the memory.
+ /// It is useful with bare-metal targets where target does not have the
+ /// ability to start a process itself.
+ ///
+ /// @param[in] target
+ /// Target where to load.
+ ///
+ /// @return
+ //------------------------------------------------------------------
+ virtual Error LoadInMemory(Target &target, bool set_pc);
+
protected:
//------------------------------------------------------------------
// Member variables.
diff --git a/include/lldb/Symbol/Symbol.h b/include/lldb/Symbol/Symbol.h
index 3f12b9a99b04..44c67f6f4716 100644
--- a/include/lldb/Symbol/Symbol.h
+++ b/include/lldb/Symbol/Symbol.h
@@ -12,8 +12,8 @@
#include "lldb/Core/AddressRange.h"
#include "lldb/Core/Mangled.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Symbol/SymbolContextScope.h"
+#include "lldb/Utility/UserID.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/Type.h b/include/lldb/Symbol/Type.h
index b2a65fabf8f9..9740dc25a587 100644
--- a/include/lldb/Symbol/Type.h
+++ b/include/lldb/Symbol/Type.h
@@ -11,11 +11,11 @@
#define liblldb_Type_h_
#include "lldb/Core/ClangForward.h"
-#include "lldb/Core/ConstString.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Symbol/CompilerDecl.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/Declaration.h"
+#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/UserID.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/APSInt.h"
@@ -23,7 +23,6 @@
#include <set>
namespace lldb_private {
-
//----------------------------------------------------------------------
// CompilerContext allows an array of these items to be passed to
// perform detailed lookups in SymbolVendor and SymbolFile functions.
diff --git a/include/lldb/Symbol/UnwindPlan.h b/include/lldb/Symbol/UnwindPlan.h
index dfcf55bc8864..abb57a2c499d 100644
--- a/include/lldb/Symbol/UnwindPlan.h
+++ b/include/lldb/Symbol/UnwindPlan.h
@@ -19,8 +19,8 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Core/AddressRange.h"
-#include "lldb/Core/ConstString.h"
-#include "lldb/Core/Stream.h"
+#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/Stream.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Symbol/Variable.h b/include/lldb/Symbol/Variable.h
index 33249891d36b..f076a04434e1 100644
--- a/include/lldb/Symbol/Variable.h
+++ b/include/lldb/Symbol/Variable.h
@@ -15,9 +15,9 @@
#include "lldb/Core/Mangled.h"
#include "lldb/Core/RangeMap.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Expression/DWARFExpression.h"
#include "lldb/Symbol/Declaration.h"
+#include "lldb/Utility/UserID.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-private.h"