llvm-project/lldb/source/Plugins/ABI
Pavel Labath 686b27b55a [lldb][PPC64] Fixed vector and struct return value
Summary:
The PowerPC64 ABI plugin was modified to:

- properly handle vector type return values
- implement support for struct/class return values

A refactoring in the code that handles return values was also performed, to make it possible to handle structs without repeating (when possible) code that handles its fields.

There was also an issue with CreateInstance(), that only created an instance in the first time it was called and then cached it in a static var. When restarting a process under LLDB's control, the ABI's process weak pointer would become null, and using it would result in a segmentation fault. This issue became more evident after the latest changes to PPC64 plugin, that now uses the process pointer to get the target byte order, making LLDB to seg fault when restarting a program. This was fixed by making CreateInstance() to always create a new ABI instance.

All of LLDB's ReturnValue tests are passing for PPC64le now. It should work for PPC64be too, although this was not tested.

Reviewers: labath, clayborg

Reviewed By: labath

Subscribers: lbianc, anajuliapc, llvm-commits, alexandreyy, nemanjai, kbarton

Differential Revision: https://reviews.llvm.org/D42468
Patch by Leandro Lupori <leandro.lupori@gmail.com>.

llvm-svn: 325324
2018-02-16 09:29:41 +00:00
..
MacOSX-arm Update ABIMacOSX_arm::PrepareTrivialCall to correctly align the 2017-09-27 02:49:18 +00:00
MacOSX-arm64 Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
MacOSX-i386 Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-arm Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-arm64 Update ABISysV_arm64::RegisterIsVolatile to accept registers prefixed with r 2017-10-09 17:49:32 +00:00
SysV-hexagon Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-i386 Allow SysV-i386 ABI on everything other than Apple targets 2017-10-26 17:04:20 +00:00
SysV-mips Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-mips64 Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-ppc [ABI] Remove dead code that was copy-pasted all around. NFCI. 2017-11-18 00:54:31 +00:00
SysV-ppc64 [lldb][PPC64] Fixed vector and struct return value 2018-02-16 09:29:41 +00:00
SysV-s390x Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
SysV-x86_64 [ABI/SysV] Remove more dead code. NFCI. 2017-11-18 00:35:27 +00:00
CMakeLists.txt Support Linux on SystemZ as platform 2016-04-14 14:28:34 +00:00