Added the ability to set the Platform path for a module through the SBModule

interface.

Added a quick way to set the platform though the SBDebugger interface. I will
actually an a SBPlatform support soon, but for now this will do.

ConnectionFileDescriptor can be passed a url formatted as: "fd://<fd>" where
<fd> is a file descriptor in the current process. This is handy if you have
services, deamons, or other tools that can spawn processes and give you a
file handle.

llvm-svn: 130565
This commit is contained in:
Greg Clayton
2011-04-30 01:09:13 +00:00
parent 3909e037ab
commit 2289fa4820
9 changed files with 180 additions and 116 deletions

View File

@@ -71,6 +71,52 @@ SBModule::GetFileSpec () const
return file_spec;
}
lldb::SBFileSpec
SBModule::GetPlatformFileSpec () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec file_spec;
if (m_opaque_sp)
file_spec.SetFileSpec(m_opaque_sp->GetPlatformFileSpec());
if (log)
{
log->Printf ("SBModule(%p)::GetPlatformFileSpec () => SBFileSpec(%p)",
m_opaque_sp.get(), file_spec.get());
}
return file_spec;
}
bool
SBModule::SetPlatformFileSpec (const lldb::SBFileSpec &platform_file)
{
bool result = false;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_sp)
{
m_opaque_sp->SetPlatformFileSpec(*platform_file);
result = true;
}
if (log)
{
log->Printf ("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s%s%s)) => %i",
m_opaque_sp.get(),
platform_file.get(),
platform_file->GetDirectory().GetCString(),
platform_file->GetDirectory() ? "/" : "",
platform_file->GetFilename().GetCString(),
result);
}
return result;
}
const uint8_t *
SBModule::GetUUIDBytes () const
{