diff --git a/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp b/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp index 3e08eccb9df49..50b2d05df3eef 100644 --- a/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp +++ b/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp @@ -120,7 +120,7 @@ NativeProcessELF::ReadSVR4LibraryInfo(lldb::addr_t link_map_addr) { char name_buffer[PATH_MAX]; error = ReadMemory(link_map.l_name, &name_buffer, sizeof(name_buffer), bytes_read); - if (!error.Success()) + if (bytes_read == 0) return error.ToError(); name_buffer[PATH_MAX - 1] = '\0'; @@ -176,4 +176,4 @@ NativeProcessELF::GetLoadedSVR4Libraries() { return library_list; } -} // namespace lldb_private \ No newline at end of file +} // namespace lldb_private