mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-17 08:21:13 +00:00
[lldb][DYLD][NFC] Dedupe calls to CreateBreakpoint
These only differ in the modules passed to them. Also I've swapped the if order so we have the "positive" check first.
This commit is contained in:
parent
1d43096e16
commit
17fce28683
@ -337,29 +337,20 @@ bool DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint() {
|
||||
};
|
||||
|
||||
ModuleSP interpreter = LoadInterpreterModule();
|
||||
if (!interpreter) {
|
||||
FileSpecList containingModules;
|
||||
FileSpecList containingModules;
|
||||
if (interpreter)
|
||||
containingModules.Append(interpreter->GetFileSpec());
|
||||
else
|
||||
containingModules.Append(
|
||||
m_process->GetTarget().GetExecutableModulePointer()->GetFileSpec());
|
||||
|
||||
dyld_break = target.CreateBreakpoint(
|
||||
&containingModules, /*containingSourceFiles=*/nullptr,
|
||||
DebugStateCandidates, eFunctionNameTypeFull, eLanguageTypeC,
|
||||
/*m_offset=*/0,
|
||||
/*skip_prologue=*/eLazyBoolNo,
|
||||
/*internal=*/true,
|
||||
/*request_hardware=*/false);
|
||||
} else {
|
||||
FileSpecList containingModules;
|
||||
containingModules.Append(interpreter->GetFileSpec());
|
||||
dyld_break = target.CreateBreakpoint(
|
||||
&containingModules, /*containingSourceFiles=*/nullptr,
|
||||
DebugStateCandidates, eFunctionNameTypeFull, eLanguageTypeC,
|
||||
/*m_offset=*/0,
|
||||
/*skip_prologue=*/eLazyBoolNo,
|
||||
/*internal=*/true,
|
||||
/*request_hardware=*/false);
|
||||
}
|
||||
dyld_break = target.CreateBreakpoint(
|
||||
&containingModules, /*containingSourceFiles=*/nullptr,
|
||||
DebugStateCandidates, eFunctionNameTypeFull, eLanguageTypeC,
|
||||
/*m_offset=*/0,
|
||||
/*skip_prologue=*/eLazyBoolNo,
|
||||
/*internal=*/true,
|
||||
/*request_hardware=*/false);
|
||||
}
|
||||
|
||||
if (dyld_break->GetNumResolvedLocations() != 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user