llvm-project/lldb/tools/debugserver/source/MacOSX
Jason Molenda ac49e90219 jGetLoadedDynamicLibrariesInfos can inspect machos not yet loaded
jGetLoadedDynamicLibrariesInfos normally checks with dyld to find
the list of binaries loaded in the inferior, and getting the filepath,
before trying to parse the Mach-O binary in inferior memory.
This allows for debugserver to parse a Mach-O binary present in memory,
but not yet registered with dyld.  This patch also adds some simple
sanity checks that we're reading a Mach-O header before we begin
stepping through load commands, because we won't have the sanity check
of consulting dyld for the list of loaded binaries before parsing.
Also adds a testcase.

[This patch was reverted after causing a testsuite failure on a CI bot;
I haven't been able to repro the failure outside the CI, but I have a
theory that my sanity check on cputype which only matched arm64 and
x86_64 - and the CI machine may have a watch simulator that is still
using i386.]

Differential Revision: https://reviews.llvm.org/D128956
rdar://95737734
2022-07-14 00:56:14 -07:00
..
arm [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
arm64 [lldb] Set correct register number for cpsr (GENERIC_REGNUM_FLAGS) 2022-05-20 09:36:58 -07:00
i386 [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
x86_64 Correct debugserver to write xmm/ymm/zmm reg values 2022-04-06 23:36:52 -07:00
CFBundle.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
CFBundle.h
CFString.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
CFString.h
CFUtils.h
CMakeLists.txt [lldb] [debugserver] Simplify handling of arch specific files 2022-01-06 10:23:04 +02:00
Genealogy.cpp
Genealogy.h
GenealogySPI.h
MachException.cpp Add a darwin platform setting to specify which exceptions debugserver 2022-05-18 10:16:11 -07:00
MachException.h Add a darwin platform setting to specify which exceptions debugserver 2022-05-18 10:16:11 -07:00
MachProcess.h jGetLoadedDynamicLibrariesInfos can inspect machos not yet loaded 2022-07-14 00:56:14 -07:00
MachProcess.mm jGetLoadedDynamicLibrariesInfos can inspect machos not yet loaded 2022-07-14 00:56:14 -07:00
MachTask.h Add a darwin platform setting to specify which exceptions debugserver 2022-05-18 10:16:11 -07:00
MachTask.mm Add a darwin platform setting to specify which exceptions debugserver 2022-05-18 10:16:11 -07:00
MachThread.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
MachThread.h
MachThreadList.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
MachThreadList.h
MachVMMemory.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
MachVMMemory.h
MachVMRegion.cpp Add the ability to process save-core stack-memory-only corefiles 2021-08-11 13:37:31 -07:00
MachVMRegion.h Add the ability to process save-core stack-memory-only corefiles 2021-08-11 13:37:31 -07:00
OsLogger.cpp
OsLogger.h
ThreadInfo.h [NFC][LLDB] Removing extra semicolons to silence -Wc++98-compat-extra-semi diagnostics 2021-03-23 14:32:36 -07:00
dbgnub-mig.defs
stack_logging.h