diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-04-23 20:23:39 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-04-23 20:23:39 +0000 |
| commit | b210aec64d2b54999a113ad8bb5b7c490b5d1cc8 (patch) | |
| tree | e84e02fcc7961fc47c3e97efaeeddd3010704fd3 | |
| parent | 04b795bc1d1381c75421647c9385043c10d13d30 (diff) | |
| download | bcm5719-llvm-b210aec64d2b54999a113ad8bb5b7c490b5d1cc8.tar.gz bcm5719-llvm-b210aec64d2b54999a113ad8bb5b7c490b5d1cc8.zip | |
Added the ability to specify the symbol file for a module when adding it to a target.
llvm-svn: 155384
| -rw-r--r-- | lldb/include/lldb/API/SBTarget.h | 5 | ||||
| -rw-r--r-- | lldb/scripts/Python/interface/SBTarget.i | 6 | ||||
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 16 |
3 files changed, 25 insertions, 2 deletions
diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h index 0d09c318810..4ee539835b3 100644 --- a/lldb/include/lldb/API/SBTarget.h +++ b/lldb/include/lldb/API/SBTarget.h @@ -457,6 +457,11 @@ public: 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; diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index fccecd3b490..23a9ba152ba 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -481,6 +481,12 @@ public: 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; diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 2502e93abf2..1ec639763ba 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1726,6 +1726,15 @@ SBTarget::AddModule (const char *path, 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 @@ SBTarget::AddModule (const char *path, 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)); } |

