diff options
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 250356756d5..11b2796475b 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -5426,8 +5426,7 @@ ObjectFileMachO::SaveCore (const lldb::ProcessSP &process_sp, // Now write the file data for all memory segments in the process for (const auto &segment : segment_load_commands) { - off_t offset = core_file.SeekFromStart(segment.fileoff); - if (offset < 0 || segment.fileoff != static_cast<uint64_t>(offset)) + if (core_file.SeekFromStart(segment.fileoff) == -1) { error.SetErrorStringWithFormat("unable to seek to offset 0x%" PRIx64 " in '%s'", segment.fileoff, core_file_path.c_str()); break; |