31using namespace lldb_renderscript;
39 interpreter,
"renderscript scriptgroup breakpoint set",
40 "Place a breakpoint on all kernels forming a script group.",
41 "renderscript scriptgroup breakpoint set <group_name>",
42 eCommandRequiresProcess | eCommandProcessMustBeLaunched) {
56 bool stop_on_all =
false;
57 const llvm::StringRef long_stop_all(
"--stop-on-all"), short_stop_all(
"-a");
58 std::vector<ConstString> sites;
62 if (long_stop_all == arg || short_stop_all == arg)
67 for (
const auto &name : sites) {
81 interpreter,
"renderscript scriptgroup breakpoint",
82 "Renderscript scriptgroup breakpoint interaction.",
83 "renderscript scriptgroup breakpoint set [--stop-on-all/-a]"
84 "<scriptgroup name> ...",
85 eCommandRequiresProcess | eCommandProcessMustBeLaunched) {
99 "List all currently discovered script groups.",
100 "renderscript scriptgroup list",
101 eCommandRequiresProcess |
102 eCommandProcessMustBeLaunched) {}
114 stream.
Printf(
"%" PRIu64
" script %s", uint64_t(groups.size()),
115 (groups.size() == 1) ?
"group" :
"groups");
123 stream.
Printf(
"%s", g->m_name.AsCString());
127 for (
const auto &k : g->m_kernels) {
129 stream.
Printf(
". %s", k.m_name.AsCString());
145 "Command set for interacting with scriptgroups.",
146 nullptr, eCommandRequiresProcess |
147 eCommandProcessMustBeLaunched) {
153 "list", CommandObjectSP(
lldb::CommandObjectSP NewCommandObjectRenderScriptScriptGroup(lldb_private::CommandInterpreter &interpreter)
bool DoExecute(Args &command, CommandReturnObject &result) override
~CommandObjectRenderScriptScriptGroupBreakpointSet() override=default
CommandObjectRenderScriptScriptGroupBreakpointSet(CommandInterpreter &interpreter)
CommandObjectRenderScriptScriptGroupBreakpoint(CommandInterpreter &interpreter)
~CommandObjectRenderScriptScriptGroupBreakpoint() override=default
bool DoExecute(Args &command, CommandReturnObject &result) override
~CommandObjectRenderScriptScriptGroupList() override=default
CommandObjectRenderScriptScriptGroupList(CommandInterpreter &interpreter)
CommandObjectRenderScriptScriptGroup(CommandInterpreter &interpreter)
~CommandObjectRenderScriptScriptGroup() override=default
A command line argument class.
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
const char * GetArgumentAtIndex(size_t idx) const
Gets the NULL terminated C string argument pointer for the argument at index idx.
bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override
ExecutionContext m_exe_ctx
std::vector< CommandArgumentEntry > m_arguments
void SetStatus(lldb::ReturnStatus status)
Stream & GetOutputStream()
A uniqued constant string class.
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
Process * GetProcessPtr() const
Returns a pointer to the process object.
LanguageRuntime * GetLanguageRuntime(lldb::LanguageType language)
const lldb_renderscript::RSScriptGroupList & GetScriptGroups() const
bool PlaceBreakpointOnScriptGroup(lldb::TargetSP target, Stream &strm, ConstString name, bool stop_on_all)
A stream class that can stream formatted output to a file.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t EOL()
Output and End of Line character to the stream.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
std::shared_ptr< RSScriptGroupDescriptor > RSScriptGroupDescriptorSP
std::vector< RSScriptGroupDescriptorSP > RSScriptGroupList
A class that represents a running process on the host machine.
@ eLanguageTypeExtRenderScript
RenderScript.
@ eReturnStatusSuccessFinishResult
Used to build individual command argument lists.