summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
diff options
context:
space:
mode:
authorEwan Crawford <ewan@codeplay.com>2015-10-21 08:50:42 +0000
committerEwan Crawford <ewan@codeplay.com>2015-10-21 08:50:42 +0000
commit55232f0948ab98c285bc65537f03f8e36d2ab9fa (patch)
treeb9c567baa31b3e6e0ea3d99c3dbddfe4c6687749 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
parent17ad04535faaf580f10c23d6622a55a3aefe845b (diff)
downloadbcm5719-llvm-55232f0948ab98c285bc65537f03f8e36d2ab9fa.tar.gz
bcm5719-llvm-55232f0948ab98c285bc65537f03f8e36d2ab9fa.zip
[RenderScript] New commands to save/load RS allocations to file.
Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file. And 'language renderscript allocation load' to restore an allocation with the saved data from a binary file. Binary file format contains a header FileHeader with meta information preceding the raw data. Reviewed by: jingham, clayborg Subscribers: lldb-commits, domipheus Differential Revision: http://reviews.llvm.org/D13903 llvm-svn: 250886
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index 740ab32ed14..b8342e0fd07 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -218,6 +218,10 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
virtual void ModulesDidLoad(const ModuleList &module_list );
+ bool LoadAllocation(Stream &strm, const uint32_t alloc_id, const char* filename, StackFrame* frame_ptr);
+
+ bool SaveAllocation(Stream &strm, const uint32_t alloc_id, const char* filename, StackFrame* frame_ptr);
+
void Update();
void Initiate();
@@ -264,7 +268,7 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
const HookDefn *defn;
lldb::BreakpointSP bp_sp;
};
-
+
typedef std::shared_ptr<RuntimeHook> RuntimeHookSP;
lldb::ModuleSP m_libRS;
@@ -301,6 +305,8 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
void CaptureSetGlobalVar1(RuntimeHook* hook_info, ExecutionContext& context);
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);
//
// Helper functions for jitting the runtime
OpenPOWER on IntegriCloud