[Lldb-commits] [lldb] Start to clean up the process of defining command arguments. (PR #83097)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 27 09:38:11 PST 2024
================
@@ -694,27 +712,32 @@ void CommandObject::GenerateHelpText(Stream &output_strm) {
}
}
-void CommandObject::AddIDsArgumentData(CommandArgumentEntry &arg,
- CommandArgumentType ID,
- CommandArgumentType IDRange) {
+void CommandObject::AddIDsArgumentData(CommandObject::IDType type) {
+ CommandArgumentEntry arg;
CommandArgumentData id_arg;
CommandArgumentData id_range_arg;
// Create the first variant for the first (and only) argument for this
// command.
- id_arg.arg_type = ID;
+ switch (type) {
+ case eBreakpointArgs:
+ id_arg.arg_type = eArgTypeBreakpointID;
+ id_range_arg.arg_type = eArgTypeBreakpointIDRange;
+ break;
+ case eWatchpointArgs:
+ id_arg.arg_type = eArgTypeWatchpointID;
+ id_range_arg.arg_type = eArgTypeWatchpointIDRange;
+ break;
+ }
----------------
jimingham wrote:
This bit of code gets run once per SBDebugger startup per command that has breakpoint or watchpoint ID/IDRange argument types, about 10 times per SBDebugger::Create. I don't think we need to overthink this one.
https://github.com/llvm/llvm-project/pull/83097
More information about the lldb-commits
mailing list