[Lldb-commits] [lldb] r240753 - When the user specifies a corefile that is not readable,
Jason Molenda
jmolenda at apple.com
Thu Jun 25 19:16:48 PDT 2015
Author: jmolenda
Date: Thu Jun 25 21:16:48 2015
New Revision: 240753
URL: http://llvm.org/viewvc/llvm-project?rev=240753&view=rev
Log:
When the user specifies a corefile that is not readable,
give them a meaningful error message instead of
"Unable to find process plug-in for core file ...".
<rdar://problem/21255759>
<rdar://problem/21091522>
http://blog.ignoranthack.me/?p=204
Modified:
lldb/trunk/source/Commands/CommandObjectTarget.cpp
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=240753&r1=240752&r2=240753&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Thu Jun 25 21:16:48 2015
@@ -387,6 +387,12 @@ protected:
core_file.GetPath(core_path, sizeof(core_path));
if (core_file.Exists())
{
+ if (!core_file.Readable())
+ {
+ result.AppendMessageWithFormat ("Core file '%s' is not readable.\n", core_path);
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
FileSpec core_file_dir;
core_file_dir.GetDirectory() = core_file.GetDirectory();
target_sp->GetExecutableSearchPaths ().Append (core_file_dir);
More information about the lldb-commits
mailing list