summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-25 22:40:51 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-25 22:40:51 +0000
commit4d8ad55c782f7e4e43a72e62d55b48cca57acbf6 (patch)
treec458075309987db8d23f4ff0efbecec3f65e71eb /lldb/source/API/SBTarget.cpp
parentcd3d440b827cb47e16e9ada47cf58948d8a1df34 (diff)
downloadbcm5719-llvm-4d8ad55c782f7e4e43a72e62d55b48cca57acbf6.tar.gz
bcm5719-llvm-4d8ad55c782f7e4e43a72e62d55b48cca57acbf6.zip
Modified patch from Prabhat Verma to enable loading core files through the SBTarget API.
llvm-svn: 177932
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 8cddd0968b9..383f7012bca 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -557,6 +557,26 @@ SBTarget::GetDebugger () const
}
SBProcess
+SBTarget::LoadCore (const char *core_file)
+{
+ SBProcess sb_process;
+ TargetSP target_sp(GetSP());
+ if (target_sp)
+ {
+ FileSpec filespec(core_file, true);
+ ProcessSP process_sp (target_sp->CreateProcess(target_sp->GetDebugger().GetListener(),
+ NULL,
+ &filespec));
+ if (process_sp)
+ {
+ process_sp->LoadCore();
+ sb_process.SetSP (process_sp);
+ }
+ }
+ return sb_process;
+}
+
+SBProcess
SBTarget::LaunchSimple
(
char const **argv,
OpenPOWER on IntegriCloud