[Lldb-commits] [lldb] r215743 - Missed a few places where we need to report unreadable executables.
Greg Clayton
gclayton at apple.com
Fri Aug 15 11:03:30 PDT 2014
Author: gclayton
Date: Fri Aug 15 13:03:30 2014
New Revision: 215743
URL: http://llvm.org/viewvc/llvm-project?rev=215743&view=rev
Log:
Missed a few places where we need to report unreadable executables.
<rdar://problem/17727734>
Modified:
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Fri Aug 15 13:03:30 2014
@@ -287,10 +287,17 @@ PlatformFreeBSD::ResolveExecutable (cons
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());
+ }
}
}
}
Modified: lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp Fri Aug 15 13:03:30 2014
@@ -184,10 +184,17 @@ PlatformKalimba::ResolveExecutable (cons
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());
+ }
}
}
}
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Fri Aug 15 13:03:30 2014
@@ -301,10 +301,17 @@ PlatformLinux::ResolveExecutable (const
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());
+ }
}
}
}
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Fri Aug 15 13:03:30 2014
@@ -273,10 +273,17 @@ PlatformRemoteiOS::ResolveExecutable (co
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
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp Fri Aug 15 13:03:30 2014
@@ -238,10 +238,17 @@ PlatformiOSSimulator::ResolveExecutable
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
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=215743&r1=215742&r2=215743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Fri Aug 15 13:03:30 2014
@@ -294,10 +294,17 @@ PlatformWindows::ResolveExecutable (cons
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());
+ }
}
}
}
More information about the lldb-commits
mailing list