Skip to content

Commit c4c25e1

Browse files
committed
ProcessMachCore: Fix a -Wmisleading-indentation warning
llvm-svn: 366803
1 parent 402bf28 commit c4c25e1

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -338,44 +338,43 @@ Status ProcessMachCore::DoLoadCore() {
338338
"from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'",
339339
corefile_identifier.c_str());
340340

341-
// We're only given a UUID here, not a load address.
342-
// But there are python scripts in the EFI binary's dSYM which
343-
// know how to relocate the binary to the correct load address.
344-
// lldb only needs to locate & load the binary + dSYM.
345-
ModuleSpec module_spec;
346-
module_spec.GetUUID() = uuid;
347-
module_spec.GetArchitecture() = GetTarget().GetArchitecture();
348-
349-
// Lookup UUID locally, before attempting dsymForUUID like action
350-
FileSpecList search_paths =
351-
Target::GetDefaultDebugFileSearchPaths();
352-
module_spec.GetSymbolFileSpec() =
353-
Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
354-
if (module_spec.GetSymbolFileSpec()) {
355-
ModuleSpec executable_module_spec =
356-
Symbols::LocateExecutableObjectFile(module_spec);
357-
if (FileSystem::Instance().Exists(executable_module_spec.GetFileSpec())) {
358-
module_spec.GetFileSpec() =
359-
executable_module_spec.GetFileSpec();
360-
}
341+
// We're only given a UUID here, not a load address.
342+
// But there are python scripts in the EFI binary's dSYM which
343+
// know how to relocate the binary to the correct load address.
344+
// lldb only needs to locate & load the binary + dSYM.
345+
ModuleSpec module_spec;
346+
module_spec.GetUUID() = uuid;
347+
module_spec.GetArchitecture() = GetTarget().GetArchitecture();
348+
349+
// Lookup UUID locally, before attempting dsymForUUID like action
350+
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
351+
module_spec.GetSymbolFileSpec() =
352+
Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
353+
if (module_spec.GetSymbolFileSpec()) {
354+
ModuleSpec executable_module_spec =
355+
Symbols::LocateExecutableObjectFile(module_spec);
356+
if (FileSystem::Instance().Exists(
357+
executable_module_spec.GetFileSpec())) {
358+
module_spec.GetFileSpec() = executable_module_spec.GetFileSpec();
361359
}
362-
363-
// Force a a dsymForUUID lookup, if that tool is available.
364-
if (!module_spec.GetSymbolFileSpec())
365-
Symbols::DownloadObjectAndSymbolFile(module_spec, true);
366-
367-
if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
368-
ModuleSP module_sp(new Module(module_spec));
369-
if (module_sp.get() && module_sp->GetObjectFile()) {
370-
// Get the current target executable
371-
ModuleSP exe_module_sp(GetTarget().GetExecutableModule());
372-
373-
// Make sure you don't already have the right module loaded
374-
// and they will be uniqued
375-
if (exe_module_sp.get() != module_sp.get())
376-
GetTarget().SetExecutableModule(module_sp, eLoadDependentsNo);
377-
}
360+
}
361+
362+
// Force a a dsymForUUID lookup, if that tool is available.
363+
if (!module_spec.GetSymbolFileSpec())
364+
Symbols::DownloadObjectAndSymbolFile(module_spec, true);
365+
366+
if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
367+
ModuleSP module_sp(new Module(module_spec));
368+
if (module_sp.get() && module_sp->GetObjectFile()) {
369+
// Get the current target executable
370+
ModuleSP exe_module_sp(GetTarget().GetExecutableModule());
371+
372+
// Make sure you don't already have the right module loaded
373+
// and they will be uniqued
374+
if (exe_module_sp.get() != module_sp.get())
375+
GetTarget().SetExecutableModule(module_sp, eLoadDependentsNo);
378376
}
377+
}
379378
}
380379
}
381380

0 commit comments

Comments
 (0)