LLDB mainline
RenderScriptRuntime.h
Go to the documentation of this file.
1//===-- RenderScriptRuntime.h -----------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_RENDERSCRIPT_RENDERSCRIPTRUNTIME_RENDERSCRIPTRUNTIME_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_RENDERSCRIPT_RENDERSCRIPTRUNTIME_RENDERSCRIPTRUNTIME_H
11
12#include <array>
13#include <map>
14#include <memory>
15#include <string>
16#include <vector>
17
18#include "llvm/ADT/SmallVector.h"
19#include "llvm/ADT/StringRef.h"
20#include "lldb/Core/Module.h"
23#include "lldb/lldb-private.h"
24
26
27namespace clang {
28class TargetOptions;
29}
30
31namespace lldb_private {
32namespace lldb_renderscript {
33
40
41typedef std::shared_ptr<RSModuleDescriptor> RSModuleDescriptorSP;
42typedef std::shared_ptr<RSGlobalDescriptor> RSGlobalDescriptorSP;
43typedef std::shared_ptr<RSKernelDescriptor> RSKernelDescriptorSP;
44typedef std::shared_ptr<RSScriptGroupDescriptor> RSScriptGroupDescriptorSP;
45
47 uint32_t x = 0, y = 0, z = 0;
48
49 RSCoordinate() = default;
50
52 return x == rhs.x && y == rhs.y && z == rhs.z;
53 }
54};
55
56// Breakpoint Resolvers decide where a breakpoint is placed, so having our own
57// allows us to limit the search scope to RS kernel modules. As well as check
58// for .expand kernels as a fallback.
60public:
61 RSBreakpointResolver(const lldb::BreakpointSP &bp, ConstString name)
63 m_kernel_name(name) {}
64
65 void GetDescription(Stream *strm) override {
66 if (strm)
67 strm->Printf("RenderScript kernel breakpoint for '%s'",
69 }
70
71 void Dump(Stream *s) const override {}
72
74 SymbolContext &context,
75 Address *addr) override;
76
78
79 lldb::BreakpointResolverSP
80 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override {
81 lldb::BreakpointResolverSP ret_sp(
82 new RSBreakpointResolver(breakpoint, m_kernel_name));
83 return ret_sp;
84 }
85
86protected:
88};
89
91public:
95 eKernelTypeAccum = (1 << 0),
96 eKernelTypeInit = (1 << 1),
97 eKernelTypeComb = (1 << 2),
98 eKernelTypeOutC = (1 << 3),
99 eKernelTypeHalter = (1 << 4)
100 };
101
103 const lldb::BreakpointSP &breakpoint, ConstString reduce_name,
104 std::vector<lldb_renderscript::RSModuleDescriptorSP> *rs_modules,
105 int kernel_types = eKernelTypeAll)
107 m_reduce_name(reduce_name), m_rsmodules(rs_modules),
108 m_kernel_types(kernel_types) {
109 // The reduce breakpoint resolver handles adding breakpoints for named
110 // reductions.
111 // Breakpoints will be resolved for all constituent kernels in the named
112 // reduction
113 }
114
115 void GetDescription(Stream *strm) override {
116 if (strm)
117 strm->Printf("RenderScript reduce breakpoint for '%s'",
119 }
120
121 void Dump(Stream *s) const override {}
122
124 SymbolContext &context,
125 Address *addr) override;
126
128
129 lldb::BreakpointResolverSP
130 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override {
131 lldb::BreakpointResolverSP ret_sp(new RSReduceBreakpointResolver(
133 return ret_sp;
134 }
135
136private:
137 ConstString m_reduce_name; // The name of the reduction
138 std::vector<lldb_renderscript::RSModuleDescriptorSP> *m_rsmodules;
140};
141
143public:
144 RSKernelDescriptor(const RSModuleDescriptor *module, llvm::StringRef name,
145 uint32_t slot)
146 : m_module(module), m_name(name), m_slot(slot) {}
147
148 void Dump(Stream &strm) const;
149
153};
154
156public:
157 RSGlobalDescriptor(const RSModuleDescriptor *module, llvm::StringRef name)
158 : m_module(module), m_name(name) {}
159
160 void Dump(Stream &strm) const;
161
164};
165
168 uint32_t accum_data_size, llvm::StringRef name,
169 llvm::StringRef init_name, llvm::StringRef accum_name,
170 llvm::StringRef comb_name, llvm::StringRef outc_name,
171 llvm::StringRef halter_name = ".")
172 : m_module(module), m_reduce_name(name), m_init_name(init_name),
173 m_accum_name(accum_name), m_comb_name(comb_name),
174 m_outc_name(outc_name), m_halter_name(halter_name), m_accum_sig(0),
176 // TODO Check whether the combiner is an autogenerated name, and track
177 // this
178 }
179
180 void Dump(Stream &strm) const;
181
183 ConstString m_reduce_name; // This is the name given to the general reduction
184 // as a group as passed to pragma
185 // reduce(m_reduce_name). There is no kernel function with this name
186 ConstString m_init_name; // The name of the initializer name. "." if no
187 // initializer given
188 ConstString m_accum_name; // The accumulator function name. "." if not given
189 ConstString m_comb_name; // The name of the combiner function. If this was not
190 // given, a name is generated by the
191 // compiler. TODO
192 ConstString m_outc_name; // The name of the outconverter
193
194 ConstString m_halter_name; // The name of the halter function. XXX This is not
195 // yet specified by the RenderScript
196 // compiler or runtime, and its semantics and existence is still under
197 // discussion by the
198 // RenderScript Contributors
199 RSSlot m_accum_sig; // metatdata signature for this reduction (bitwise mask of
200 // type information (see
201 // libbcc/include/bcinfo/MetadataExtractor.h
202 uint32_t m_accum_data_size; // Data size of the accumulator function input
203 bool m_comb_name_generated; // Was the combiner name generated by the compiler
204};
205
207 std::string m_slang_version;
208 std::string m_bcc_version;
209
210 bool ParseVersionInfo(llvm::StringRef *, size_t n_lines);
211
212 bool ParseExportForeachCount(llvm::StringRef *, size_t n_lines);
213
214 bool ParseExportVarCount(llvm::StringRef *, size_t n_lines);
215
216 bool ParseExportReduceCount(llvm::StringRef *, size_t n_lines);
217
218 bool ParseBuildChecksum(llvm::StringRef *, size_t n_lines);
219
220 bool ParsePragmaCount(llvm::StringRef *, size_t n_lines);
221
222public:
223 RSModuleDescriptor(const lldb::ModuleSP &module) : m_module(module) {}
224
226
227 bool ParseRSInfo();
228
229 void Dump(Stream &strm) const;
230
231 void WarnIfVersionMismatch(Stream *s) const;
232
233 const lldb::ModuleSP m_module;
234 std::vector<RSKernelDescriptor> m_kernels;
235 std::vector<RSGlobalDescriptor> m_globals;
236 std::vector<RSReductionDescriptor> m_reductions;
237 std::map<std::string, std::string> m_pragmas;
238 std::string m_resname;
239};
240
242 struct Kernel {
245 };
247 std::vector<Kernel> m_kernels;
248};
249
250typedef std::vector<RSScriptGroupDescriptorSP> RSScriptGroupList;
251
253public:
254 RSScriptGroupBreakpointResolver(const lldb::BreakpointSP &bp,
255 ConstString name,
256 const RSScriptGroupList &groups,
257 bool stop_on_all)
259 m_group_name(name), m_script_groups(groups),
260 m_stop_on_all(stop_on_all) {}
261
262 void GetDescription(Stream *strm) override {
263 if (strm)
264 strm->Printf("RenderScript ScriptGroup breakpoint for '%s'",
266 }
267
268 void Dump(Stream *s) const override {}
269
271 SymbolContext &context,
272 Address *addr) override;
273
275
276 lldb::BreakpointResolverSP
277 CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override {
278 lldb::BreakpointResolverSP ret_sp(new RSScriptGroupBreakpointResolver(
280 return ret_sp;
281 }
282
283protected:
286 for (auto sg : m_script_groups) {
287 if (ConstString::Compare(sg->m_name, name) == 0)
288 return sg;
289 }
291 }
292
296};
297} // namespace lldb_renderscript
298
300public:
307 };
308
310
311 // Static Functions
312 static void Initialize();
313
314 static void Terminate();
315
317 CreateInstance(Process *process, lldb::LanguageType language);
318
319 static lldb::CommandObjectSP
321
322 static llvm::StringRef GetPluginNameStatic() { return "renderscript"; }
323
324 static char ID;
325
326 bool isA(const void *ClassID) const override {
327 return ClassID == &ID || CPPLanguageRuntime::isA(ClassID);
328 }
329
330 static bool classof(const LanguageRuntime *runtime) {
331 return runtime->isA(&ID);
332 }
333
334 static bool IsRenderScriptModule(const lldb::ModuleSP &module_sp);
335
336 static ModuleKind GetModuleKind(const lldb::ModuleSP &module_sp);
337
338 static void ModulesDidLoad(const lldb::ProcessSP &process_sp,
339 const ModuleList &module_list);
340
342 lldb::DynamicValueType use_dynamic,
343 TypeAndOrName &class_type_or_name,
344 Address &address,
345 Value::ValueType &value_type) override;
346
347 TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name,
348 ValueObject &static_value) override;
349
350 bool CouldHaveDynamicValue(ValueObject &in_value) override;
351
352 lldb::BreakpointResolverSP
353 CreateExceptionResolver(const lldb::BreakpointSP &bp,
354 bool catch_bp, bool throw_bp) override;
355
356 bool LoadModule(const lldb::ModuleSP &module_sp);
357
358 void DumpModules(Stream &strm) const;
359
360 void DumpContexts(Stream &strm) const;
361
362 void DumpKernels(Stream &strm) const;
363
364 bool DumpAllocation(Stream &strm, StackFrame *frame_ptr, const uint32_t id);
365
366 void ListAllocations(Stream &strm, StackFrame *frame_ptr,
367 const uint32_t index);
368
369 bool RecomputeAllAllocations(Stream &strm, StackFrame *frame_ptr);
370
372 lldb::TargetSP target, Stream &messages, const char *name,
373 const lldb_renderscript::RSCoordinate *coords = nullptr);
374
376 lldb::TargetSP target, Stream &messages, const char *reduce_name,
377 const lldb_renderscript::RSCoordinate *coords = nullptr,
378 int kernel_types = ~(0));
379
380 bool PlaceBreakpointOnScriptGroup(lldb::TargetSP target, Stream &strm,
381 ConstString name, bool stop_on_all);
382
383 void SetBreakAllKernels(bool do_break, lldb::TargetSP target);
384
385 void DumpStatus(Stream &strm) const;
386
387 void ModulesDidLoad(const ModuleList &module_list) override;
388
389 bool LoadAllocation(Stream &strm, const uint32_t alloc_id,
390 const char *filename, StackFrame *frame_ptr);
391
392 bool SaveAllocation(Stream &strm, const uint32_t alloc_id,
393 const char *filename, StackFrame *frame_ptr);
394
395 void Update();
396
397 void Initiate();
398
400 return m_scriptGroups;
401 };
402
404 for (const auto &module : m_rsmodules)
405 for (const auto &kernel : module->m_kernels)
406 if (kernel.m_name == name)
407 return true;
408 return false;
409 }
410
411 bool GetOverrideExprOptions(clang::TargetOptions &prototype);
412
413 // PluginInterface protocol
414 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
415
417 Thread *thread_ptr);
418
419 bool ResolveKernelName(lldb::addr_t kernel_address, ConstString &name);
420
421protected:
422 struct ScriptDetails;
423 struct AllocationDetails;
424 struct Element;
425
427
428 void InitSearchFilter(lldb::TargetSP target) {
429 if (!m_filtersp)
430 m_filtersp =
431 std::make_shared<SearchFilterForUnconstrainedSearches>(target);
432 }
433
435
436 void LoadRuntimeHooks(lldb::ModuleSP module, ModuleKind kind);
437
438 bool RefreshAllocation(AllocationDetails *alloc, StackFrame *frame_ptr);
439
440 bool EvalRSExpression(const char *expression, StackFrame *frame_ptr,
441 uint64_t *result);
442
443 lldb::BreakpointSP CreateScriptGroupBreakpoint(ConstString name,
444 bool multi);
445
446 lldb::BreakpointSP CreateKernelBreakpoint(ConstString name);
447
448 lldb::BreakpointSP CreateReductionBreakpoint(ConstString name,
449 int kernel_types);
450
453
454 struct RuntimeHook;
456 RuntimeHook *hook_info,
457 ExecutionContext &context); // Please do this!
458
459 struct HookDefn {
460 const char *name;
461 const char *symbol_name_m32; // mangled name for the 32 bit architectures
462 const char *symbol_name_m64; // mangled name for the 64 bit archs
466 };
467
468 struct RuntimeHook {
471 lldb::BreakpointSP bp_sp;
472 };
473
474 typedef std::shared_ptr<RuntimeHook> RuntimeHookSP;
475
476 lldb::ModuleSP m_libRS;
477 lldb::ModuleSP m_libRSDriver;
478 lldb::ModuleSP m_libRSCpuRef;
479 std::vector<lldb_renderscript::RSModuleDescriptorSP> m_rsmodules;
480
481 std::vector<std::unique_ptr<ScriptDetails>> m_scripts;
482 std::vector<std::unique_ptr<AllocationDetails>> m_allocations;
483
484 std::map<lldb::addr_t, lldb_renderscript::RSModuleDescriptorSP>
486 std::map<lldb::addr_t, RuntimeHookSP> m_runtimeHooks;
487 std::map<lldb::user_id_t, std::unique_ptr<lldb_renderscript::RSCoordinate>>
489
490 lldb::SearchFilterSP
491 m_filtersp; // Needed to create breakpoints through Target API
492
497 static const size_t s_runtimeHookCount;
499
500private:
501 RenderScriptRuntime(Process *process); // Call CreateInstance instead.
502
503 static bool HookCallback(void *baton, StoppointCallbackContext *ctx,
504 lldb::user_id_t break_id,
505 lldb::user_id_t break_loc_id);
506
507 static bool KernelBreakpointHit(void *baton, StoppointCallbackContext *ctx,
508 lldb::user_id_t break_id,
509 lldb::user_id_t break_loc_id);
510
511 void HookCallback(RuntimeHook *hook_info, ExecutionContext &context);
512
513 // Callback function when 'debugHintScriptGroup2' executes on the target.
515 ExecutionContext &context);
516
517 void CaptureScriptInit(RuntimeHook *hook_info, ExecutionContext &context);
518
519 void CaptureAllocationInit(RuntimeHook *hook_info, ExecutionContext &context);
520
522 ExecutionContext &context);
523
524 void CaptureSetGlobalVar(RuntimeHook *hook_info, ExecutionContext &context);
525
527 ExecutionContext &context);
528
529 AllocationDetails *FindAllocByID(Stream &strm, const uint32_t alloc_id);
530
531 std::shared_ptr<uint8_t> GetAllocationData(AllocationDetails *alloc,
532 StackFrame *frame_ptr);
533
534 void SetElementSize(Element &elem);
535
536 static bool GetFrameVarAsUnsigned(const lldb::StackFrameSP,
537 const char *var_name, uint64_t &val);
538
539 void FindStructTypeName(Element &elem, StackFrame *frame_ptr);
540
541 size_t PopulateElementHeaders(const std::shared_ptr<uint8_t> header_buffer,
542 size_t offset, const Element &elem);
543
544 size_t CalculateElementHeaderSize(const Element &elem);
545
546 void SetConditional(lldb::BreakpointSP bp, lldb_private::Stream &messages,
548 //
549 // Helper functions for jitting the runtime
550 //
551
552 bool JITDataPointer(AllocationDetails *alloc, StackFrame *frame_ptr,
553 uint32_t x = 0, uint32_t y = 0, uint32_t z = 0);
554
555 bool JITTypePointer(AllocationDetails *alloc, StackFrame *frame_ptr);
556
557 bool JITTypePacked(AllocationDetails *alloc, StackFrame *frame_ptr);
558
559 bool JITElementPacked(Element &elem, const lldb::addr_t context,
560 StackFrame *frame_ptr);
561
562 bool JITAllocationSize(AllocationDetails *alloc, StackFrame *frame_ptr);
563
564 bool JITSubelements(Element &elem, const lldb::addr_t context,
565 StackFrame *frame_ptr);
566
567 bool JITAllocationStride(AllocationDetails *alloc, StackFrame *frame_ptr);
568
569 // Search for a script detail object using a target address.
570 // If a script does not currently exist this function will return nullptr.
571 // If 'create' is true and there is no previous script with this address,
572 // then a new Script detail object will be created for this address and
573 // returned.
574 ScriptDetails *LookUpScript(lldb::addr_t address, bool create);
575
576 // Search for a previously saved allocation detail object using a target
577 // address.
578 // If an allocation does not exist for this address then nullptr will be
579 // returned.
581
582 // Creates a new allocation with the specified address assigning a new ID and
583 // removes
584 // any previous stored allocation which has the same address.
586
587 bool GetIRPasses(LLVMUserExpression::IRPasses &passes) override;
588};
589
590} // namespace lldb_private
591
592#endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_RENDERSCRIPT_RENDERSCRIPTRUNTIME_RENDERSCRIPTRUNTIME_H
A section + offset based address class.
Definition: Address.h:59
General Outline: The BreakpointResolver is a Searcher.
bool isA(const void *ClassID) const override
A uniqued constant string class.
Definition: ConstString.h:39
static int Compare(ConstString lhs, ConstString rhs, const bool case_sensitive=true)
Compare two string objects.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:192
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual bool isA(const void *ClassID) const
A collection class for Module objects.
Definition: ModuleList.h:82
A plug-in interface definition class for debugging a process.
Definition: Process.h:342
static lldb::CommandObjectSP GetCommandObject(CommandInterpreter &interpreter)
bool JITDataPointer(AllocationDetails *alloc, StackFrame *frame_ptr, uint32_t x=0, uint32_t y=0, uint32_t z=0)
static bool HookCallback(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
static void ModulesDidLoad(const lldb::ProcessSP &process_sp, const ModuleList &module_list)
static bool GetKernelCoordinate(lldb_renderscript::RSCoordinate &coord, Thread *thread_ptr)
void CaptureSetGlobalVar(RuntimeHook *hook_info, ExecutionContext &context)
bool JITAllocationSize(AllocationDetails *alloc, StackFrame *frame_ptr)
void FixupScriptDetails(lldb_renderscript::RSModuleDescriptorSP rsmodule_sp)
bool GetOverrideExprOptions(clang::TargetOptions &prototype)
void FindStructTypeName(Element &elem, StackFrame *frame_ptr)
static bool KernelBreakpointHit(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name, ValueObject &static_value) override
llvm::StringRef GetPluginName() override
size_t CalculateElementHeaderSize(const Element &elem)
std::vector< std::unique_ptr< ScriptDetails > > m_scripts
bool LoadModule(const lldb::ModuleSP &module_sp)
void CaptureScriptInvokeForEachMulti(RuntimeHook *hook_info, ExecutionContext &context)
AllocationDetails * FindAllocByID(Stream &strm, const uint32_t alloc_id)
void CaptureAllocationInit(RuntimeHook *hook_info, ExecutionContext &context)
const lldb_renderscript::RSScriptGroupList & GetScriptGroups() const
bool DumpAllocation(Stream &strm, StackFrame *frame_ptr, const uint32_t id)
static bool classof(const LanguageRuntime *runtime)
bool JITElementPacked(Element &elem, const lldb::addr_t context, StackFrame *frame_ptr)
void SetConditional(lldb::BreakpointSP bp, lldb_private::Stream &messages, const lldb_renderscript::RSCoordinate &coord)
lldb::BreakpointSP CreateReductionBreakpoint(ConstString name, int kernel_types)
bool JITTypePacked(AllocationDetails *alloc, StackFrame *frame_ptr)
std::map< lldb::addr_t, RuntimeHookSP > m_runtimeHooks
static const HookDefn s_runtimeHookDefns[]
bool PlaceBreakpointOnScriptGroup(lldb::TargetSP target, Stream &strm, ConstString name, bool stop_on_all)
ScriptDetails * LookUpScript(lldb::addr_t address, bool create)
void CaptureScriptInit(RuntimeHook *hook_info, ExecutionContext &context)
LLVMUserExpression::IRPasses * m_ir_passes
lldb::BreakpointSP CreateKernelBreakpoint(ConstString name)
std::vector< std::unique_ptr< AllocationDetails > > m_allocations
bool GetIRPasses(LLVMUserExpression::IRPasses &passes) override
void ListAllocations(Stream &strm, StackFrame *frame_ptr, const uint32_t index)
bool RefreshAllocation(AllocationDetails *alloc, StackFrame *frame_ptr)
static bool GetFrameVarAsUnsigned(const lldb::StackFrameSP, const char *var_name, uint64_t &val)
bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type) override
static ModuleKind GetModuleKind(const lldb::ModuleSP &module_sp)
bool isA(const void *ClassID) const override
static lldb_private::LanguageRuntime * CreateInstance(Process *process, lldb::LanguageType language)
bool RecomputeAllAllocations(Stream &strm, StackFrame *frame_ptr)
lldb::BreakpointResolverSP CreateExceptionResolver(const lldb::BreakpointSP &bp, bool catch_bp, bool throw_bp) override
bool JITTypePointer(AllocationDetails *alloc, StackFrame *frame_ptr)
size_t PopulateElementHeaders(const std::shared_ptr< uint8_t > header_buffer, size_t offset, const Element &elem)
bool JITAllocationStride(AllocationDetails *alloc, StackFrame *frame_ptr)
bool CouldHaveDynamicValue(ValueObject &in_value) override
std::map< lldb::user_id_t, std::unique_ptr< lldb_renderscript::RSCoordinate > > m_conditional_breaks
AllocationDetails * CreateAllocation(lldb::addr_t address)
void InitSearchFilter(lldb::TargetSP target)
bool JITSubelements(Element &elem, const lldb::addr_t context, StackFrame *frame_ptr)
std::shared_ptr< uint8_t > GetAllocationData(AllocationDetails *alloc, StackFrame *frame_ptr)
lldb_renderscript::RSScriptGroupList m_scriptGroups
void SetBreakAllKernels(bool do_break, lldb::TargetSP target)
std::vector< lldb_renderscript::RSModuleDescriptorSP > m_rsmodules
AllocationDetails * LookUpAllocation(lldb::addr_t address)
bool PlaceBreakpointOnReduction(lldb::TargetSP target, Stream &messages, const char *reduce_name, const lldb_renderscript::RSCoordinate *coords=nullptr, int kernel_types=~(0))
std::shared_ptr< RuntimeHook > RuntimeHookSP
lldb::BreakpointSP CreateScriptGroupBreakpoint(ConstString name, bool multi)
void CaptureAllocationDestroy(RuntimeHook *hook_info, ExecutionContext &context)
void CaptureDebugHintScriptGroup2(RuntimeHook *hook_info, ExecutionContext &context)
bool ResolveKernelName(lldb::addr_t kernel_address, ConstString &name)
std::map< lldb::addr_t, lldb_renderscript::RSModuleDescriptorSP > m_scriptMappings
bool LoadAllocation(Stream &strm, const uint32_t alloc_id, const char *filename, StackFrame *frame_ptr)
bool EvalRSExpression(const char *expression, StackFrame *frame_ptr, uint64_t *result)
bool PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name, const lldb_renderscript::RSCoordinate *coords=nullptr)
static llvm::StringRef GetPluginNameStatic()
static bool IsRenderScriptModule(const lldb::ModuleSP &module_sp)
bool SaveAllocation(Stream &strm, const uint32_t alloc_id, const char *filename, StackFrame *frame_ptr)
void(RenderScriptRuntime::* CaptureStateFn)(RuntimeHook *hook_info, ExecutionContext &context)
void LoadRuntimeHooks(lldb::ModuleSP module, ModuleKind kind)
void BreakOnModuleKernels(const lldb_renderscript::RSModuleDescriptorSP rsmodule_sp)
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
This base class provides an interface to stack frames.
Definition: StackFrame.h:41
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:33
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
Definition: Type.h:410
ValueType
Type that describes Value::m_value.
Definition: Value.h:41
void GetDescription(Stream *strm) override
Prints a canonical description for the breakpoint to the stream s.
RSBreakpointResolver(const lldb::BreakpointSP &bp, ConstString name)
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
bool ParseExportReduceCount(llvm::StringRef *, size_t n_lines)
bool ParseExportForeachCount(llvm::StringRef *, size_t n_lines)
bool ParseExportVarCount(llvm::StringRef *, size_t n_lines)
bool ParseVersionInfo(llvm::StringRef *, size_t n_lines)
bool ParseBuildChecksum(llvm::StringRef *, size_t n_lines)
std::vector< RSReductionDescriptor > m_reductions
std::map< std::string, std::string > m_pragmas
bool ParsePragmaCount(llvm::StringRef *, size_t n_lines)
std::vector< lldb_renderscript::RSModuleDescriptorSP > * m_rsmodules
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
void GetDescription(Stream *strm) override
Prints a canonical description for the breakpoint to the stream s.
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
RSReduceBreakpointResolver(const lldb::BreakpointSP &breakpoint, ConstString reduce_name, std::vector< lldb_renderscript::RSModuleDescriptorSP > *rs_modules, int kernel_types=eKernelTypeAll)
const RSScriptGroupDescriptorSP FindScriptGroup(ConstString name) const
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
RSScriptGroupBreakpointResolver(const lldb::BreakpointSP &bp, ConstString name, const RSScriptGroupList &groups, bool stop_on_all)
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
void GetDescription(Stream *strm) override
Prints a canonical description for the breakpoint to the stream s.
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
std::shared_ptr< RSKernelDescriptor > RSKernelDescriptorSP
std::shared_ptr< RSScriptGroupDescriptor > RSScriptGroupDescriptorSP
std::shared_ptr< RSModuleDescriptor > RSModuleDescriptorSP
std::vector< RSScriptGroupDescriptorSP > RSScriptGroupList
std::shared_ptr< RSGlobalDescriptor > RSGlobalDescriptorSP
A class that represents a running process on the host machine.
LanguageType
Programming language type.
@ eSearchDepthModule
uint64_t user_id_t
Definition: lldb-types.h:84
uint64_t addr_t
Definition: lldb-types.h:83
bool operator==(const lldb_renderscript::RSCoordinate &rhs)
RSGlobalDescriptor(const RSModuleDescriptor *module, llvm::StringRef name)
RSKernelDescriptor(const RSModuleDescriptor *module, llvm::StringRef name, uint32_t slot)
RSReductionDescriptor(const RSModuleDescriptor *module, uint32_t sig, uint32_t accum_data_size, llvm::StringRef name, llvm::StringRef init_name, llvm::StringRef accum_name, llvm::StringRef comb_name, llvm::StringRef outc_name, llvm::StringRef halter_name=".")