SBAddress::SBAddress () :
- m_opaque_ap ()
+ m_opaque_ap (new Address())
{
}
SBAddress::SBAddress (const Address *lldb_object_ptr) :
- m_opaque_ap ()
+ m_opaque_ap (new Address())
{
if (lldb_object_ptr)
ref() = *lldb_object_ptr;
}
SBAddress::SBAddress (const SBAddress &rhs) :
- m_opaque_ap ()
+ m_opaque_ap (new Address())
{
if (rhs.IsValid())
ref() = rhs.ref();
// Create an address by resolving a load address using the supplied target
SBAddress::SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target) :
- m_opaque_ap()
+ m_opaque_ap(new Address())
{
SetLoadAddress (load_addr, target);
}
if (rhs.IsValid())
ref() = rhs.ref();
else
- m_opaque_ap.reset();
+ m_opaque_ap.reset (new Address());
}
return *this;
}
void
SBAddress::Clear ()
{
- m_opaque_ap.reset();
+ m_opaque_ap.reset (new Address());
}
void
if (lldb_object_ptr)
ref() = *lldb_object_ptr;
else
- m_opaque_ap.reset();
+ m_opaque_ap.reset (new Address());
}
lldb::addr_t
SBAddress::GetFileAddress () const
{
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
return m_opaque_ap->GetFileAddress();
else
return LLDB_INVALID_ADDRESS;
TargetSP target_sp (target.GetSP());
if (target_sp)
{
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
{
Mutex::Locker api_locker (target_sp->GetAPIMutex());
addr = m_opaque_ap->GetLoadAddress (target_sp.get());
bool
SBAddress::OffsetAddress (addr_t offset)
{
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
{
addr_t addr_offset = m_opaque_ap->GetOffset();
if (addr_offset != LLDB_INVALID_ADDRESS)
SBAddress::GetSection ()
{
lldb::SBSection sb_section;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_section.SetSP (m_opaque_ap->GetSection());
return sb_section;
}
lldb::addr_t
SBAddress::GetOffset ()
{
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
return m_opaque_ap->GetOffset();
return 0;
}
// Call "ref()" on the stream to make sure it creates a backing stream in
// case there isn't one already...
Stream &strm = description.ref();
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
{
m_opaque_ap->Dump (&strm,
NULL,
SBAddress::GetModule ()
{
SBModule sb_module;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_module.SetSP (m_opaque_ap->GetModule());
return sb_module;
}
SBAddress::GetSymbolContext (uint32_t resolve_scope)
{
SBSymbolContext sb_sc;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
m_opaque_ap->CalculateSymbolContext (&sb_sc.ref(), resolve_scope);
return sb_sc;
}
SBAddress::GetCompileUnit ()
{
SBCompileUnit sb_comp_unit;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_comp_unit.reset(m_opaque_ap->CalculateSymbolContextCompileUnit());
return sb_comp_unit;
}
SBAddress::GetFunction ()
{
SBFunction sb_function;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_function.reset(m_opaque_ap->CalculateSymbolContextFunction());
return sb_function;
}
SBAddress::GetBlock ()
{
SBBlock sb_block;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_block.SetPtr(m_opaque_ap->CalculateSymbolContextBlock());
return sb_block;
}
SBAddress::GetSymbol ()
{
SBSymbol sb_symbol;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
sb_symbol.reset(m_opaque_ap->CalculateSymbolContextSymbol());
return sb_symbol;
}
SBAddress::GetLineEntry ()
{
SBLineEntry sb_line_entry;
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
{
LineEntry line_entry;
if (m_opaque_ap->CalculateSymbolContextLineEntry (line_entry))
AddressClass
SBAddress::GetAddressClass ()
{
- if (m_opaque_ap.get())
+ if (m_opaque_ap->IsValid())
return m_opaque_ap->GetAddressClass();
return eAddressClassInvalid;
}