bool BreakpointLocation::ResolveBreakpointSite () { if (m_bp_site_sp) return true; Process *process = m_owner.GetTarget().GetProcessSP().get(); if (process == NULL) return false; if (m_owner.GetTarget().GetSectionLoadList().IsEmpty()) return false; BreakpointLocationSP this_sp(this); lldb::break_id_t new_id = process->CreateBreakpointSite (this_sp, false); if (new_id == LLDB_INVALID_BREAK_ID) { LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); if (log) log->Warning ("Tried to add breakpoint site at 0x%llx but it was already present.\n", m_address.GetOpcodeLoadAddress (&m_owner.GetTarget())); return false; } return true; }
bool BreakpointLocation::ResolveBreakpointSite() { if (m_bp_site_sp) return true; Process *process = m_owner.GetTarget().GetProcessSP().get(); if (process == nullptr) return false; lldb::break_id_t new_id = process->CreateBreakpointSite(shared_from_this(), m_owner.IsHardware()); if (new_id == LLDB_INVALID_BREAK_ID) { Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS); if (log) log->Warning("Failed to add breakpoint site at 0x%" PRIx64, m_address.GetOpcodeLoadAddress(&m_owner.GetTarget())); } return IsResolved(); }