Fix off-by-one error in armv7 mach-o corefile register context
authorJason Molenda <jason@molenda.com>
Wed, 26 Apr 2023 20:04:38 +0000 (13:04 -0700)
committerJason Molenda <jason@molenda.com>
Wed, 26 Apr 2023 20:06:07 +0000 (13:06 -0700)
commit6b6bac2cd81df86354196304815b96c53bd93305
tree3f2a2e3c088882e948a7247d3507a5fb6ca33452
parent6e8ce16797cac6804d49bd8f7e299d89a8897b3e
Fix off-by-one error in armv7 mach-o corefile register context

The sanity check on the size of the register context we found in
the corefile was off by one, so lldb would not add the register
contents.  Add a test case to ensure it doesn't regress.

Differential Revision: https://reviews.llvm.org/D149224
rdar://108306070
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/test/API/macosx/arm-corefile-regctx/Makefile [new file with mode: 0644]
lldb/test/API/macosx/arm-corefile-regctx/TestArmMachoCorefileRegctx.py [new file with mode: 0644]
lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp [new file with mode: 0644]