<rdar://problem/10997402>
This fix really needed to happen as a previous fix I had submitted for
calculating symbol sizes made many symbols appear to have zero size since
the function that was calculating the symbol size was calling another function
that would cause the calculation to happen again. This resulted in some symbols
having zero size when they shouldn't. This could then cause infinite stack
traces and many other side affects.
llvm-svn: 152244
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 4f02a93..a45ef82 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -266,10 +266,9 @@
Symbol *symbol = symtab->FindSymbolContainingFileAddress(file_addr);
if (symbol)
{
- const AddressRange *range_ptr = symbol->GetAddressRangePtr();
- if (range_ptr)
+ if (symbol->ValueIsAddress())
{
- const SectionSP section_sp (range_ptr->GetBaseAddress().GetSection());
+ const SectionSP section_sp (symbol->GetAddress().GetSection());
if (section_sp)
{
const SectionType section_type = section_sp->GetType();