summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/TargetList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-02-13 23:10:39 +0000
committerGreg Clayton <gclayton@apple.com>2012-02-13 23:10:39 +0000
commitc859e2d52488ef1852e6489716ddf6147402ea64 (patch)
tree5639f72ea58d93f18e65eb6fb71f76062fbba9e6 /lldb/source/Target/TargetList.cpp
parent698452bc7e838e3a355029539d7f0be974d4d81d (diff)
downloadbcm5719-llvm-c859e2d52488ef1852e6489716ddf6147402ea64.tar.gz
bcm5719-llvm-c859e2d52488ef1852e6489716ddf6147402ea64.zip
Full core file support has been added for mach-o core files.
Tracking modules down when you have a UUID and a path has been improved. DynamicLoaderDarwinKernel no longer parses mach-o load commands and it now uses the memory based modules now that we can load modules from memory. Added a target setting named "target.exec-search-paths" which can be used to supply a list of directories to use when trying to look for executables. This allows one or more directories to be used when searching for modules that may not exist in the SDK/PDK. The target automatically adds the directory for the main executable to this list so this should help us in tracking down shared libraries and other binaries. llvm-svn: 150426
Diffstat (limited to 'lldb/source/Target/TargetList.cpp')
-rw-r--r--lldb/source/Target/TargetList.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp
index 6ca58b86ef5..e412beb1da5 100644
--- a/lldb/source/Target/TargetList.cpp
+++ b/lldb/source/Target/TargetList.cpp
@@ -92,6 +92,16 @@ TargetList::CreateTarget (Debugger &debugger,
get_dependent_files,
platform_sp,
target_sp);
+
+ if (target_sp)
+ {
+ if (file.GetDirectory())
+ {
+ FileSpec file_dir;
+ file_dir.GetDirectory() = file.GetDirectory();
+ target_sp->GetExecutableSearchPaths ().Append (file_dir);
+ }
+ }
return error;
}
@@ -120,7 +130,12 @@ TargetList::CreateTarget
FileSpec resolved_file(file);
if (platform_sp)
- error = platform_sp->ResolveExecutable (file, arch, exe_module_sp);
+ {
+ FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
+ error = platform_sp->ResolveExecutable (file, arch,
+ exe_module_sp,
+ executable_search_paths.GetSize() ? &executable_search_paths : NULL);
+ }
if (error.Success() && exe_module_sp)
{
OpenPOWER on IntegriCloud