diff options
author | Greg Clayton <gclayton@apple.com> | 2014-09-16 20:50:29 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-09-16 20:50:29 +0000 |
commit | e37df2e64b4fd9d8f64ce36bdc926cb3462f339c (patch) | |
tree | e2d3bef88eca8e0931d55c7947d9c095c9abfe28 /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | |
parent | 9fa2fc8357e40bd4ce55acc749c0ef22e84ad650 (diff) | |
download | bcm5719-llvm-e37df2e64b4fd9d8f64ce36bdc926cb3462f339c.tar.gz bcm5719-llvm-e37df2e64b4fd9d8f64ce36bdc926cb3462f339c.zip |
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.
<rdar://problem/18312703>
llvm-svn: 217905
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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(); } |