From 2753a165ba6677e8bcd7a702ddb0d67296ff5d09 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Sun, 28 Apr 2013 12:43:56 +0200 Subject: [PATCH] ElfReader: Add support for getting a section iterator Change-Id: I6241ea2de9da1a1e709fae6374df4fc06ef26aaa --- src/core/util/ElfReader.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/util/ElfReader.hpp b/src/core/util/ElfReader.hpp index 1722e0e0..2d12ec10 100644 --- a/src/core/util/ElfReader.hpp +++ b/src/core/util/ElfReader.hpp @@ -80,6 +80,8 @@ namespace fail { typedef ElfSymbol entry_t; typedef std::vector container_t; typedef container_t::const_iterator symbol_iterator; + typedef container_t::const_iterator section_iterator; + /** * Constructor. @@ -144,6 +146,14 @@ namespace fail { container_t::const_iterator sym_begin() { return m_symboltable.begin(); } container_t::const_iterator sym_end() { return m_symboltable.end(); } + /** + * Get section iterator. Derefences to a ElfSymbol + * @return iterator + */ + container_t::const_iterator sec_begin() { return m_sectiontable.begin(); } + container_t::const_iterator sec_end() { return m_sectiontable.end(); } + + private: Logger m_log;