diff options
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()); +                }              }          }      }  | 

