llvm-project/lldb
Luke Drummond 19459580af Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 backend
Expression evaluation for function calls to certain public RenderScript
API functions in libRSCPURef can segfault.

`slang`,
the compiler frontend for RenderScript embeds an ARM specific triple in
IR that is shipped in the app, after generating IR that has some
assumptions that an ARM device is the target.
As the IR is then compiled on a device of unknown (at time the IR was
generated at least) architecture, when calling RenderScript API function
as part of debugger expressions, we have to perform a fixup pass that
removes those assumptions right before the module is sent to be
generated by the llvm backend.

This issue is caused by multiple problems with the ARMv7-specific
assumptions encoded in the LLVM IR. x86 large value returns use a hidden
first argument (mapping to llvm::Attribute::StructRet), which can't be
picked up by the JIT due to the mismatch between IR generated by the
slang frontend and llvm backend. This means that code generated by bcc
did not necessarily match the default SysV Linux/Android ABI used by the
LLDB JIT

- Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds)

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D18059

llvm-svn: 276976
2016-07-28 14:21:07 +00:00
..
cmake Fix LLDBConfig.cmake to enable python enabled build for all 64 bit lldb targets 2016-07-26 21:43:02 +00:00
docs Support loading files even when incorrect file name specified by the linker 2016-07-22 12:55:35 +00:00
examples Fixup the "shadow" example command to use the function that takes an execution context now that the @lldb.command decorator does the right thing for the command function that takes 5 arguments. 2016-06-28 00:06:35 +00:00
include/lldb Fix DataExtractor::PeekData for zero length peeks 2016-07-26 08:11:57 +00:00
lit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:14:05 +00:00
lldb.xcodeproj reduce Green Dragon macOS build session filename length 2016-07-26 16:08:26 +00:00
lldb.xcworkspace Revert r275223, which committed the wrong thing. 2016-07-12 23:31:42 +00:00
packages/Python/lldbsuite Fixed "void SBWatchpoint::SetEnabled (bool enabled)" to work properly and added a test for it. 2016-07-27 20:47:49 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts Add LLVM build config for BuildAndIntegration. 2016-07-12 01:44:58 +00:00
source Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 backend 2016-07-28 14:21:07 +00:00
test Always rerun all tests on Windows. 2016-05-23 17:32:04 +00:00
third_party/Python/module Put progress.py back, apparently this can't be deleted. 2015-12-09 21:32:28 +00:00
tools Add a new DynamicLoader plugin that uses SPI that are in development 2016-07-21 08:30:55 +00:00
unittests Fix DataExtractor::PeekData for zero length peeks 2016-07-26 08:11:57 +00:00
utils Python 3: Modernize exception raising syntax. 2015-11-03 21:01:45 +00:00
www Update the website with lots of new info about building / testing. 2016-02-24 22:19:23 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Update .clang-format file to support break after return type. 2015-12-28 22:09:29 +00:00
.gitignore Ignore clang-module-cache directories that may be created 2016-07-19 02:37:07 +00:00
CMakeLists.txt [CMake] Update to requiring CMake 3.4.3 2016-05-31 20:21:44 +00:00
CODE_OWNERS.txt Added myself to the CODE_OWNERS.txt list for a few subsystems. 2015-11-09 01:24:36 +00:00
INSTALL.txt Revert the patch to Test Commit Access 2015-07-06 11:26:51 +00:00
LICENSE.TXT
use_lldb_suite_root.py Preparation for turning lldbsuite into a Python package. 2015-10-27 22:33:47 +00:00