diff options
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 17 | ||||
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 57 |
2 files changed, 35 insertions, 39 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 630490e3271..7312dfc5b7e 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -470,6 +470,11 @@ LanguageRuntime *AppleObjCRuntimeV2::CreateInstance(Process *process, return NULL; } +static OptionDefinition g_objc_classtable_dump_options[] = { + {LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, + nullptr, nullptr, 0, eArgTypeNone, + "Print ivar and method information in detail"}}; + class CommandObjectObjC_ClassTable_Dump : public CommandObjectParsed { public: class CommandOptions : public Options { @@ -501,10 +506,11 @@ public: m_verbose.Clear(); } - const OptionDefinition *GetDefinitions() override { return g_option_table; } + llvm::ArrayRef<OptionDefinition> GetDefinitions() override { + return g_objc_classtable_dump_options; + } OptionValueBoolean m_verbose; - static OptionDefinition g_option_table[]; }; CommandObjectObjC_ClassTable_Dump(CommandInterpreter &interpreter) @@ -627,13 +633,6 @@ protected: CommandOptions m_options; }; -OptionDefinition - CommandObjectObjC_ClassTable_Dump::CommandOptions::g_option_table[] = { - {LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, - nullptr, nullptr, 0, eArgTypeNone, - "Print ivar and method information in detail"}, - {0, false, nullptr, 0, 0, nullptr, nullptr, 0, eArgTypeNone, nullptr}}; - class CommandObjectMultiwordObjC_TaggedPointer_Info : public CommandObjectParsed { public: diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 9d751a75da0..1e4d846a898 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -3692,6 +3692,15 @@ public: } }; +static OptionDefinition g_renderscript_kernel_bp_set_options[] = { + {LLDB_OPT_SET_1, false, "coordinate", 'c', OptionParser::eRequiredArgument, + nullptr, nullptr, 0, eArgTypeValue, + "Set a breakpoint on a single invocation of the kernel with specified " + "coordinate.\n" + "Coordinate takes the form 'x[,y][,z] where x,y,z are positive " + "integers representing kernel dimensions. " + "Any unset dimensions will be defaulted to zero."}}; + class CommandObjectRenderScriptRuntimeKernelBreakpointSet : public CommandObjectParsed { public: @@ -3770,9 +3779,10 @@ public: m_coord[2] = -1; } - const OptionDefinition *GetDefinitions() override { return g_option_table; } + llvm::ArrayRef<OptionDefinition> GetDefinitions() override { + return g_renderscript_kernel_bp_set_options; + } - static OptionDefinition g_option_table[]; std::array<int, 3> m_coord; }; @@ -3809,17 +3819,6 @@ private: CommandOptions m_options; }; -OptionDefinition CommandObjectRenderScriptRuntimeKernelBreakpointSet:: - CommandOptions::g_option_table[] = { - {LLDB_OPT_SET_1, false, "coordinate", 'c', - OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeValue, - "Set a breakpoint on a single invocation of the kernel with specified " - "coordinate.\n" - "Coordinate takes the form 'x[,y][,z] where x,y,z are positive " - "integers representing kernel dimensions. " - "Any unset dimensions will be defaulted to zero."}, - {0, false, nullptr, 0, 0, nullptr, nullptr, 0, eArgTypeNone, nullptr}}; - class CommandObjectRenderScriptRuntimeKernelBreakpointAll : public CommandObjectParsed { public: @@ -3972,6 +3971,11 @@ public: } }; +static OptionDefinition g_renderscript_runtime_alloc_dump_options[] = { + {LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, + nullptr, nullptr, 0, eArgTypeFilename, + "Print results to specified file instead of command line."}}; + class CommandObjectRenderScriptRuntimeContext : public CommandObjectMultiword { public: CommandObjectRenderScriptRuntimeContext(CommandInterpreter &interpreter) @@ -4034,9 +4038,10 @@ public: m_outfile.Clear(); } - const OptionDefinition *GetDefinitions() override { return g_option_table; } + llvm::ArrayRef<OptionDefinition> GetDefinitions() override { + return g_renderscript_runtime_alloc_dump_options; + } - static OptionDefinition g_option_table[]; FileSpec m_outfile; }; @@ -4103,12 +4108,10 @@ private: CommandOptions m_options; }; -OptionDefinition CommandObjectRenderScriptRuntimeAllocationDump:: - CommandOptions::g_option_table[] = { - {LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, - nullptr, nullptr, 0, eArgTypeFilename, - "Print results to specified file instead of command line."}, - {0, false, nullptr, 0, 0, nullptr, nullptr, 0, eArgTypeNone, nullptr}}; +static OptionDefinition g_renderscript_runtime_alloc_list_options[] = { + {LLDB_OPT_SET_1, false, "id", 'i', OptionParser::eRequiredArgument, nullptr, + nullptr, 0, eArgTypeIndex, + "Only show details of a single allocation with specified id."}}; class CommandObjectRenderScriptRuntimeAllocationList : public CommandObjectParsed { @@ -4157,9 +4160,10 @@ public: m_id = 0; } - const OptionDefinition *GetDefinitions() override { return g_option_table; } + llvm::ArrayRef<OptionDefinition> GetDefinitions() override { + return g_renderscript_runtime_alloc_list_options; + } - static OptionDefinition g_option_table[]; uint32_t m_id; }; @@ -4177,13 +4181,6 @@ private: CommandOptions m_options; }; -OptionDefinition CommandObjectRenderScriptRuntimeAllocationList:: - CommandOptions::g_option_table[] = { - {LLDB_OPT_SET_1, false, "id", 'i', OptionParser::eRequiredArgument, - nullptr, nullptr, 0, eArgTypeIndex, - "Only show details of a single allocation with specified id."}, - {0, false, nullptr, 0, 0, nullptr, nullptr, 0, eArgTypeNone, nullptr}}; - class CommandObjectRenderScriptRuntimeAllocationLoad : public CommandObjectParsed { public: |