summaryrefslogtreecommitdiffstats
path: root/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
committeremaste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
commit0f31a1ef7ecf609d469ee5b34b3f0cb24ae3492d (patch)
treeb2051e4e4856cc58ac7e2d20242b870b4f355ca1 /source/Plugins/ObjectFile/ELF/ObjectFileELF.h
parentc727fe695d28799acb499e9961f11ec07d4f9fe2 (diff)
downloadFreeBSD-src-0f31a1ef7ecf609d469ee5b34b3f0cb24ae3492d.zip
FreeBSD-src-0f31a1ef7ecf609d469ee5b34b3f0cb24ae3492d.tar.gz
Import lldb as of SVN r196259 (git 3be86e5)
(A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Plugins/ObjectFile/ELF/ObjectFileELF.h')
-rw-r--r--source/Plugins/ObjectFile/ELF/ObjectFileELF.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index ede886f..a2ab9b8 100644
--- a/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -20,6 +20,34 @@
#include "ELFHeader.h"
+struct ELFNote
+{
+ elf::elf_word n_namesz;
+ elf::elf_word n_descsz;
+ elf::elf_word n_type;
+
+ std::string n_name;
+
+ ELFNote() : n_namesz(0), n_descsz(0), n_type(0)
+ {
+ }
+
+ /// Parse an ELFNote entry from the given DataExtractor starting at position
+ /// \p offset.
+ ///
+ /// @param[in] data
+ /// The DataExtractor to read from.
+ ///
+ /// @param[in,out] offset
+ /// Pointer to an offset in the data. On return the offset will be
+ /// advanced by the number of bytes read.
+ ///
+ /// @return
+ /// True if the ELFRel entry was successfully read and false otherwise.
+ bool
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
+};
+
//------------------------------------------------------------------------------
/// @class ObjectFileELF
/// @brief Generic ELF object file reader.
OpenPOWER on IntegriCloud