diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index d25f134de8a..f29a1677874 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -414,7 +414,7 @@ ProcessGDBRemote::WillAttachToProcessWithName (const char *process_name, bool wa } Error -ProcessGDBRemote::DoConnectRemote (const char *remote_url) +ProcessGDBRemote::DoConnectRemote (Stream *strm, const char *remote_url) { Error error (WillLaunchOrAttach ()); @@ -427,6 +427,25 @@ ProcessGDBRemote::DoConnectRemote (const char *remote_url) return error; StartAsyncThread (); + const ArchSpec &gdb_remote_arch = m_gdb_comm.GetHostArchitecture(); + if (gdb_remote_arch.IsValid() && gdb_remote_arch.GetTriple().getVendor() == llvm::Triple::Apple) + { + Module *exe_module = GetTarget().GetExecutableModulePointer(); + + ObjectFile *exe_objfile = exe_module->GetObjectFile(); + + // If the remote system is an Apple device and we don't have an exec file + // OR we have an exec file and it is a kernel, look for the kernel's load address + // in memory and load/relocate the kernel symbols as appropriate. + if (exe_objfile == NULL + || (exe_objfile->GetType() == ObjectFile::eTypeExecutable && + exe_objfile->GetStrata() == ObjectFile::eStrataKernel)) + { + + + } + } + lldb::pid_t pid = m_gdb_comm.GetCurrentProcessID (); if (pid == LLDB_INVALID_PROCESS_ID) { |