Skip to content

Commit 7f25c3e

Browse files
committed
Slight refinement to a change yesterday in metadata-added binaries
When ObjectFileMachO::LoadCoreFileImages load a binary into the target with a valid load address, we don't need to re-load its segments into the Target's SectionLoadList again. But we should still call ModulesDidLoad on these modules so breakpoints can be inserted etc.
1 parent 54225c4 commit 7f25c3e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7032,8 +7032,12 @@ bool ObjectFileMachO::LoadCoreFileImages(lldb_private::Process &process) {
70327032
&process, image.filename, image.uuid, image.load_address,
70337033
false /* value_is_offset */, image.currently_executing,
70347034
false /* notify */);
7035-
if (module_sp)
7035+
if (module_sp) {
7036+
// We've already set the load address in the Target,
7037+
// don't do any more processing on this module.
7038+
added_modules.Append(module_sp, false /* notify */);
70367039
continue;
7040+
}
70377041
}
70387042

70397043
// If we have a slide, we need to find the original binary
@@ -7044,8 +7048,12 @@ bool ObjectFileMachO::LoadCoreFileImages(lldb_private::Process &process) {
70447048
&process, image.filename, image.uuid, image.slide,
70457049
true /* value_is_offset */, image.currently_executing,
70467050
false /* notify */);
7047-
if (module_sp)
7051+
if (module_sp) {
7052+
// We've already set the load address in the Target,
7053+
// don't do any more processing on this module.
7054+
added_modules.Append(module_sp, false /* notify */);
70487055
continue;
7056+
}
70497057
}
70507058

70517059
// Try to find the binary by UUID or filename on the local

0 commit comments

Comments
 (0)