summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript
Commit message (Collapse)AuthorAgeFilesLines
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-066-4411/+4249
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Decoupled Options from CommandInterpreter.Todd Fiala2016-08-111-12/+15
| | | | | | | | | | | | | | | | Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
* [RenderScript] Always create a new allocation ID in CaptureAllocationInit hookLuke Drummond2016-08-032-12/+39
| | | | | | | | | | | | | | | | Due to internal reuse of buffers in the RenderScript runtime by the system allocator, comparing pointers is not a safe way to check whether an allocation is tracked by lldb. This change updates the lldb RenderScript internal hook callback to properly identify and remove old allocations that had have an address that is currently being tracked. This change also removes the need for `lldb_private::renderscript::LookupAllocation` to take a `create` flag, as this is now always the case. Original Author: <dean@codeplay.com> Subscribers: lldb-commits llvm-svn: 277613
* Fix an unused variable warning in release builds.Luke Drummond2016-08-031-1/+1
| | | | | | | | | | | | ``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy`` and was only used in an `assert()` that the number of function parameters for the cloned function was correct. Now we actually use this variable, rather than recomputing it, and avoid the unused variable warning when building without asserts enabled. Subscribers: lldb-commits llvm-svn: 277608
* Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 ↵Luke Drummond2016-07-287-3/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Typo corrections identified by codespellEd Maste2016-07-191-5/+5
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-141-6/+6
| | | | | | | | | review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-1/+1
| | | | llvm-svn: 270024
* Revert r268591Enrico Granata2016-05-052-13/+6
| | | | | | | | | | | | | | "Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors" I need to think about what I want to do in this space more carefully - this attempt might be too heavy of a hammer for the nail I am trying to fix, and I don't want to leave it in while I ponder llvm-svn: 268686
* Allow LanguageRuntimes to return an error if they fail in the course of ↵Enrico Granata2016-05-052-6/+13
| | | | | | | | | | | | dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors llvm-svn: 268591
* Get rid of two global constructors by making things static variables in the ↵Greg Clayton2016-03-242-9/+8
| | | | | | only function that uses these variables. llvm-svn: 264347
* [Renderscript] Add stack argument reading code for Mipsel 3Aidan Dodds2016-03-101-7/+7
| | | | | | | | Fix a problem raised with the previous patches being applied in the wrong order. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263134
* [Renderscript] Add stack argument reading code for Mipsel 2Aidan Dodds2016-03-101-2/+9
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263131
* [Renderscript] Add stack argument reading code for MipselAidan Dodds2016-03-101-6/+17
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263130
* [Renderscript] Explicitly set the language to evaluate allocationsAidan Dodds2016-03-101-1/+3
| | | | | | | | | | | | | | | | | | | | Currently it is not specified, and since allocations are usually requested once we hit a renderscript breakpoint, the language will be inferred being as renderscript by the ExpressionParser. Actually allocations attempt to invoke functions part of the RS runtime, written in C/C++, so evaluating the calls in RenderScript could be misleading. In particular, in MIPS, the ABI between C/C++ (mips o32) and renderscript (arm) might introduce subtle bugs when evaluating such expressions. This change explicitly sets the language used to evaluate the allocations as C++. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263129
* Fix all of the unannotated switch cases to annotate the fall through or do ↵Greg Clayton2016-02-261-4/+4
| | | | | | the right thing and break. llvm-svn: 261950
* [Renderscript] Change expression strings to use portable format specifiers.Aidan Dodds2016-02-241-22/+26
| | | | | | Mips64 tests were failing on windows because the sscanf implementation differs between clang/gcc/msvc such that on windows %lx specifies a 32bits parameter and %llx is for 64bits. For us this meant that 64bit pointers were being truncated to 32bits on their way into a JIT'd expression. llvm-svn: 261741
* RenderScript: silence some -Wmissing-brace warningsSaleem Abdulrasool2016-02-231-2/+2
| | | | | | Silence some -Wmissing-brace warnings on Linux with clang 3.7. llvm-svn: 261612
* [Renderscript] Refactor .rs.info parser.Aidan Dodds2016-02-181-52/+66
| | | | | | This patch refactors the .rs.info table parser so that its more in line with the current language runtime code. llvm-svn: 261202
* Silence some clang warningsSaleem Abdulrasool2016-02-151-13/+13
| | | | | | Silences -Wmissing-brace and -Wformat-pedantic warnings from clang on Linux. NFC. llvm-svn: 260914
* [Renderscript] Fix typo in mips64 argument reading code.Aidan Dodds2016-02-111-1/+1
| | | | | | A typo in the mips64 argument reading code would cause register passed arguments to be truncated to 32bits. llvm-svn: 260546
* [Renderscript] Refactor target argument reading code.Aidan Dodds2016-02-112-340/+463
| | | | | | This patch reworks the function argument reading code, allowing us to annotate arguments with their types. The type/size information is needed to correctly parse arguments passed on the stack. llvm-svn: 260525
* [RenderScript] Refactor allocation expressions Ewan Crawford2016-02-101-77/+85
| | | | | | | Patch refractors RS plugin code specifying how format strings are used to JIT the runtime. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 260372
* Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata2016-02-061-6/+1
| | | | | | | | | | created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
* [RenderScript] Add command for recalculating allocation detailsEwan Crawford2016-02-042-0/+61
| | | | | | | | Patch replaces the --refresh flag removed in r258800 with it's own command, 'language renderscript allocation refresh'. Since there is no reason this functionality should be tied to another command as an option. The command itself simply re-JITs all our cached information about allocations. llvm-svn: 259773
* [RenderScript] Remove unused RS commandEwan Crawford2016-01-292-55/+2
| | | | | | | | | | Patch deletes the 'language renderscript module probe' command. This command was present in the initial commit to help debug the plugin. However we haven't used it recently and it's functionality is unclear, so can be removed entirely. Also add back 'kernel coordinate' command, removed by accident in clang format patch r259056. llvm-svn: 259181
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* [Renderscript] Clang-format the renderscript plugin.Aidan Dodds2016-01-282-754/+819
| | | | | | Run clang-format over the renderscript plugin and fix common formatting deviations. llvm-svn: 259056
* [RenderScript] Provide option to specify a single allocation to printEwan Crawford2016-01-262-22/+23
| | | | | | | | Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>. This new option only prints the details of a single allocation with a given id, rather than printing all the allocations. Functionality from the removed '--refresh' flag will be moved into its own command in a subsequent commit. llvm-svn: 258800
* Fix clang warning in RenderScriptRuntimePavel Labath2016-01-201-1/+1
| | | | | | | | std::array should have "the same semantics as a struct holding a C-style array T[N] as its only non-static data member", so the initialization should have one more level of braces. Hopefully, no compiler will object to that. llvm-svn: 258306
* [RenderScript] New command for viewing coordinate of current kernel invocationEwan Crawford2016-01-202-35/+138
| | | | | | | Patch adds command 'language renderscript kernel coordinate' for printing the kernel index in (x,y,z) format. This is done by walking the call stack and looking for a function with suffix '.expand', as well as the frame variables containing the coordinate data. llvm-svn: 258303
* [RenderScript] Remove mips specific expressionsEwan Crawford2016-01-182-180/+90
| | | | | | | | Reverts earlier commit r254910, which used function pointers for jitted expressions to avoid a Mips64 compiler bug. Bug has since been fixed, and compiler longer issues the problem instruction. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 258038
* [RenderScript] Hook kernel invocation.Aidan Dodds2016-01-142-17/+115
| | | | | | This patch adds a hook to track kernel invocations and to track all script and allocation objects used. llvm-svn: 257772
* Better scheme to lookup alternate mangled name when looking up function address.Siva Chandra2016-01-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change is relevant for inferiors compiled with GCC. GCC does not emit complete debug info for std::basic_string<...>, and consequently, Clang (the LLDB compiler) does not generate correct mangled names for certain functions. This change removes the hard-coded alternate names in ItaniumABILanguageRuntime.cpp. Before the hard-coded names were put in ItaniumABILanguageRuntime.cpp, one could not evaluate std::string methods (ex. std::string::length). After putting in the hard-coded names, one could evaluate them. However, it did not still enable one to call methods on, say for example, std::vector<string>. This change makes that possible. There is some amount of incompleteness in this change. Consider the following example: std::string hello("hello"), world("world"); std::map<std::string, std::string> m; m[hello] = world; One can still not evaluate the expression "m[hello]" in LLDB. Will address this issue in another pass. Reviewers: jingham, vharron, evgeny777, spyffe, dawn Subscribers: clayborg, dawn, lldb-commits Differential Revision: http://reviews.llvm.org/D12809 llvm-svn: 257113
* [RenderScript] Improve file format for saving RS allocationsEwan Crawford2016-01-072-29/+154
| | | | | | | | | | | Updates the file format for storing RS allocations to a file, so that the format now supports struct element types. The file header will now contain a subheader for every RS element and it's descendants. Where an element subheader contains element type details and offsets to the subheaders of that elements fields. Patch also improves robustness when loading incorrect files. llvm-svn: 257045
* [Renderscript] Fix stack argument inspection.Aidan Dodds2016-01-061-43/+42
| | | | | | | Function arguments that were spilled and passed on the stack were incorrectly read. The value was written back into the output pointer rather then the memory being pointed to. llvm-svn: 256941
* Revert r256769Ewan Crawford2016-01-051-1/+1
| | | | | | | | | Reverts "Use correct format identifiers to print something meaningful." Original format specifiers were correct. Instead use void* casts to remove warnings, since this is what the %p specifier expects. llvm-svn: 256833
* Use correct format identifiers to print something meaningful.Davide Italiano2016-01-041-1/+1
| | | | llvm-svn: 256769
* [RenderScript] Support all RS allocation types Ewan Crawford2015-12-171-18/+100
| | | | | | | | Currently we can just inspect the details of the most common allocation types. This patch allows us to support all the types defined by the RS runtime in its `RsDataType` enum. Including handlers, matrices and packed graphical data. llvm-svn: 255904
* [RenderScript] Support for amd64 RS hooksEwan Crawford2015-12-111-9/+54
| | | | | | | Adds support for reading a maximum of six integer arguments from a renderscript hook on X86_64. Author: Luke Drummond <luke.drummond@codeplay.com> llvm-svn: 255338
* [RenderScript] Refactor condition deciding when to JIT RS runtimeEwan Crawford2015-12-101-9/+19
| | | | | | | Patch creates a member function that decides when to JIT all the details about an allocation. By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation. llvm-svn: 255238
* [RenderScript] Add hook for destroyed allocationsEwan Crawford2015-12-092-1/+46
| | | | | | | New hook for rsdAllocationDestroy() which is called when allocations are deleted. LLDB should be aware of this so we can remove the allocation from our internal list. llvm-svn: 255121
* [RenderScript] Mips64 allocations workaroundEwan Crawford2015-12-072-90/+180
| | | | | | | | | Workaround for Mips64 compiler bug by using function pointers to call functions for expression evaluation. This avoids the emission of the JAL instruction, which can only jump within a particular range of the PC. Author: Dean De Leo, dean@codeplay.com llvm-svn: 254910
* Fix hang in global static initializationAdrian McCarthy2015-11-301-4/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D15092 llvm-svn: 254338
* [RS] Support RenderScript struct allocationsEwan Crawford2015-11-302-116/+409
| | | | | | | | | | | | This patch adds functionality for dumping allocations of struct elements. This involves: + Jitting the runtime for details on all the struct fields. + Finding the name of the struct type by looking for a global variable of the same type, which will have been reflected back to the java host code. + Using this struct type name to pass into expression evaluation for pretty printing the data for the dump command. llvm-svn: 254294
* Allow renderscript runtime to read MIPS target arguments.Aidan Dodds2015-11-121-1/+41
| | | | llvm-svn: 252914
* Explicitly cast size_t var to (uint64_t) when printf format is PRIx64.Jason Molenda2015-10-291-2/+2
| | | | llvm-svn: 251585
* Fix Clang-tidy modernize-use-override warnings in ↵Eugene Zelenko2015-10-272-161/+123
| | | | | | source/Plugins/LanguageRuntime and Platform; other minor fixes. llvm-svn: 251374
* [RenderScript] Add option to break on a specific kernel invocationEwan Crawford2015-10-262-21/+262
| | | | | | | | | Adds option -c <x,y,z> to the 'language renderscript kernel breakpoint set' command. Breaks only on the invocation of the kernel with specified coordinate. Implemented by adding a callback to the kernel breakpoint which checks the coordinates of every invocation. llvm-svn: 251293
* Fix a build issue on Debian unstable. The compiler rejected the convertion ↵Sylvestre Ledru2015-10-261-2/+2
| | | | | | to ‘bool’ from ‘std::nullptr_t’ llvm-svn: 251276
OpenPOWER on IntegriCloud