diff options
author | Ewan Crawford <ewan@codeplay.com> | 2015-11-30 10:29:49 +0000 |
---|---|---|
committer | Ewan Crawford <ewan@codeplay.com> | 2015-11-30 10:29:49 +0000 |
commit | 8b244e21d75ae15b7208925bb99024d1d4938c17 (patch) | |
tree | a48327a65bb9197e925921fa8bac6af96f199eb1 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | |
parent | d32db286a020db5a6214ca8e2a317009bc978a30 (diff) | |
download | bcm5719-llvm-8b244e21d75ae15b7208925bb99024d1d4938c17.tar.gz bcm5719-llvm-8b244e21d75ae15b7208925bb99024d1d4938c17.zip |
[RS] Support RenderScript struct allocations
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
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 9fd1862cd75..145f5d9932f 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -231,6 +231,7 @@ public: protected: struct ScriptDetails; struct AllocationDetails; + struct Element; void InitSearchFilter(lldb::TargetSP target) { @@ -311,8 +312,9 @@ private: AllocationDetails* FindAllocByID(Stream &strm, const uint32_t alloc_id); std::shared_ptr<uint8_t> GetAllocationData(AllocationDetails* allocation, StackFrame* frame_ptr); - unsigned int GetElementSize(const AllocationDetails* allocation); + void SetElementSize(Element& elem); static bool GetFrameVarAsUnsigned(const lldb::StackFrameSP, const char* var_name, uint64_t& val); + void FindStructTypeName(Element& elem, StackFrame* frame_ptr); // // Helper functions for jitting the runtime @@ -324,9 +326,11 @@ private: bool JITTypePacked(AllocationDetails* allocation, StackFrame* frame_ptr); - bool JITElementPacked(AllocationDetails* allocation, StackFrame* frame_ptr); + bool JITElementPacked(Element& elem, const lldb::addr_t context, StackFrame* frame_ptr); - bool JITAllocationSize(AllocationDetails* allocation, StackFrame* frame_ptr, const uint32_t elem_size); + bool JITAllocationSize(AllocationDetails* allocation, StackFrame* frame_ptr); + + bool JITSubelements(Element& elem, const lldb::addr_t context, StackFrame* frame_ptr); bool JITAllocationStride(AllocationDetails* allocation, StackFrame* frame_ptr); |