diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 7257ff3..448da0e 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -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); |