[Lldb-commits] [lldb] r155384 - in /lldb/trunk: include/lldb/API/SBTarget.h scripts/Python/interface/SBTarget.i source/API/SBTarget.cpp
Greg Clayton
gclayton at apple.com
Mon Apr 23 13:23:40 PDT 2012
Author: gclayton
Date: Mon Apr 23 15:23:39 2012
New Revision: 155384
URL: http://llvm.org/viewvc/llvm-project?rev=155384&view=rev
Log:
Added the ability to specify the symbol file for a module when adding it to a target.
Modified:
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/scripts/Python/interface/SBTarget.i
lldb/trunk/source/API/SBTarget.cpp
Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=155384&r1=155383&r2=155384&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Mon Apr 23 15:23:39 2012
@@ -457,6 +457,11 @@
const char *triple,
const char *uuid);
+ lldb::SBModule
+ AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile);
uint32_t
GetNumModules () const;
Modified: lldb/trunk/scripts/Python/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBTarget.i?rev=155384&r1=155383&r2=155384&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/Python/interface/SBTarget.i Mon Apr 23 15:23:39 2012
@@ -481,6 +481,12 @@
const char *triple,
const char *uuid);
+ lldb::SBModule
+ AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile);
+
uint32_t
GetNumModules () const;
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=155384&r1=155383&r2=155384&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Apr 23 15:23:39 2012
@@ -1726,6 +1726,15 @@
const char *triple,
const char *uuid_cstr)
{
+ return AddModule (path, triple, uuid_cstr, NULL);
+}
+
+lldb::SBModule
+SBTarget::AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile)
+{
lldb::SBModule sb_module;
TargetSP target_sp(GetSP());
if (target_sp)
@@ -1733,12 +1742,15 @@
ModuleSpec module_spec;
if (path)
module_spec.GetFileSpec().SetFile(path, false);
-
+
if (uuid_cstr)
module_spec.GetUUID().SetfromCString(uuid_cstr);
-
+
if (triple)
module_spec.GetArchitecture().SetTriple (triple, target_sp->GetPlatform ().get());
+
+ if (symfile)
+ module_spec.GetSymbolFileSpec ().SetFile(symfile, false);
sb_module.SetSP(target_sp->GetSharedModule (module_spec));
}
More information about the lldb-commits
mailing list