diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-03-07 21:03:09 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-03-07 21:03:09 +0000 |
| commit | e761213428bb1ad8a8835ac4bf52233ae2121f3c (patch) | |
| tree | 746b13d7e3e796f69acc994362c23f732a380542 /lldb/source/Expression | |
| parent | 377f1f2d399171983cc26c13e81bad1699025dde (diff) | |
| download | bcm5719-llvm-e761213428bb1ad8a8835ac4bf52233ae2121f3c.tar.gz bcm5719-llvm-e761213428bb1ad8a8835ac4bf52233ae2121f3c.zip | |
<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
Diffstat (limited to 'lldb/source/Expression')
| -rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index c9f08ebdc9a..12b35f99793 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -732,7 +732,7 @@ ClangExpressionDeclMap::GetFunctionAddress if (sym_ctx.function) func_so_addr = &sym_ctx.function->GetAddressRange().GetBaseAddress(); else if (sym_ctx.symbol) - func_so_addr = &sym_ctx.symbol->GetAddressRangeRef().GetBaseAddress(); + func_so_addr = &sym_ctx.symbol->GetAddress(); else return false; @@ -759,7 +759,7 @@ ClangExpressionDeclMap::GetSymbolAddress (Target &target, const ConstString &nam SymbolContext sym_ctx; sc_list.GetContextAtIndex(i, sym_ctx); - const Address *sym_address = &sym_ctx.symbol->GetAddressRangeRef().GetBaseAddress(); + const Address *sym_address = &sym_ctx.symbol->GetAddress(); if (!sym_address || !sym_address->IsValid()) return LLDB_INVALID_ADDRESS; @@ -1036,7 +1036,7 @@ ClangExpressionDeclMap::LookupDecl (clang::NamedDecl *decl, ClangExpressionVaria } else if (expr_var_sp->m_parser_vars->m_lldb_sym) { - const Address sym_address = expr_var_sp->m_parser_vars->m_lldb_sym->GetAddressRangeRef().GetBaseAddress(); + const Address sym_address = expr_var_sp->m_parser_vars->m_lldb_sym->GetAddress(); if (!sym_address.IsValid()) return Value(); @@ -3008,8 +3008,7 @@ ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context, std::auto_ptr<Value> symbol_location(new Value); - AddressRange &symbol_range = symbol.GetAddressRangeRef(); - Address &symbol_address = symbol_range.GetBaseAddress(); + Address &symbol_address = symbol.GetAddress(); lldb::addr_t symbol_load_addr = symbol_address.GetLoadAddress(target); symbol_location->SetContext(Value::eContextTypeClangType, user_type.GetOpaqueQualType()); @@ -3196,8 +3195,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context, } else if (symbol) { - fun_address = &symbol->GetAddressRangeRef().GetBaseAddress(); - + fun_address = &symbol->GetAddress(); fun_decl = context.AddGenericFunDecl(); } else |

