summaryrefslogtreecommitdiff
path: root/include/lldb/Symbol/ObjectFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Symbol/ObjectFile.h')
-rw-r--r--include/lldb/Symbol/ObjectFile.h96
1 files changed, 95 insertions, 1 deletions
diff --git a/include/lldb/Symbol/ObjectFile.h b/include/lldb/Symbol/ObjectFile.h
index 8934c31bb988..ad500f5413b8 100644
--- a/include/lldb/Symbol/ObjectFile.h
+++ b/include/lldb/Symbol/ObjectFile.h
@@ -368,6 +368,34 @@ public:
GetSymtab () = 0;
//------------------------------------------------------------------
+ /// Appends a Symbol for the specified so_addr to the symbol table.
+ ///
+ /// If verify_unique is false, the symbol table is not searched
+ /// to determine if a Symbol found at this address has already been
+ /// added to the symbol table. When verify_unique is true, this
+ /// method resolves the Symbol as the first match in the SymbolTable
+ /// and appends a Symbol only if required/found.
+ ///
+ /// @return
+ /// The resolved symbol or nullptr. Returns nullptr if a
+ /// a Symbol could not be found for the specified so_addr.
+ //------------------------------------------------------------------
+ virtual Symbol *
+ ResolveSymbolForAddress(const Address &so_addr, bool verify_unique)
+ {
+ // Typically overridden to lazily add stripped symbols recoverable from
+ // the exception handling unwind information (i.e. without parsing
+ // the entire eh_frame section.
+ //
+ // The availability of LC_FUNCTION_STARTS allows ObjectFileMachO
+ // to efficiently add stripped symbols when the symbol table is
+ // first constructed. Poorer cousins are PECoff and ELF.
+ return nullptr;
+ }
+
+ //------------------------------------------------------------------
+ /// Detect if this object file has been stripped of local symbols.
+ //------------------------------------------------------------------
/// Detect if this object file has been stripped of local symbols.
///
/// @return
@@ -478,7 +506,7 @@ public:
/// The address of any auxiliary tables, or an invalid address if this
/// object file format does not support or contain such information.
virtual lldb_private::Address
- GetImageInfoAddress () { return Address(); }
+ GetImageInfoAddress (Target *target) { return Address(); }
//------------------------------------------------------------------
/// Returns the address of the Entry Point in this object file - if
@@ -612,6 +640,72 @@ public:
}
return 0;
}
+
+ //------------------------------------------------------------------
+ /// Get the minimum OS version this object file can run on.
+ ///
+ /// Some object files have information that specifies the minimum OS
+ /// version that they can be used on.
+ ///
+ /// If \a versions is NULL, or if \a num_versions is 0, the return
+ /// value will indicate how many version numbers are available in
+ /// this object file. Then a subsequent call can be made to this
+ /// function with a value of \a versions and \a num_versions that
+ /// has enough storage to store some or all version numbers.
+ ///
+ /// @param[out] versions
+ /// A pointer to an array of uint32_t types that is \a num_versions
+ /// long. If this value is NULL, the return value will indicate
+ /// how many version numbers are required for a subsequent call
+ /// to this function so that all versions can be retrieved. If
+ /// the value is non-NULL, then at most \a num_versions of the
+ /// existing versions numbers will be filled into \a versions.
+ /// If there is no version information available, \a versions
+ /// will be filled with \a num_versions UINT32_MAX values
+ /// and zero will be returned.
+ ///
+ /// @param[in] num_versions
+ /// The maximum number of entries to fill into \a versions. If
+ /// this value is zero, then the return value will indicate
+ /// how many version numbers there are in total so another call
+ /// to this function can be make with adequate storage in
+ /// \a versions to get all of the version numbers. If \a
+ /// num_versions is less than the actual number of version
+ /// numbers in this object file, only \a num_versions will be
+ /// filled into \a versions (if \a versions is non-NULL).
+ ///
+ /// @return
+ /// This function always returns the number of version numbers
+ /// that this object file has regardless of the number of
+ /// version numbers that were copied into \a versions.
+ //------------------------------------------------------------------
+ virtual uint32_t
+ GetMinimumOSVersion (uint32_t *versions, uint32_t num_versions)
+ {
+ if (versions && num_versions)
+ {
+ for (uint32_t i=0; i<num_versions; ++i)
+ versions[i] = UINT32_MAX;
+ }
+ return 0;
+ }
+
+ //------------------------------------------------------------------
+ /// Get the SDK OS version this object file was built with.
+ ///
+ /// The versions arguments and returns values are the same as the
+ /// GetMinimumOSVersion()
+ //------------------------------------------------------------------
+ virtual uint32_t
+ GetSDKVersion (uint32_t *versions, uint32_t num_versions)
+ {
+ if (versions && num_versions)
+ {
+ for (uint32_t i=0; i<num_versions; ++i)
+ versions[i] = UINT32_MAX;
+ }
+ return 0;
+ }
//------------------------------------------------------------------
// Member Functions