summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
diff options
context:
space:
mode:
authorEwan Crawford <ewan@codeplay.com>2016-01-20 12:03:29 +0000
committerEwan Crawford <ewan@codeplay.com>2016-01-20 12:03:29 +0000
commit4f8817c2db7a355f8131310c4e2e0c57fc452c5a (patch)
tree550a53e7a7517fa63bcdab24f361a23814452f67 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
parentcc018c1713720b9da56922a2d83329ad97e1bb06 (diff)
[RenderScript] New command for viewing coordinate of current kernel invocation
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
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 715539e126b9..0c63fd09be23 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -36,6 +36,7 @@ struct RSKernelDescriptor;
typedef std::shared_ptr<RSModuleDescriptor> RSModuleDescriptorSP;
typedef std::shared_ptr<RSGlobalDescriptor> RSGlobalDescriptorSP;
typedef std::shared_ptr<RSKernelDescriptor> RSKernelDescriptorSP;
+typedef std::array<uint32_t, 3> RSCoordinate;
// Breakpoint Resolvers decide where a breakpoint is placed,
// so having our own allows us to limit the search scope to RS kernel modules.
@@ -224,6 +225,9 @@ public:
uint32_t GetPluginVersion() override;
+ static bool
+ GetKernelCoordinate(lldb_renderscript::RSCoordinate &coord, Thread *thread_ptr);
+
protected:
struct ScriptDetails;
struct AllocationDetails;
@@ -279,7 +283,7 @@ protected:
std::map<lldb::addr_t, lldb_renderscript::RSModuleDescriptorSP> m_scriptMappings;
std::map<lldb::addr_t, RuntimeHookSP> m_runtimeHooks;
- std::map<lldb::user_id_t, std::shared_ptr<int>> m_conditional_breaks;
+ std::map<lldb::user_id_t, std::shared_ptr<uint32_t>> m_conditional_breaks;
lldb::SearchFilterSP m_filtersp; // Needed to create breakpoints through Target API
@@ -288,6 +292,8 @@ protected:
bool m_breakAllKernels;
static const HookDefn s_runtimeHookDefns[];
static const size_t s_runtimeHookCount;
+ static const std::string s_runtimeExpandSuffix;
+ static const std::array<const char *, 3> s_runtimeCoordVars;
private:
RenderScriptRuntime(Process *process); // Call CreateInstance instead.