Skip to content

Commit b0787fc

Browse files
committed
Formatter
1 parent 1697694 commit b0787fc

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,14 +697,16 @@ Status MinidumpFileBuilder::AddExceptions() {
697697
Exception exp_record = {};
698698
exp_record.ExceptionCode =
699699
static_cast<llvm::support::ulittle32_t>(stop_info_sp->GetValue());
700-
exp_record.ExceptionFlags = static_cast<llvm::support::ulittle32_t>(Exception::LLDB_FLAG);
700+
exp_record.ExceptionFlags =
701+
static_cast<llvm::support::ulittle32_t>(Exception::LLDB_FLAG);
701702
exp_record.ExceptionRecord = static_cast<llvm::support::ulittle64_t>(0);
702703
exp_record.ExceptionAddress = reg_ctx_sp->GetPC();
703704
exp_record.NumberParameters = static_cast<llvm::support::ulittle32_t>(1);
704705
std::string description = stop_info_sp->GetDescription();
705-
// We have 120 bytes to work with and it's unlikely description will
706+
// We have 120 bytes to work with and it's unlikely description will
706707
// overflow, but we gotta check.
707-
memcpy(&exp_record.ExceptionInformation, description.c_str(), std::max(description.size(), Exception::MaxParameterBytes));
708+
memcpy(&exp_record.ExceptionInformation, description.c_str(),
709+
std::max(description.size(), Exception::MaxParameterBytes));
708710
exp_record.UnusedAlignment = static_cast<llvm::support::ulittle32_t>(0);
709711
ExceptionStream exp_stream;
710712
exp_stream.ThreadId =

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ class MinidumpFileBuilder {
173173
std::unordered_map<lldb::tid_t, llvm::minidump::LocationDescriptor>
174174
m_tid_to_reg_ctx;
175175
lldb::FileUP m_core_file;
176-
lldb_private::SaveCoreOptions m_save_core_options;
176+
lldb_private::SaveCoreOptions m_save_core_options;
177177
};
178178
#endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,14 @@ void ProcessMinidump::RefreshStateAfterStop() {
273273
// No stop.
274274
return;
275275
}
276-
const char * description = nullptr;
277-
if (exception_stream.ExceptionRecord.ExceptionFlags == llvm::minidump::Exception::LLDB_FLAG)
278-
description = reinterpret_cast<const char *>(exception_stream.ExceptionRecord.ExceptionInformation);
279-
280-
stop_info = StopInfo::CreateStopReasonWithSignal(*stop_thread, signo, description);
276+
const char *description = nullptr;
277+
if (exception_stream.ExceptionRecord.ExceptionFlags ==
278+
llvm::minidump::Exception::LLDB_FLAG)
279+
description = reinterpret_cast<const char *>(
280+
exception_stream.ExceptionRecord.ExceptionInformation);
281+
282+
stop_info = StopInfo::CreateStopReasonWithSignal(*stop_thread, signo,
283+
description);
281284
} else if (arch.GetTriple().getVendor() == llvm::Triple::Apple) {
282285
stop_info = StopInfoMachException::CreateStopReasonWithMachException(
283286
*stop_thread, exception_stream.ExceptionRecord.ExceptionCode, 2,

0 commit comments

Comments
 (0)