Skip to content

Commit ffc83c9

Browse files
committed
format test/add LLDB_LOG_ERROR
1 parent 95ef690 commit ffc83c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lldb/source/Plugins/Process/minidump/MinidumpParser.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ MinidumpParser::GetThreadContext(const minidump::Thread &td) {
108108

109109
llvm::ArrayRef<uint8_t>
110110
MinidumpParser::GetThreadContextWow64(const minidump::Thread &td) {
111+
Log *log = GetLog(LLDBLog::Process);
111112
// On Windows, a 32-bit process can run on a 64-bit machine under WOW64. If
112113
// the minidump was captured with a 64-bit debugger, then the CONTEXT we just
113114
// grabbed from the mini_dump_thread is the one for the 64-bit "native"
@@ -116,7 +117,8 @@ MinidumpParser::GetThreadContextWow64(const minidump::Thread &td) {
116117
// Block) of the 64-bit process.
117118
auto teb_mem_maybe = GetMemory(td.EnvironmentBlock, sizeof(TEB64));
118119
if (!teb_mem_maybe) {
119-
llvm::consumeError(teb_mem_maybe.takeError());
120+
LLDB_LOG_ERROR(log, teb_mem_maybe.takeError(),
121+
"Failed to read Thread Environment Block: {0}");
120122
return {};
121123
}
122124

@@ -135,7 +137,8 @@ MinidumpParser::GetThreadContextWow64(const minidump::Thread &td) {
135137
auto context_maybe =
136138
GetMemory(wow64teb->tls_slots[1] + 4, sizeof(MinidumpContext_x86_32));
137139
if (!context_maybe) {
138-
llvm::consumeError(context_maybe.takeError());
140+
LLDB_LOG_ERROR(log, context_maybe.takeError(),
141+
"Failed to read WOW Thread Context: {0}");
139142
return {};
140143
}
141144

0 commit comments

Comments
 (0)