diff options
author | Jason Molenda <jason@molenda.com> | 2022-09-09 14:52:59 -0700 |
---|---|---|
committer | Jason Molenda <jason@molenda.com> | 2022-09-09 14:57:08 -0700 |
commit | 1a608cfb5ca81d7b1d8ebd6b21c6be9db59c837a (patch) | |
tree | 01e2102daadd0c12e53079f900f86b06955f20bd /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | bd16ffb38981478ab116f431e0e4057b676bfff5 (diff) | |
download | llvm-1a608cfb5ca81d7b1d8ebd6b21c6be9db59c837a.zip llvm-1a608cfb5ca81d7b1d8ebd6b21c6be9db59c837a.tar.gz llvm-1a608cfb5ca81d7b1d8ebd6b21c6be9db59c837a.tar.bz2 |
Recognize a platform binary in ProcessGDBRemote which determines plugins
Complete support of the binary-addresses key in the qProcessInfo packet
in ProcessGDBRemote, for detecting if one of the binaries needs to be
handled by a Platform plugin, and can be used to set the Process'
DynamicLoader plugin and the Target's Platform plugin.
Implement this method in PlatformDarwinKernel to recognize a kernel
fileset at that address, find the actual kernel address in the
fileset, set DynamicLoaderDarwinKernel and PlatformDarwinKernel
in the Process/Target; register the kernel address with the dynamic
loader so it will be loaded later during attach.
This patch only addresses the live debug scenario with a gdb remote
serial protocol connection. I'll handle corefiles in a subsequent
patch that builds on this.
Differential Revision: https://reviews.llvm.org/D133534
rdar://98754861
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 2987ba5..d0f98462 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -593,8 +593,19 @@ Status ProcessGDBRemote::DoConnectRemote(llvm::StringRef remote_url) { UUID uuid; const bool value_is_slide = false; for (addr_t addr : bin_addrs) { - const bool force_symbol_search = true; const bool notify = true; + // First see if this is a special platform + // binary that may determine the DynamicLoader and + // Platform to be used in this Process/Target in the + // process of loading it. + if (GetTarget() + .GetDebugger() + .GetPlatformList() + .LoadPlatformBinaryAndSetup(this, addr, notify)) + continue; + + const bool force_symbol_search = true; + // Second manually load this binary into the Target. DynamicLoader::LoadBinaryWithUUIDAndAddress( this, uuid, addr, value_is_slide, force_symbol_search, notify); } |