Allow firmware binaries to be specified only by load address
authorJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 21:13:20 +0000 (14:13 -0700)
committerJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 21:14:16 +0000 (14:14 -0700)
commit96d12187b3d28f63d29802a7af49dfe53cc306f3
tree32a7147821cb8d6fed92525c85d561a43b212f75
parent560efad701709cc57021ccb14f91a012c5e835d3
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.

Re-landing this with a uuid_is_null() implementation added to
Utility/UuidCompatibility.h for non-Darwin systems.

Differential Revision: https://reviews.llvm.org/D130813
rdar://94249937
rdar://94249384
15 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/source/Utility/UuidCompatibility.h
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]