Skip to content

Commit 781ba90

Browse files
authored
Merge pull request #7052 from apple/🍒/5.9/e0e36e3725b5+520681e56d3a
🍒/5.9/e0e36e3725b5+520681e56d3a
2 parents 8b7e12f + d8dedc2 commit 781ba90

File tree

21 files changed

+66
-62
lines changed

21 files changed

+66
-62
lines changed

lldb/source/API/SBTarget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,8 @@ bool SBTarget::FindBreakpointsByName(const char *name,
11531153
llvm::Expected<std::vector<BreakpointSP>> expected_vector =
11541154
target_sp->GetBreakpointList().FindBreakpointsByName(name);
11551155
if (!expected_vector) {
1156-
LLDB_LOG(GetLog(LLDBLog::Breakpoints), "invalid breakpoint name: {}",
1157-
llvm::toString(expected_vector.takeError()));
1156+
LLDB_LOG_ERROR(GetLog(LLDBLog::Breakpoints), expected_vector.takeError(),
1157+
"invalid breakpoint name: {0}");
11581158
return false;
11591159
}
11601160
for (BreakpointSP bkpt_sp : *expected_vector) {
@@ -1627,7 +1627,7 @@ const char *SBTarget::GetTriple() {
16271627

16281628
const char *SBTarget::GetABIName() {
16291629
LLDB_INSTRUMENT_VA(this);
1630-
1630+
16311631
TargetSP target_sp(GetSP());
16321632
if (target_sp) {
16331633
std::string abi_name(target_sp->GetABIName().str());

lldb/source/Breakpoint/Watchpoint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ Watchpoint::Watchpoint(Target &target, lldb::addr_t addr, uint32_t size,
4141
target.GetScratchTypeSystemForLanguage(eLanguageTypeC);
4242
if (auto err = type_system_or_err.takeError()) {
4343
LLDB_LOG_ERROR(GetLog(LLDBLog::Watchpoints), std::move(err),
44-
"Failed to set type.");
44+
"Failed to set type: {0}");
4545
} else {
4646
if (auto ts = *type_system_or_err)
4747
m_type =
4848
ts->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 8 * size);
4949
else
5050
LLDB_LOG_ERROR(GetLog(LLDBLog::Watchpoints), std::move(err),
51-
"Failed to set type. Typesystem is no longer live.");
51+
"Failed to set type: Typesystem is no longer live: {0}");
5252
}
5353
}
5454

lldb/source/Core/Debugger.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,8 +1880,8 @@ bool Debugger::StartEventHandlerThread() {
18801880
if (event_handler_thread) {
18811881
m_event_handler_thread = *event_handler_thread;
18821882
} else {
1883-
LLDB_LOG(GetLog(LLDBLog::Host), "failed to launch host thread: {}",
1884-
llvm::toString(event_handler_thread.takeError()));
1883+
LLDB_LOG_ERROR(GetLog(LLDBLog::Host), event_handler_thread.takeError(),
1884+
"failed to launch host thread: {0}");
18851885
}
18861886

18871887
// Make sure DefaultEventHandler() is running and listening to events
@@ -2021,8 +2021,8 @@ bool Debugger::StartIOHandlerThread() {
20212021
if (io_handler_thread) {
20222022
m_io_handler_thread = *io_handler_thread;
20232023
} else {
2024-
LLDB_LOG(GetLog(LLDBLog::Host), "failed to launch host thread: {}",
2025-
llvm::toString(io_handler_thread.takeError()));
2024+
LLDB_LOG_ERROR(GetLog(LLDBLog::Host), io_handler_thread.takeError(),
2025+
"failed to launch host thread: {0}");
20262026
}
20272027
}
20282028
return m_io_handler_thread.IsJoinable();

lldb/source/Core/ThreadedCommunication.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ bool ThreadedCommunication::StartReadThread(Status *error_ptr) {
178178
if (error_ptr)
179179
*error_ptr = Status(maybe_thread.takeError());
180180
else {
181-
LLDB_LOG(GetLog(LLDBLog::Host), "failed to launch host thread: {}",
182-
llvm::toString(maybe_thread.takeError()));
181+
LLDB_LOG_ERROR(GetLog(LLDBLog::Host), maybe_thread.takeError(),
182+
"failed to launch host thread: {0}");
183183
}
184184
}
185185

lldb/source/Core/ValueObjectRegister.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ CompilerType ValueObjectRegister::GetCompilerTypeImpl() {
204204
exe_module->GetTypeSystemForLanguage(eLanguageTypeC);
205205
if (auto err = type_system_or_err.takeError()) {
206206
LLDB_LOG_ERROR(GetLog(LLDBLog::Types), std::move(err),
207-
"Unable to get CompilerType from TypeSystem");
207+
"Unable to get CompilerType from TypeSystem: {0}");
208208
} else {
209209
if (auto ts = *type_system_or_err)
210210
m_compiler_type = ts->GetBuiltinTypeForEncodingAndBitSize(

lldb/source/Host/common/ProcessLaunchInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ bool ProcessLaunchInfo::MonitorProcess() const {
182182
llvm::Expected<HostThread> maybe_thread =
183183
Host::StartMonitoringChildProcess(m_monitor_callback, GetProcessID());
184184
if (!maybe_thread)
185-
LLDB_LOG(GetLog(LLDBLog::Host), "failed to launch host thread: {}",
186-
llvm::toString(maybe_thread.takeError()));
185+
LLDB_LOG_ERROR(GetLog(LLDBLog::Host), maybe_thread.takeError(),
186+
"failed to launch host thread: {0}");
187187
return true;
188188
}
189189
return false;

lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BlockPointerSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
4545
lldb::eLanguageTypeC_plus_plus);
4646
if (auto err = type_system_or_err.takeError()) {
4747
LLDB_LOG_ERROR(GetLog(LLDBLog::DataFormatters), std::move(err),
48-
"Failed to get scratch TypeSystemClang");
48+
"Failed to get scratch TypeSystemClang: {0}");
4949
return;
5050
}
5151

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(
16981698
entsize));
16991699
if (auto Err = shared_cache_image_headers->UpdateIfNeeded()) {
17001700
LLDB_LOG_ERROR(log, std::move(Err),
1701-
"Failed to update SharedCacheImageHeaders");
1701+
"Failed to update SharedCacheImageHeaders: {0}");
17021702
return nullptr;
17031703
}
17041704

@@ -1758,7 +1758,7 @@ bool AppleObjCRuntimeV2::SharedCacheImageHeaders::IsImageLoaded(
17581758
if (auto Err = UpdateIfNeeded()) {
17591759
Log *log = GetLog(LLDBLog::Process | LLDBLog::Types);
17601760
LLDB_LOG_ERROR(log, std::move(Err),
1761-
"Failed to update SharedCacheImageHeaders");
1761+
"Failed to update SharedCacheImageHeaders: {0}");
17621762
}
17631763
return m_loaded_images.test(image_index);
17641764
}
@@ -1767,7 +1767,7 @@ uint64_t AppleObjCRuntimeV2::SharedCacheImageHeaders::GetVersion() {
17671767
if (auto Err = UpdateIfNeeded()) {
17681768
Log *log = GetLog(LLDBLog::Process | LLDBLog::Types);
17691769
LLDB_LOG_ERROR(log, std::move(Err),
1770-
"Failed to update SharedCacheImageHeaders");
1770+
"Failed to update SharedCacheImageHeaders: {0}");
17711771
}
17721772
return m_version;
17731773
}

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ void SwiftLanguageRuntimeImpl::WillStartExecutingUserExpression(
18861886
if (!type_system_or_err) {
18871887
LLDB_LOG_ERROR(
18881888
log, type_system_or_err.takeError(),
1889-
"SwiftLanguageRuntime: Unable to get pointer to type system");
1889+
"SwiftLanguageRuntime: Unable to get pointer to type system: {0}");
18901890
return;
18911891
}
18921892

@@ -1961,7 +1961,7 @@ void SwiftLanguageRuntimeImpl::DidFinishExecutingUserExpression(
19611961
if (!type_system_or_err) {
19621962
LLDB_LOG_ERROR(
19631963
log, type_system_or_err.takeError(),
1964-
"SwiftLanguageRuntime: Unable to get pointer to type system");
1964+
"SwiftLanguageRuntime: Unable to get pointer to type system: {0}");
19651965
return;
19661966
}
19671967

lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ bool ProcessKDP::StartAsyncThread() {
730730
"<lldb.process.kdp-remote.async>", [this] { return AsyncThread(); });
731731
if (!async_thread) {
732732
LLDB_LOG_ERROR(GetLog(LLDBLog::Host), async_thread.takeError(),
733-
"failed to launch host thread: {}");
733+
"failed to launch host thread: {0}");
734734
return false;
735735
}
736736
m_async_thread = *async_thread;

0 commit comments

Comments
 (0)