diff options
Diffstat (limited to 'lldb/source/Breakpoint')
-rw-r--r-- | lldb/source/Breakpoint/Breakpoint.cpp | 21 | ||||
-rw-r--r-- | lldb/source/Breakpoint/BreakpointLocation.cpp | 13 | ||||
-rw-r--r-- | lldb/source/Breakpoint/BreakpointResolver.cpp | 20 | ||||
-rw-r--r-- | lldb/source/Breakpoint/BreakpointResolverAddress.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Breakpoint/BreakpointResolverName.cpp | 2 |
5 files changed, 28 insertions, 31 deletions
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp index 3c3841949b9..a112542803c 100644 --- a/lldb/source/Breakpoint/Breakpoint.cpp +++ b/lldb/source/Breakpoint/Breakpoint.cpp @@ -496,10 +496,10 @@ void Breakpoint::ClearAllBreakpointSites() { void Breakpoint::ModulesChanged(ModuleList &module_list, bool load, bool delete_locations) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); - if (log) - log->Printf("Breakpoint::ModulesChanged: num_modules: %zu load: %i " - "delete_locations: %i\n", - module_list.GetSize(), load, delete_locations); + LLDB_LOGF(log, + "Breakpoint::ModulesChanged: num_modules: %zu load: %i " + "delete_locations: %i\n", + module_list.GetSize(), load, delete_locations); std::lock_guard<std::recursive_mutex> guard(module_list.GetMutex()); if (load) { @@ -550,10 +550,10 @@ void Breakpoint::ModulesChanged(ModuleList &module_list, bool load, seen = true; if (!break_loc_sp->ResolveBreakpointSite()) { - if (log) - log->Printf("Warning: could not set breakpoint site for " - "breakpoint location %d of breakpoint %d.\n", - break_loc_sp->GetID(), GetID()); + LLDB_LOGF(log, + "Warning: could not set breakpoint site for " + "breakpoint location %d of breakpoint %d.\n", + break_loc_sp->GetID(), GetID()); } } } @@ -659,9 +659,8 @@ static bool SymbolContextsMightBeEquivalent(SymbolContext &old_sc, void Breakpoint::ModuleReplaced(ModuleSP old_module_sp, ModuleSP new_module_sp) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); - if (log) - log->Printf("Breakpoint::ModulesReplaced for %s\n", - old_module_sp->GetSpecificationDescription().c_str()); + LLDB_LOGF(log, "Breakpoint::ModulesReplaced for %s\n", + old_module_sp->GetSpecificationDescription().c_str()); // First find all the locations that are in the old module BreakpointLocationCollection old_break_locs; diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp index b718e2aeea5..46b8f25c566 100644 --- a/lldb/source/Breakpoint/BreakpointLocation.cpp +++ b/lldb/source/Breakpoint/BreakpointLocation.cpp @@ -257,9 +257,8 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx, condition_text, llvm::StringRef(), language, Expression::eResultTypeAny, EvaluateExpressionOptions(), nullptr, error)); if (error.Fail()) { - if (log) - log->Printf("Error getting condition expression: %s.", - error.AsCString()); + LLDB_LOGF(log, "Error getting condition expression: %s.", + error.AsCString()); m_user_expression_sp.reset(); return true; } @@ -312,8 +311,8 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx, ret = result_value_sp->IsLogicalTrue(error); if (log) { if (error.Success()) { - log->Printf("Condition successfully evaluated, result is %s.\n", - ret ? "true" : "false"); + LLDB_LOGF(log, "Condition successfully evaluated, result is %s.\n", + ret ? "true" : "false"); } else { error.SetErrorString( "Failed to get an integer result from the expression"); @@ -408,8 +407,8 @@ bool BreakpointLocation::ShouldStop(StoppointCallbackContext *context) { if (log) { StreamString s; GetDescription(&s, lldb::eDescriptionLevelVerbose); - log->Printf("Hit breakpoint location: %s, %s.\n", s.GetData(), - should_stop ? "stopping" : "continuing"); + LLDB_LOGF(log, "Hit breakpoint location: %s, %s.\n", s.GetData(), + should_stop ? "stopping" : "continuing"); } return should_stop; diff --git a/lldb/source/Breakpoint/BreakpointResolver.cpp b/lldb/source/Breakpoint/BreakpointResolver.cpp index b3224aa9175..849da4b337b 100644 --- a/lldb/source/Breakpoint/BreakpointResolver.cpp +++ b/lldb/source/Breakpoint/BreakpointResolver.cpp @@ -294,18 +294,18 @@ void BreakpointResolver::AddLocation(SearchFilter &filter, Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); Address line_start = sc.line_entry.range.GetBaseAddress(); if (!line_start.IsValid()) { - if (log) - log->Printf("error: Unable to set breakpoint %s at file address " - "0x%" PRIx64 "\n", - log_ident.str().c_str(), line_start.GetFileAddress()); + LLDB_LOGF(log, + "error: Unable to set breakpoint %s at file address " + "0x%" PRIx64 "\n", + log_ident.str().c_str(), line_start.GetFileAddress()); return; } if (!filter.AddressPasses(line_start)) { - if (log) - log->Printf("Breakpoint %s at file address 0x%" PRIx64 - " didn't pass the filter.\n", - log_ident.str().c_str(), line_start.GetFileAddress()); + LLDB_LOGF(log, + "Breakpoint %s at file address 0x%" PRIx64 + " didn't pass the filter.\n", + log_ident.str().c_str(), line_start.GetFileAddress()); } // If the line number is before the prologue end, move it there... @@ -329,8 +329,8 @@ void BreakpointResolver::AddLocation(SearchFilter &filter, if (log && bp_loc_sp && !m_breakpoint->IsInternal()) { StreamString s; bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose); - log->Printf("Added location (skipped prologue: %s): %s \n", - skipped_prologue ? "yes" : "no", s.GetData()); + LLDB_LOGF(log, "Added location (skipped prologue: %s): %s \n", + skipped_prologue ? "yes" : "no", s.GetData()); } } diff --git a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp index 8a6fd6a2692..cc14a134e90 100644 --- a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp @@ -149,8 +149,7 @@ BreakpointResolverAddress::SearchCallback(SearchFilter &filter, bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose); Log *log( lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); - if (log) - log->Printf("Added location: %s\n", s.GetData()); + LLDB_LOGF(log, "Added location: %s\n", s.GetData()); } } else { BreakpointLocationSP loc_sp = m_breakpoint->GetLocationAtIndex(0); diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp index 3ad2e8867f2..afb04036252 100644 --- a/lldb/source/Breakpoint/BreakpointResolverName.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp @@ -388,7 +388,7 @@ BreakpointResolverName::SearchCallback(SearchFilter &filter, if (log) { StreamString s; bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose); - log->Printf("Added location: %s\n", s.GetData()); + LLDB_LOGF(log, "Added location: %s\n", s.GetData()); } } } |