diff options
Diffstat (limited to 'lldb/source/Core/Address.cpp')
-rw-r--r-- | lldb/source/Core/Address.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index a3912bef5a6e..b9a7b4a3894a 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -418,13 +418,13 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, section_sp->DumpName(s); s->Printf(" + %" PRIu64, m_offset); } else { - s->Address(m_offset, addr_size); + DumpAddress(s->AsRawOstream(), m_offset, addr_size); } break; case DumpStyleSectionPointerOffset: s->Printf("(Section *)%p + ", static_cast<void *>(section_sp.get())); - s->Address(m_offset, addr_size); + DumpAddress(s->AsRawOstream(), m_offset, addr_size); break; case DumpStyleModuleWithFileAddress: @@ -444,7 +444,7 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size); return false; } - s->Address(file_addr, addr_size); + DumpAddress(s->AsRawOstream(), file_addr, addr_size); if (style == DumpStyleModuleWithFileAddress && section_sp) s->PutChar(']'); } break; @@ -472,7 +472,7 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size); return false; } - s->Address(load_addr, addr_size); + DumpAddress(s->AsRawOstream(), load_addr, addr_size); } break; case DumpStyleResolvedDescription: @@ -712,22 +712,20 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, [](Variable *) { return true; }, &variable_list); - const size_t num_variables = variable_list.GetSize(); - for (size_t var_idx = 0; var_idx < num_variables; ++var_idx) { - Variable *var = variable_list.GetVariableAtIndex(var_idx).get(); - if (var && var->LocationIsValidForAddress(*this)) { + for (const VariableSP &var_sp : variable_list) { + if (var_sp && var_sp->LocationIsValidForAddress(*this)) { s->Indent(); s->Printf(" Variable: id = {0x%8.8" PRIx64 "}, name = \"%s\"", - var->GetID(), var->GetName().GetCString()); - Type *type = var->GetType(); + var_sp->GetID(), var_sp->GetName().GetCString()); + Type *type = var_sp->GetType(); if (type) s->Printf(", type = \"%s\"", type->GetName().GetCString()); else s->PutCString(", type = <unknown>"); s->PutCString(", location = "); - var->DumpLocationForAddress(s, *this); + var_sp->DumpLocationForAddress(s, *this); s->PutCString(", decl = "); - var->GetDeclaration().DumpStopContext(s, false); + var_sp->GetDeclaration().DumpStopContext(s, false); s->EOL(); } } @@ -756,7 +754,8 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, if (dereferenced_addr.Dump(&strm, exe_scope, DumpStyleResolvedDescription, DumpStyleInvalid, addr_size)) { - s->Address(dereferenced_load_addr, addr_size, " -> ", " "); + DumpAddress(s->AsRawOstream(), dereferenced_load_addr, addr_size, + " -> ", " "); s->Write(strm.GetString().data(), strm.GetSize()); return true; } |