summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBModuleSpec.i
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-07-08 22:22:41 +0000
committerGreg Clayton <gclayton@apple.com>2013-07-08 22:22:41 +0000
commit226cce25116af0f3132941b27492f349f62052a4 (patch)
treeaeee7174537ac09c746b680bcf52cf298ed2a7c0 /lldb/scripts/Python/interface/SBModuleSpec.i
parent8bad86c81be924bdfe1814da69dafda8b0237503 (diff)
downloadbcm5719-llvm-226cce25116af0f3132941b27492f349f62052a4.tar.gz
bcm5719-llvm-226cce25116af0f3132941b27492f349f62052a4.zip
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
Diffstat (limited to 'lldb/scripts/Python/interface/SBModuleSpec.i')
-rw-r--r--lldb/scripts/Python/interface/SBModuleSpec.i133
1 files changed, 133 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBModuleSpec.i b/lldb/scripts/Python/interface/SBModuleSpec.i
new file mode 100644
index 00000000000..55fd9b1a043
--- /dev/null
+++ b/lldb/scripts/Python/interface/SBModuleSpec.i
@@ -0,0 +1,133 @@
+//===-- SWIG Interface for SBModule -----------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBModuleSpec
+{
+public:
+
+ SBModuleSpec ();
+
+ SBModuleSpec (const lldb::SBModuleSpec &rhs);
+
+ ~SBModuleSpec ();
+
+ bool
+ IsValid () const;
+
+ void
+ Clear();
+
+ //------------------------------------------------------------------
+ /// Get const accessor for the module file.
+ ///
+ /// This function returns the file for the module on the host system
+ /// that is running LLDB. This can differ from the path on the
+ /// platform since we might be doing remote debugging.
+ ///
+ /// @return
+ /// A const reference to the file specification object.
+ //------------------------------------------------------------------
+ lldb::SBFileSpec
+ GetFileSpec ();
+
+ void
+ SetFileSpec (const lldb::SBFileSpec &fspec);
+
+ //------------------------------------------------------------------
+ /// Get accessor for the module platform file.
+ ///
+ /// Platform file refers to the path of the module as it is known on
+ /// the remote system on which it is being debugged. For local
+ /// debugging this is always the same as Module::GetFileSpec(). But
+ /// remote debugging might mention a file '/usr/lib/liba.dylib'
+ /// which might be locally downloaded and cached. In this case the
+ /// platform file could be something like:
+ /// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
+ /// The file could also be cached in a local developer kit directory.
+ ///
+ /// @return
+ /// A const reference to the file specification object.
+ //------------------------------------------------------------------
+ lldb::SBFileSpec
+ GetPlatformFileSpec ();
+
+ void
+ SetPlatformFileSpec (const lldb::SBFileSpec &fspec);
+
+ lldb::SBFileSpec
+ GetSymbolFileSpec ();
+
+ void
+ SetSymbolFileSpec (const lldb::SBFileSpec &fspec);
+
+ const char *
+ GetObjectName ();
+
+ void
+ SetObjectName (const char *name);
+
+ const char *
+ GetTriple ();
+
+ void
+ SetTriple (const char *triple);
+
+ const uint8_t *
+ GetUUIDBytes ();
+
+ size_t
+ GetUUIDLength ();
+
+ bool
+ SetUUIDBytes (const uint8_t *uuid, size_t uuid_len);
+
+ bool
+ GetDescription (lldb::SBStream &description);
+
+};
+
+
+class SBModuleSpecList
+{
+public:
+ SBModuleSpecList();
+
+ SBModuleSpecList (const SBModuleSpecList &rhs);
+
+ ~SBModuleSpecList();
+
+ static SBModuleSpecList
+ GetModuleSpecifications (const char *path);
+
+ void
+ Append (const lldb::SBModuleSpec &spec);
+
+ void
+ Append (const lldb::SBModuleSpecList &spec_list);
+
+ lldb::SBModuleSpec
+ FindFirstMatchingSpec (const lldb::SBModuleSpec &match_spec);
+
+ lldb::SBModuleSpecList
+ FindMatchingSpecs (const lldb::SBModuleSpec &match_spec);
+
+ size_t
+ GetSize();
+
+ lldb::SBModuleSpec
+ GetSpecAtIndex (size_t i);
+
+ bool
+ GetDescription (lldb::SBStream &description);
+
+};
+
+} // namespace lldb
OpenPOWER on IntegriCloud