forked from OSchip/llvm-project
![]() When adding an image to a target for crashlog purposes, avoid specifying the architecture of the image. This has the effect of making SBTarget::AddModule infer the ArchSpec for the image based on the SBTarget's architecture, which LLDB puts serious effort into calculating correctly (in TargetList::CreateTargetInternal). The status quo is that LLDB randomly guesses the ArchSpec for a module if its architecture is specified, via: ``` SBTarget::AddModule -> Platform::GetAugmentedArchSpec -> Platform::IsCompatibleArchitecture -> GetSupportedArchitectureAtIndex -> {ARM,x86}GetSupportedArchitectureAtIndex ``` ... which means that the same crashlog can fail to load on an Apple Silicon Mac (due to the random guess of arm64e-apple-macosx for the module's ArchSpec not being compatible with the SBTarget's (correct) ArchSpec), while loading just fine on an Intel Mac. I'm not sure how to add a test for this (it doesn't look like there's test coverage of this path in-tree). It seems like it would be pretty complicated to regression test: the host LLDB would need to be built for arm64e, we'd need a hand-crafted arm64e iOS crashlog, and we'd need a binary with an iOS deployment target. I'm open to other / simpler options. rdar://82679400 Differential Revision: https://reviews.llvm.org/D110013 |
||
---|---|---|
.. | ||
scripted_process | ||
armv7_cortex_m_target_defintion.py | ||
bsd.py | ||
cmdtemplate.py | ||
crashlog.py | ||
delta.py | ||
diagnose_nsstring.py | ||
diagnose_unwind.py | ||
dict_utils.py | ||
disasm-stress-test.py | ||
disasm.py | ||
disassembly_mode.py | ||
file_extract.py | ||
gdb_disassemble.py | ||
gdbremote.py | ||
globals.py | ||
in_call_stack.py | ||
jump.py | ||
lldb_module_utils.py | ||
lldbtk.py | ||
mach_o.py | ||
memory.py | ||
operating_system.py | ||
performance.py | ||
process_events.py | ||
pytracer.py | ||
sbvalue.py | ||
scripted_step.py | ||
shadow.py | ||
sources.py | ||
stacks.py | ||
step_and_print.py | ||
symbolication.py | ||
types.py | ||
x86_64_linux_target_definition.py | ||
x86_64_qemu_target_definition.py | ||
x86_64_target_definition.py |