<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/Core/AddressResolverName.cpp b/lldb/source/Core/AddressResolverName.cpp
index 091a02f..f1874202 100644
--- a/lldb/source/Core/AddressResolverName.cpp
+++ b/lldb/source/Core/AddressResolverName.cpp
@@ -160,9 +160,9 @@
SymbolContext symbol_sc;
if (sym_list.GetContextAtIndex(j, symbol_sc))
{
- if (symbol_sc.symbol && symbol_sc.symbol->GetAddressRangePtr())
+ if (symbol_sc.symbol && symbol_sc.symbol->ValueIsAddress())
{
- if (sc.function->GetAddressRange().GetBaseAddress() == symbol_sc.symbol->GetAddressRangePtr()->GetBaseAddress())
+ if (sc.function->GetAddressRange().GetBaseAddress() == symbol_sc.symbol->GetAddress())
{
sym_list.RemoveContextAtIndex(j);
continue; // Don't increment j
@@ -206,10 +206,10 @@
{
if (sym_list.GetContextAtIndex(i, sc))
{
- if (sc.symbol && sc.symbol->GetAddressRangePtr())
+ if (sc.symbol && sc.symbol->ValueIsAddress())
{
- func_addr = sc.symbol->GetAddressRangePtr()->GetBaseAddress();
- addr_t byte_size = sc.symbol->GetAddressRangePtr()->GetByteSize();
+ func_addr = sc.symbol->GetAddress();
+ addr_t byte_size = sc.symbol->GetByteSize();
if (skip_prologue)
{