Added a way to extract the module specifications from a file. A module specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files).

There are two new classes:

lldb::SBModuleSpec
lldb::SBModuleSpecList

The SBModuleSpec wraps up a lldb_private::ModuleSpec, and SBModuleSpecList wraps up a lldb_private::ModuleSpecList.

llvm-svn: 185877
This commit is contained in:
Greg Clayton
2013-07-08 22:22:41 +00:00
parent 8bad86c81b
commit 226cce2511
20 changed files with 845 additions and 109 deletions

View File

@@ -10,6 +10,7 @@
#include "lldb/API/SBModule.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBModuleSpec.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBSymbolContextList.h"
@@ -39,6 +40,19 @@ SBModule::SBModule (const lldb::ModuleSP& module_sp) :
{
}
SBModule::SBModule(const SBModuleSpec &module_spec) :
m_opaque_sp ()
{
ModuleSP module_sp;
Error error = ModuleList::GetSharedModule (*module_spec.m_opaque_ap,
module_sp,
NULL,
NULL,
NULL);
if (module_sp)
SetSP(module_sp);
}
SBModule::SBModule(const SBModule &rhs) :
m_opaque_sp (rhs.m_opaque_sp)
{