Fixed an issue where we were resolving paths when we should have been.
So the issue here was that we have lldb_private::FileSpec that by default was
always resolving a path when using the:
FileSpec::FileSpec (const char *path);
and in the:
void FileSpec::SetFile(const char *pathname, bool resolve = true);
This isn't what we want in many many cases. One example is you have "/tmp" on
your file system which is really "/private/tmp". You compile code in that
directory and end up with debug info that mentions "/tmp/file.c". Then you
type:
(lldb) breakpoint set --file file.c --line 5
If your current working directory is "/tmp", then "file.c" would be turned
into "/private/tmp/file.c" which won't match anything in the debug info.
Also, it should have been just a FileSpec with no directory and a filename
of "file.c" which could (and should) potentially match any instances of "file.c"
in the debug info.
So I removed the constructor that just takes a path:
FileSpec::FileSpec (const char *path); // REMOVED
You must now use the other constructor that has a "bool resolve" parameter that you must always supply:
FileSpec::FileSpec (const char *path, bool resolve);
I also removed the default parameter to SetFile():
void FileSpec::SetFile(const char *pathname, bool resolve);
And fixed all of the code to use the right settings.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116944 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 6a68e3b..1c0f79d 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -381,7 +381,7 @@
if (m_opaque_sp)
{
ArchSpec arch;
- FileSpec file_spec (filename);
+ FileSpec file_spec (filename, true);
arch.SetArchFromTargetTriple(target_triple);
TargetSP target_sp;
Error error (m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, file_spec, arch, NULL, true, target_sp));
@@ -396,7 +396,7 @@
SBTarget target;
if (m_opaque_sp)
{
- FileSpec file (filename);
+ FileSpec file (filename, true);
ArchSpec arch = lldb_private::Target::GetDefaultArchitecture ();
TargetSP target_sp;
Error error;
@@ -439,7 +439,7 @@
SBTarget target;
if (m_opaque_sp)
{
- FileSpec file (filename);
+ FileSpec file (filename, true);
ArchSpec arch = lldb_private::Target::GetDefaultArchitecture ();
TargetSP target_sp;
Error error;
@@ -495,7 +495,7 @@
ArchSpec arch;
if (arch_name)
arch.SetArch(arch_name);
- TargetSP target_sp (m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture (FileSpec(filename), arch_name ? &arch : NULL));
+ TargetSP target_sp (m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture (FileSpec(filename, false), arch_name ? &arch : NULL));
sb_target.reset(target_sp);
}
return sb_target;
diff --git a/source/API/SBFileSpec.cpp b/source/API/SBFileSpec.cpp
index 36fcf1b..fb504f2 100644
--- a/source/API/SBFileSpec.cpp
+++ b/source/API/SBFileSpec.cpp
@@ -28,8 +28,14 @@
m_opaque_ap.reset (new FileSpec (rhs.get()));
}
+// Deprected!!!
SBFileSpec::SBFileSpec (const char *path) :
- m_opaque_ap(new FileSpec (path))
+ m_opaque_ap(new FileSpec (path, true))
+{
+}
+
+SBFileSpec::SBFileSpec (const char *path, bool resolve) :
+ m_opaque_ap(new FileSpec (path, resolve))
{
}
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index fa64cba..9b78220 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -355,7 +355,7 @@
{
if (module_name && module_name[0])
{
- FileSpec module_file_spec(module_name);
+ FileSpec module_file_spec(module_name, false);
*sb_bp = m_opaque_sp->CreateBreakpoint (&module_file_spec, symbol_name, eFunctionNameTypeFull | eFunctionNameTypeBase, false);
}
else
@@ -376,7 +376,7 @@
if (module_name && module_name[0])
{
- FileSpec module_file_spec(module_name);
+ FileSpec module_file_spec(module_name, false);
*sb_bp = m_opaque_sp->CreateBreakpoint (&module_file_spec, regexp, false);
}
@@ -523,7 +523,7 @@
ModuleSP module_sp;
if (module_name != NULL)
{
- FileSpec module_file_spec (module_name);
+ FileSpec module_file_spec (module_name, false);
module_sp = m_opaque_sp->GetImages().FindFirstModuleForFileSpec (module_file_spec, NULL);
}
@@ -602,7 +602,7 @@
ModuleSP module_sp;
if (module_name != NULL)
{
- FileSpec module_file_spec (module_name);
+ FileSpec module_file_spec (module_name, false);
module_sp = m_opaque_sp->GetImages().FindFirstModuleForFileSpec (module_file_spec, NULL);
}
diff --git a/source/Commands/CommandCompletions.cpp b/source/Commands/CommandCompletions.cpp
index 42275cb..91a6cfe 100644
--- a/source/Commands/CommandCompletions.cpp
+++ b/source/Commands/CommandCompletions.cpp
@@ -469,7 +469,7 @@
m_include_support_files (include_support_files),
m_matching_files()
{
- FileSpec partial_spec (m_completion_str.c_str());
+ FileSpec partial_spec (m_completion_str.c_str(), false);
m_file_name = partial_spec.GetFilename().GetCString();
m_dir_name = partial_spec.GetDirectory().GetCString();
}
@@ -661,7 +661,7 @@
) :
CommandCompletions::Completer (interpreter, completion_str, match_start_point, max_return_elements, matches)
{
- FileSpec partial_spec (m_completion_str.c_str());
+ FileSpec partial_spec (m_completion_str.c_str(), false);
m_file_name = partial_spec.GetFilename().GetCString();
m_dir_name = partial_spec.GetDirectory().GetCString();
}
diff --git a/source/Commands/CommandObjectBreakpoint.cpp b/source/Commands/CommandObjectBreakpoint.cpp
index c642ae5..55e83fe 100644
--- a/source/Commands/CommandObjectBreakpoint.cpp
+++ b/source/Commands/CommandObjectBreakpoint.cpp
@@ -307,7 +307,7 @@
ModuleSP module_sp = target->GetExecutableModule();
Breakpoint *bp = NULL;
- FileSpec module;
+ FileSpec module_spec;
bool use_module = false;
int num_modules = m_options.m_modules.size();
@@ -354,15 +354,15 @@
}
else
{
- file.SetFile(m_options.m_filename.c_str());
+ file.SetFile(m_options.m_filename.c_str(), false);
}
if (use_module)
{
for (int i = 0; i < num_modules; ++i)
{
- module.SetFile(m_options.m_modules[i].c_str());
- bp = target->CreateBreakpoint (&module,
+ module_spec.SetFile(m_options.m_modules[i].c_str(), false);
+ bp = target->CreateBreakpoint (&module_spec,
file,
m_options.m_line_num,
m_options.m_ignore_inlines).get();
@@ -405,8 +405,11 @@
{
for (int i = 0; i < num_modules; ++i)
{
- module.SetFile(m_options.m_modules[i].c_str());
- bp = target->CreateBreakpoint (&module, m_options.m_func_name.c_str(), name_type_mask, Breakpoint::Exact).get();
+ module_spec.SetFile(m_options.m_modules[i].c_str(), false);
+ bp = target->CreateBreakpoint (&module_spec,
+ m_options.m_func_name.c_str(),
+ name_type_mask,
+ Breakpoint::Exact).get();
if (bp)
{
StreamString &output_stream = result.GetOutputStream();
@@ -435,8 +438,8 @@
{
for (int i = 0; i < num_modules; ++i)
{
- module.SetFile(m_options.m_modules[i].c_str());
- bp = target->CreateBreakpoint (&module, regexp).get();
+ module_spec.SetFile(m_options.m_modules[i].c_str(), false);
+ bp = target->CreateBreakpoint (&module_spec, regexp).get();
if (bp)
{
StreamString &output_stream = result.GetOutputStream();
diff --git a/source/Commands/CommandObjectCommands.cpp b/source/Commands/CommandObjectCommands.cpp
index 349c3fc..dd5ab32 100644
--- a/source/Commands/CommandObjectCommands.cpp
+++ b/source/Commands/CommandObjectCommands.cpp
@@ -70,7 +70,7 @@
result.AppendMessageWithFormat ("Executing commands in '%s'.\n", filename);
- FileSpec cmd_file (filename);
+ FileSpec cmd_file (filename, false);
if (cmd_file.Exists())
{
STLStringArray commands;
diff --git a/source/Commands/CommandObjectFile.cpp b/source/Commands/CommandObjectFile.cpp
index 737b0cb..45dc2a9 100644
--- a/source/Commands/CommandObjectFile.cpp
+++ b/source/Commands/CommandObjectFile.cpp
@@ -127,7 +127,7 @@
const int argc = command.GetArgumentCount();
if (argc == 1)
{
- FileSpec file_spec (file_path);
+ FileSpec file_spec (file_path, true);
if (! file_spec.Exists() && !file_spec.ResolveExecutableLocation())
{
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index ebbc0f1..53db6df 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -656,7 +656,7 @@
const char *arg_cstr;
for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx)
{
- FileSpec image_file(arg_cstr);
+ FileSpec image_file(arg_cstr, false);
ModuleList matching_modules;
size_t num_matching_modules = target->GetImages().FindModules(&image_file, NULL, NULL, NULL, matching_modules);
@@ -861,7 +861,7 @@
const char *arg_cstr;
for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx)
{
- FileSpec image_file(arg_cstr);
+ FileSpec image_file(arg_cstr, false);
ModuleList matching_modules;
size_t num_matching_modules = target->GetImages().FindModules(&image_file, NULL, NULL, NULL, matching_modules);
@@ -969,7 +969,7 @@
const char *arg_cstr;
for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx)
{
- FileSpec image_file(arg_cstr);
+ FileSpec image_file(arg_cstr, false);
ModuleList matching_modules;
size_t num_matching_modules = target->GetImages().FindModules(&image_file, NULL, NULL, NULL, matching_modules);
@@ -1062,7 +1062,7 @@
const char *arg_cstr;
for (int arg_idx = 0; (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != NULL; ++arg_idx)
{
- FileSpec file_spec(arg_cstr);
+ FileSpec file_spec(arg_cstr, false);
const uint32_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
@@ -1381,7 +1381,7 @@
break;
case 'f':
- m_file.SetFile (option_arg);
+ m_file.SetFile (option_arg, false);
m_type = eLookupTypeFileLine;
break;
@@ -1627,7 +1627,7 @@
const char *arg_cstr;
for (i = 0; (arg_cstr = command.GetArgumentAtIndex(i)) != NULL && syntax_error == false; ++i)
{
- FileSpec image_file(arg_cstr);
+ FileSpec image_file(arg_cstr, false);
ModuleList matching_modules;
size_t num_matching_modules = target->GetImages().FindModules(&image_file, NULL, NULL, NULL, matching_modules);
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index 767b472..3020c01 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -143,7 +143,7 @@
break;
case 'o':
- m_outfile_filespec.SetFile (option_arg);
+ m_outfile_filespec.SetFile (option_arg, true);
break;
case 'b':
@@ -462,7 +462,7 @@
break;
case 'i':
- m_infile.SetFile (option_arg);
+ m_infile.SetFile (option_arg, true);
if (!m_infile.Exists())
{
m_infile.Clear();
diff --git a/source/Commands/CommandObjectSource.cpp b/source/Commands/CommandObjectSource.cpp
index 63d319e..88c18be 100644
--- a/source/Commands/CommandObjectSource.cpp
+++ b/source/Commands/CommandObjectSource.cpp
@@ -297,7 +297,7 @@
ModuleList matching_modules;
for (unsigned i = 0, e = m_options.m_modules.size(); i != e; i++)
{
- FileSpec module_spec(m_options.m_modules[i].c_str());
+ FileSpec module_spec(m_options.m_modules[i].c_str(), false);
if (module_spec)
{
matching_modules.Clear();
@@ -471,7 +471,7 @@
ModuleList matching_modules;
for (unsigned i = 0, e = m_options.m_modules.size(); i != e; i++)
{
- FileSpec module_spec(m_options.m_modules[i].c_str());
+ FileSpec module_spec(m_options.m_modules[i].c_str(), false);
if (module_spec)
{
matching_modules.Clear();
diff --git a/source/Core/FileSpec.cpp b/source/Core/FileSpec.cpp
index 1768a06..21b00ae 100644
--- a/source/Core/FileSpec.cpp
+++ b/source/Core/FileSpec.cpp
@@ -174,18 +174,6 @@
// Default constructor that can take an optional full path to a
// file on disk.
//------------------------------------------------------------------
-FileSpec::FileSpec(const char *pathname) :
- m_directory(),
- m_filename()
-{
- if (pathname && pathname[0])
- SetFile(pathname);
-}
-
-//------------------------------------------------------------------
-// Default constructor that can take an optional full path to a
-// file on disk.
-//------------------------------------------------------------------
FileSpec::FileSpec(const char *pathname, bool resolve_path) :
m_directory(),
m_filename()
@@ -447,7 +435,7 @@
bool
FileSpec::ResolveExecutableLocation ()
{
- if (m_directory.GetLength() == 0)
+ if (!m_directory)
{
const std::string file_str (m_filename.AsCString());
llvm::sys::Path path = llvm::sys::Program::FindProgramByName (file_str);
@@ -465,7 +453,7 @@
{
// If FindProgramByName found the file, it returns the directory + filename in its return results.
// We need to separate them.
- FileSpec tmp_file (dir_ref.data());
+ FileSpec tmp_file (dir_ref.data(), false);
if (tmp_file.Exists())
{
m_directory = tmp_file.m_directory;
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index 2512074..ce33460 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -241,9 +241,16 @@
}
uint32_t
-Module::ResolveSymbolContextForFilePath (const char *file_path, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list)
+Module::ResolveSymbolContextForFilePath
+(
+ const char *file_path,
+ uint32_t line,
+ bool check_inlines,
+ uint32_t resolve_scope,
+ SymbolContextList& sc_list
+)
{
- FileSpec file_spec(file_path);
+ FileSpec file_spec(file_path, false);
return ResolveSymbolContextsForFileSpec (file_spec, line, check_inlines, resolve_scope, sc_list);
}
diff --git a/source/Core/ModuleList.cpp b/source/Core/ModuleList.cpp
index 1d7e755..d1c640e 100644
--- a/source/Core/ModuleList.cpp
+++ b/source/Core/ModuleList.cpp
@@ -405,9 +405,16 @@
}
uint32_t
-ModuleList::ResolveSymbolContextForFilePath (const char *file_path, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list)
+ModuleList::ResolveSymbolContextForFilePath
+(
+ const char *file_path,
+ uint32_t line,
+ bool check_inlines,
+ uint32_t resolve_scope,
+ SymbolContextList& sc_list
+)
{
- FileSpec file_spec(file_path);
+ FileSpec file_spec(file_path, false);
return ResolveSymbolContextsForFileSpec (file_spec, line, check_inlines, resolve_scope, sc_list);
}
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp
index ea96e65..ed6a274 100644
--- a/source/Host/common/Host.cpp
+++ b/source/Host/common/Host.cpp
@@ -581,14 +581,14 @@
uint32_t len = sizeof(program_fullpath);
int err = _NSGetExecutablePath (program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile (program_fullpath);
+ g_program_filespec.SetFile (program_fullpath, true);
else if (err == -1)
{
char *large_program_fullpath = (char *)::malloc (len + 1);
err = _NSGetExecutablePath (large_program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile (large_program_fullpath);
+ g_program_filespec.SetFile (large_program_fullpath, true);
::free (large_program_fullpath);
}
@@ -619,7 +619,7 @@
if (::dladdr (host_addr, &info))
{
if (info.dli_fname)
- module_filespec.SetFile(info.dli_fname);
+ module_filespec.SetFile(info.dli_fname, true);
}
return module_filespec;
}
diff --git a/source/Host/macosx/Host.mm b/source/Host/macosx/Host.mm
index 6f15c25..df4f921 100644
--- a/source/Host/macosx/Host.mm
+++ b/source/Host/macosx/Host.mm
@@ -116,7 +116,7 @@
{
if (::CFURLGetFileSystemRepresentation (url.get(), YES, (UInt8*)path, sizeof(path)))
{
- file.SetFile(path);
+ file.SetFile(path, false);
return true;
}
}
@@ -232,7 +232,7 @@
OSStatus error = 0;
- FileSpec program (argv[0]);
+ FileSpec program (argv[0], false);
std::string unix_socket_name;
diff --git a/source/Host/macosx/Symbols.cpp b/source/Host/macosx/Symbols.cpp
index f59f35e..cc39319 100644
--- a/source/Host/macosx/Symbols.cpp
+++ b/source/Host/macosx/Symbols.cpp
@@ -239,8 +239,7 @@
DIR* dirp = ::opendir(path);
if (dirp != NULL)
{
- const size_t path_len = strlen(path);
- const int bytes_left = sizeof(path) - path_len - 1;
+ dsym_fspec.GetDirectory().SetCString(path);
struct dirent* dp;
while ((dp = readdir(dirp)) != NULL)
{
@@ -256,9 +255,7 @@
if (dp->d_type == DT_REG || dp->d_type == DT_UNKNOWN)
{
- ::strncpy (&path[path_len], dp->d_name, bytes_left);
-
- dsym_fspec.SetFile(path);
+ dsym_fspec.GetFilename().SetCString(dp->d_name);
if (FileAtPathContainsArchAndUUID (dsym_fspec, arch, uuid))
return dsym_fspec;
}
@@ -334,7 +331,7 @@
{
if (::CFURLGetFileSystemRepresentation (dsym_url.get(), true, (UInt8*)path, sizeof(path)-1))
{
- out_dsym_fspec->SetFile(path);
+ out_dsym_fspec->SetFile(path, false);
if (out_dsym_fspec->GetFileType () == FileSpec::eFileTypeDirectory)
{
@@ -358,7 +355,7 @@
if (exec_cf_path && ::CFStringGetFileSystemRepresentation (exec_cf_path, path, sizeof(path)))
{
++items_found;
- out_dsym_fspec->SetFile(path);
+ out_dsym_fspec->SetFile(path, false);
}
}
}
@@ -384,7 +381,7 @@
strncat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
strncat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
- dsym_fspec.SetFile(path);
+ dsym_fspec.SetFile(path, false);
if (FileAtPathContainsArchAndUUID (dsym_fspec, arch, uuid))
{
@@ -403,7 +400,7 @@
*next_slash = '\0';
strncat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
strncat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
- dsym_fspec.SetFile(path);
+ dsym_fspec.SetFile(path, false);
if (dsym_fspec.Exists())
return true;
else
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index 2258ca2..5bf313b 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -1074,7 +1074,7 @@
return;
const char *init_file_path = in_cwd ? "./.lldbinit" : "~/.lldbinit";
- FileSpec init_file (init_file_path);
+ FileSpec init_file (init_file_path, true);
// If the file exists, tell HandleCommand to 'source' it; this will do the actual broadcasting
// of the commands back to any appropriate listener (see CommandObjectSource::Execute for more details).
diff --git a/source/Interpreter/Options.cpp b/source/Interpreter/Options.cpp
index fcf048b..cd810c6 100644
--- a/source/Interpreter/Options.cpp
+++ b/source/Interpreter/Options.cpp
@@ -866,7 +866,7 @@
const char *module_name = input.GetArgumentAtIndex(cur_arg_pos);
if (module_name)
{
- FileSpec module_spec(module_name);
+ FileSpec module_spec(module_name, false);
lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
// Search filters require a target...
if (target_sp != NULL)
diff --git a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 73a333f..10e7e7a 100644
--- a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -543,7 +543,7 @@
char raw_path[PATH_MAX];
m_process->ReadMemory (path_addr, raw_path, sizeof(raw_path), error);
- m_dyld_image_infos[i].file_spec.SetFile(raw_path);
+ m_dyld_image_infos[i].file_spec.SetFile(raw_path, true);
}
assert(i == m_dyld_all_image_infos.dylib_info_count);
@@ -787,7 +787,7 @@
{
uint32_t name_offset = load_cmd_offset + data.GetU32 (&offset);
const char *path = data.PeekCStr (name_offset);
- lc_id_dylinker->SetFile (path);
+ lc_id_dylinker->SetFile (path, true);
}
break;
diff --git a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 402dcae..85c337f 100644
--- a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -271,7 +271,7 @@
uint32_t str_index = static_cast<uint32_t>(symbol.d_val);
const char *lib_name = dynstr_data.PeekCStr(str_index);
- m_filespec_ap->Append(FileSpec(lib_name));
+ m_filespec_ap->Append(FileSpec(lib_name, true));
}
}
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index e5c7db3..ddadd2c 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1412,7 +1412,7 @@
// @rpath/.../file
if (path && path[0] != '@')
{
- FileSpec file_spec(path);
+ FileSpec file_spec(path, true);
if (files.AppendIfUnique(file_spec))
count++;
}
diff --git a/source/Plugins/Process/MacOSX-User/source/ThreadMacOSX.cpp b/source/Plugins/Process/MacOSX-User/source/ThreadMacOSX.cpp
index aae460e..63c9dc5 100644
--- a/source/Plugins/Process/MacOSX-User/source/ThreadMacOSX.cpp
+++ b/source/Plugins/Process/MacOSX-User/source/ThreadMacOSX.cpp
@@ -111,13 +111,13 @@
DataExtractor data(memory_buffer, sizeof(memory_buffer), m_process.GetByteOrder(), m_process.GetAddressByteSize());
static ConstString g_dispatch_queue_offsets_symbol_name ("dispatch_queue_offsets");
const Symbol *dispatch_queue_offsets_symbol = NULL;
- ModuleSP module_sp(m_process.GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libSystem.B.dylib")));
+ ModuleSP module_sp(m_process.GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libSystem.B.dylib", false)));
if (module_sp)
dispatch_queue_offsets_symbol = module_sp->FindFirstSymbolWithNameAndType (g_dispatch_queue_offsets_symbol_name, eSymbolTypeData);
if (dispatch_queue_offsets_symbol == NULL)
{
- module_sp = m_process.GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libdispatch.dylib"));
+ module_sp = m_process.GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libdispatch.dylib", false));
if (module_sp)
dispatch_queue_offsets_symbol = module_sp->FindFirstSymbolWithNameAndType (g_dispatch_queue_offsets_symbol_name, eSymbolTypeData);
}
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 8a4cfa7..5e99e9c 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1674,7 +1674,7 @@
// to the debugserver to use and use it if we do.
const char *env_debugserver_path = getenv("LLDB_DEBUGSERVER_PATH");
if (env_debugserver_path)
- debugserver_file_spec.SetFile (env_debugserver_path);
+ debugserver_file_spec.SetFile (env_debugserver_path, false);
else
debugserver_file_spec = g_debugserver_file_spec;
bool debugserver_exists = debugserver_file_spec.Exists();
@@ -2236,13 +2236,13 @@
{
static ConstString g_dispatch_queue_offsets_symbol_name ("dispatch_queue_offsets");
const Symbol *dispatch_queue_offsets_symbol = NULL;
- ModuleSP module_sp(GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libSystem.B.dylib")));
+ ModuleSP module_sp(GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libSystem.B.dylib", false)));
if (module_sp)
dispatch_queue_offsets_symbol = module_sp->FindFirstSymbolWithNameAndType (g_dispatch_queue_offsets_symbol_name, eSymbolTypeData);
if (dispatch_queue_offsets_symbol == NULL)
{
- module_sp = GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libdispatch.dylib"));
+ module_sp = GetTarget().GetImages().FindFirstModuleForFileSpec (FileSpec("libdispatch.dylib", false));
if (module_sp)
dispatch_queue_offsets_symbol = module_sp->FindFirstSymbolWithNameAndType (g_dispatch_queue_offsets_symbol_name, eSymbolTypeData);
}
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 88a8a12..4647b91 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -137,7 +137,7 @@
Symbol *oso_symbol = comp_unit_info->oso_symbol;
if (oso_symbol)
{
- FileSpec oso_file_spec(oso_symbol->GetMangled().GetName().AsCString());
+ FileSpec oso_file_spec(oso_symbol->GetMangled().GetName().AsCString(), true);
ModuleList::GetSharedModule (oso_file_spec,
m_obj_file->GetModule()->GetArchitecture(),
@@ -168,7 +168,7 @@
std::string so_path (m_compile_unit_infos[oso_idx].so_symbol->GetMangled().GetName().AsCString());
if (m_compile_unit_infos[oso_idx].so_symbol[1].GetType() == eSymbolTypeSourceFile)
so_path += m_compile_unit_infos[oso_idx].so_symbol[1].GetMangled().GetName().AsCString();
- m_compile_unit_infos[oso_idx].so_file.SetFile(so_path.c_str());
+ m_compile_unit_infos[oso_idx].so_file.SetFile(so_path.c_str(), true);
}
file_spec = m_compile_unit_infos[oso_idx].so_file;
return true;
diff --git a/source/Symbol/CompileUnit.cpp b/source/Symbol/CompileUnit.cpp
index b263e57..e0ef4fe 100644
--- a/source/Symbol/CompileUnit.cpp
+++ b/source/Symbol/CompileUnit.cpp
@@ -18,7 +18,7 @@
CompileUnit::CompileUnit (Module *module, void *user_data, const char *pathname, const lldb::user_id_t cu_sym_id, lldb::LanguageType language) :
ModuleChild(module),
- FileSpec (pathname),
+ FileSpec (pathname, false),
UserID(cu_sym_id),
Language (language),
m_user_data (user_data),
diff --git a/source/Symbol/ObjectFile.cpp b/source/Symbol/ObjectFile.cpp
index d4225cf..8c0ffce 100644
--- a/source/Symbol/ObjectFile.cpp
+++ b/source/Symbol/ObjectFile.cpp
@@ -51,7 +51,7 @@
if (g_object_regex.GetMatchAtIndex (path_with_object, 1, path) &&
g_object_regex.GetMatchAtIndex (path_with_object, 2, object))
{
- archive_file.SetFile (path.c_str());
+ archive_file.SetFile (path.c_str(), false);
file_size = archive_file.GetByteSize();
if (file_size > 0)
module->SetFileSpecAndObjectName (archive_file, ConstString(object.c_str()));