From e37df2e64b4fd9d8f64ce36bdc926cb3462f339c Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 16 Sep 2014 20:50:29 +0000 Subject: Fixed an issue where the last N load commands in the mach-o core file would not be read in where N was the number of LC_THREAD load commands. I now properly increment the ncmds for each LC_THREAD and now core files are saved correctly. llvm-svn: 217905 --- lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp') diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 67be5a5980e..c7f313310c7 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -5349,6 +5349,7 @@ ObjectFileMachO::SaveCore (const lldb::ProcessSP &process_sp, // and the size of all LC_THREAD load command for (const auto &LC_THREAD_data : LC_THREAD_datas) { + ++mach_header.ncmds; mach_header.sizeofcmds += 8 + LC_THREAD_data.GetSize(); } -- cgit v1.2.3