Allow firmware binaries to be specified only by load address
authorJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 20:46:18 +0000 (13:46 -0700)
committerJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 20:49:30 +0000 (13:49 -0700)
commitd8879fba8825b9799166ba0ea552d4027bfb8ad1
tree4510a38b0028d9f09246c229926fca47fd7b958c
parent40eec27618d0db2e2753abdf3b84832056d508a6
Allow firmware binaries to be specified only by load address

Add support to Mach-O corefiles and to live gdb remote serial protocol
connections for the corefile/remote stub to provide a list of load
addresses of binaries that should be found & loaded by lldb, and nothing
else.  lldb will try to parse the binary out of memory, and if it can
find a UUID, try to find a binary & its debug information based on the
UUID, falling back to using the memory image if it must.

A bit of code unification from three parts of lldb that were loading
individual binaries already, so there is a shared method in
DynamicLoader to handle all of the variations they were doing.

Differential Revision: https://reviews.llvm.org/D130813
rdar://94249937
rdar://94249384
14 files changed:
lldb/docs/lldb-gdb-remote.txt
lldb/include/lldb/Target/DynamicLoader.h
lldb/source/Core/DynamicLoader.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/test/API/macosx/lc-note/multiple-binary-corefile/Makefile [new file with mode: 0644]
lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py [new file with mode: 0644]
lldb/test/API/macosx/lc-note/multiple-binary-corefile/create-multibin-corefile.cpp [new file with mode: 0644]
lldb/test/API/macosx/lc-note/multiple-binary-corefile/main.c [new file with mode: 0644]
lldb/test/API/macosx/lc-note/multiple-binary-corefile/one.c [new file with mode: 0644]
lldb/test/API/macosx/lc-note/multiple-binary-corefile/two.c [new file with mode: 0644]