diff options
author | Greg Clayton <gclayton@apple.com> | 2014-08-15 18:03:30 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-08-15 18:03:30 +0000 |
commit | 39945dcc0ba585b111a06cbe5fb9e9416676a1dc (patch) | |
tree | 9ab48b58c97246c282c3a416932efcff7e76c314 /lldb/source | |
parent | 1a0b735340da46ffaf0f9deb529d8395b337d633 (diff) | |
download | bcm5719-llvm-39945dcc0ba585b111a06cbe5fb9e9416676a1dc.tar.gz bcm5719-llvm-39945dcc0ba585b111a06cbe5fb9e9416676a1dc.zip |
Missed a few places where we need to report unreadable executables.
<rdar://problem/17727734>
llvm-svn: 215743
Diffstat (limited to 'lldb/source')
6 files changed, 66 insertions, 24 deletions
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index 8e925dffaac..b7744c0d1c5 100644 --- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -287,10 +287,17 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } } diff --git a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp index 961444cf439..549dd93d666 100644 --- a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp +++ b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp @@ -184,10 +184,17 @@ PlatformKalimba::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } } diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp index 62f95e14767..5b3615bb0f4 100644 --- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -301,10 +301,17 @@ PlatformLinux::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp index def9ada89e7..dd6d93815e5 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -273,10 +273,17 @@ PlatformRemoteiOS::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } else diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp index 357a21938f5..cc1f432aab8 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp @@ -238,10 +238,17 @@ PlatformiOSSimulator::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } else diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp index bce182068d6..d3e1deac61f 100644 --- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp +++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -294,10 +294,17 @@ PlatformWindows::ResolveExecutable (const FileSpec &exe_file, if (error.Fail() || !exe_module_sp) { - error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", - exe_file.GetPath().c_str(), - GetPluginName().GetCString(), - arch_names.GetString().c_str()); + if (exe_file.Readable()) + { + error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s", + exe_file.GetPath().c_str(), + GetPluginName().GetCString(), + arch_names.GetString().c_str()); + } + else + { + error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str()); + } } } } |