[Lldb-commits] [lldb] 5b17eb1 - [lldb] Fix stale diagnostic event comments (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 24 11:14:58 PDT 2022
Author: Jonas Devlieghere
Date: 2022-10-24T11:14:52-07:00
New Revision: 5b17eb1c1e152a6d7dbcb94d7613bc2a7ea0b92b
URL: https://github.com/llvm/llvm-project/commit/5b17eb1c1e152a6d7dbcb94d7613bc2a7ea0b92b
DIFF: https://github.com/llvm/llvm-project/commit/5b17eb1c1e152a6d7dbcb94d7613bc2a7ea0b92b.diff
LOG: [lldb] Fix stale diagnostic event comments (NFC)
The diagnostic events were heavily inspired by the progress events and
several comments incorrectly referenced "progress" rather than
"diagnostic" events.
Added:
Modified:
lldb/include/lldb/Core/Debugger.h
lldb/source/Core/Debugger.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h
index cfab213dcd026..394dac3662345 100644
--- a/lldb/include/lldb/Core/Debugger.h
+++ b/lldb/include/lldb/Core/Debugger.h
@@ -383,17 +383,17 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
/// Report warning events.
///
- /// Progress events will be delivered to any debuggers that have listeners
- /// for the eBroadcastBitError.
+ /// Warning events will be delivered to any debuggers that have listeners
+ /// for the eBroadcastBitWarning.
///
/// \param[in] message
/// The warning message to be reported.
///
/// \param [in] debugger_id
/// If this optional parameter has a value, it indicates the unique
- /// debugger identifier that this progress should be delivered to. If this
- /// optional parameter does not have a value, the progress will be
- /// delivered to all debuggers.
+ /// debugger identifier that this diagnostic should be delivered to. If
+ /// this optional parameter does not have a value, the diagnostic event
+ /// will be delivered to all debuggers.
///
/// \param [in] once
/// If a pointer is passed to a std::once_flag, then it will be used to
@@ -405,7 +405,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
/// Report error events.
///
- /// Progress events will be delivered to any debuggers that have listeners
+ /// Error events will be delivered to any debuggers that have listeners
/// for the eBroadcastBitError.
///
/// \param[in] message
@@ -413,9 +413,9 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
///
/// \param [in] debugger_id
/// If this optional parameter has a value, it indicates the unique
- /// debugger identifier that this progress should be delivered to. If this
- /// optional parameter does not have a value, the progress will be
- /// delivered to all debuggers.
+ /// debugger identifier that this diagnostic should be delivered to. If
+ /// this optional parameter does not have a value, the diagnostic event
+ /// will be delivered to all debuggers.
///
/// \param [in] once
/// If a pointer is passed to a std::once_flag, then it will be used to
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 6ce811b825c56..e12979234bb96 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1338,7 +1338,7 @@ void Debugger::ReportDiagnosticImpl(DiagnosticEventData::Type type,
llvm::Optional<lldb::user_id_t> debugger_id,
std::once_flag *once) {
auto ReportDiagnosticLambda = [&]() {
- // Check if this progress is for a specific debugger.
+ // Check if this diagnostic is for a specific debugger.
if (debugger_id) {
// It is debugger specific, grab it and deliver the event if the debugger
// still exists.
@@ -1347,8 +1347,8 @@ void Debugger::ReportDiagnosticImpl(DiagnosticEventData::Type type,
PrivateReportDiagnostic(*debugger_sp, type, std::move(message), true);
return;
}
- // The progress event is not debugger specific, iterate over all debuggers
- // and deliver a progress event to each one.
+ // The diagnostic event is not debugger specific, iterate over all debuggers
+ // and deliver a diagnostic event to each one.
if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) {
std::lock_guard<std::recursive_mutex> guard(*g_debugger_list_mutex_ptr);
for (const auto &debugger : *g_debugger_list_ptr)
@@ -1372,7 +1372,6 @@ void Debugger::ReportWarning(std::string message,
void Debugger::ReportError(std::string message,
llvm::Optional<lldb::user_id_t> debugger_id,
std::once_flag *once) {
-
ReportDiagnosticImpl(DiagnosticEventData::Type::Error, std::move(message),
debugger_id, once);
}
More information about the lldb-commits
mailing list