summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Symtab.cpp
diff options
context:
space:
mode:
authorMohit K. Bhakkad <mohit.bhakkad@gmail.com>2016-01-23 10:36:06 +0000
committerMohit K. Bhakkad <mohit.bhakkad@gmail.com>2016-01-23 10:36:06 +0000
commit0d9dd7df601a3a693f0a339b25ad4afa12a9e7da (patch)
tree71581ae1563c4330933a49054fd234995ac37d76 /lldb/source/Symbol/Symtab.cpp
parentdd5e9d2159385e2f195c5977871ccae310f4a258 (diff)
downloadbcm5719-llvm-0d9dd7df601a3a693f0a339b25ad4afa12a9e7da.tar.gz
bcm5719-llvm-0d9dd7df601a3a693f0a339b25ad4afa12a9e7da.zip
[LLDB] Consider only valid symbols while resolving by address
Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D16397 llvm-svn: 258621
Diffstat (limited to 'lldb/source/Symbol/Symtab.cpp')
-rw-r--r--lldb/source/Symbol/Symtab.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
index 31db57289fd..61b8317fde1 100644
--- a/lldb/source/Symbol/Symtab.cpp
+++ b/lldb/source/Symbol/Symtab.cpp
@@ -1074,6 +1074,26 @@ Symtab::FindSymbolContainingFileAddress (addr_t file_addr)
}
void
+Symtab::ForEachSymbolContainingFileAddresss (addr_t file_addr, std::function <bool(Symbol *)> const &callback)
+{
+ Mutex::Locker locker (m_mutex);
+
+ if (!m_file_addr_to_index_computed)
+ InitAddressIndexes();
+
+ std::vector<uint32_t> all_addr_indexes;
+
+ // Get all symbols with file_addr
+ const size_t addr_match_count = m_file_addr_to_index.FindEntryIndexesThatContains(file_addr, all_addr_indexes);
+
+ for (size_t i=0; i<addr_match_count; ++i)
+ {
+ if (!callback(SymbolAtIndex(all_addr_indexes[i])))
+ break;
+ }
+}
+
+void
Symtab::SymbolIndicesToSymbolContextList (std::vector<uint32_t> &symbol_indexes, SymbolContextList &sc_list)
{
// No need to protect this call using m_mutex all other method calls are
OpenPOWER on IntegriCloud