@@ -813,12 +813,7 @@ class CommandObjectBreakpointModify : public CommandObjectParsed {
813
813
" With the exception of -e, -d and -i, passing an "
814
814
" empty argument clears the modification." ,
815
815
nullptr ) {
816
- CommandArgumentEntry arg;
817
- CommandObject::AddIDsArgumentData (arg, eArgTypeBreakpointID,
818
- eArgTypeBreakpointIDRange);
819
- // Add the entry for the first argument for this command to the object's
820
- // arguments vector.
821
- m_arguments.push_back (arg);
816
+ CommandObject::AddIDsArgumentData (eBreakpointArgs);
822
817
823
818
m_options.Append (&m_bp_opts,
824
819
LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3,
@@ -890,12 +885,7 @@ class CommandObjectBreakpointEnable : public CommandObjectParsed {
890
885
" Enable the specified disabled breakpoint(s). If "
891
886
" no breakpoints are specified, enable all of them." ,
892
887
nullptr ) {
893
- CommandArgumentEntry arg;
894
- CommandObject::AddIDsArgumentData (arg, eArgTypeBreakpointID,
895
- eArgTypeBreakpointIDRange);
896
- // Add the entry for the first argument for this command to the object's
897
- // arguments vector.
898
- m_arguments.push_back (arg);
888
+ CommandObject::AddIDsArgumentData (eBreakpointArgs);
899
889
}
900
890
901
891
~CommandObjectBreakpointEnable () override = default ;
@@ -1002,12 +992,7 @@ execution will NOT stop at location 1.1. To achieve that, type:
1002
992
" The first command disables all locations for breakpoint 1, \
1003
993
the second re-enables the first location." );
1004
994
1005
- CommandArgumentEntry arg;
1006
- CommandObject::AddIDsArgumentData (arg, eArgTypeBreakpointID,
1007
- eArgTypeBreakpointIDRange);
1008
- // Add the entry for the first argument for this command to the object's
1009
- // arguments vector.
1010
- m_arguments.push_back (arg);
995
+ CommandObject::AddIDsArgumentData (eBreakpointArgs);
1011
996
}
1012
997
1013
998
~CommandObjectBreakpointDisable () override = default ;
@@ -1098,15 +1083,7 @@ class CommandObjectBreakpointList : public CommandObjectParsed {
1098
1083
CommandArgumentData bp_id_arg;
1099
1084
1100
1085
// Define the first (and only) variant of this arg.
1101
- bp_id_arg.arg_type = eArgTypeBreakpointID;
1102
- bp_id_arg.arg_repetition = eArgRepeatOptional;
1103
-
1104
- // There is only one variant this argument could be; put it into the
1105
- // argument entry.
1106
- arg.push_back (bp_id_arg);
1107
-
1108
- // Push the data for the first argument into the m_arguments vector.
1109
- m_arguments.push_back (arg);
1086
+ AddSimpleArgumentList (eArgTypeBreakpointID, eArgRepeatOptional);
1110
1087
}
1111
1088
1112
1089
~CommandObjectBreakpointList () override = default ;
@@ -1372,12 +1349,7 @@ class CommandObjectBreakpointDelete : public CommandObjectParsed {
1372
1349
" Delete the specified breakpoint(s). If no "
1373
1350
" breakpoints are specified, delete them all." ,
1374
1351
nullptr ) {
1375
- CommandArgumentEntry arg;
1376
- CommandObject::AddIDsArgumentData (arg, eArgTypeBreakpointID,
1377
- eArgTypeBreakpointIDRange);
1378
- // Add the entry for the first argument for this command to the object's
1379
- // arguments vector.
1380
- m_arguments.push_back (arg);
1352
+ CommandObject::AddIDsArgumentData (eBreakpointArgs);
1381
1353
}
1382
1354
1383
1355
~CommandObjectBreakpointDelete () override = default ;
@@ -1677,14 +1649,7 @@ class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
1677
1649
" on the name." ,
1678
1650
" breakpoint name configure <command-options> "
1679
1651
" <breakpoint-name-list>" ) {
1680
- // Create the first variant for the first (and only) argument for this
1681
- // command.
1682
- CommandArgumentEntry arg1;
1683
- CommandArgumentData id_arg;
1684
- id_arg.arg_type = eArgTypeBreakpointName;
1685
- id_arg.arg_repetition = eArgRepeatOptional;
1686
- arg1.push_back (id_arg);
1687
- m_arguments.push_back (arg1);
1652
+ AddSimpleArgumentList (eArgTypeBreakpointName, eArgRepeatOptional);
1688
1653
1689
1654
m_option_group.Append (&m_bp_opts, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
1690
1655
m_option_group.Append (&m_access_options, LLDB_OPT_SET_ALL,
@@ -1770,14 +1735,7 @@ class CommandObjectBreakpointNameAdd : public CommandObjectParsed {
1770
1735
: CommandObjectParsed(
1771
1736
interpreter, " add" , " Add a name to the breakpoints provided." ,
1772
1737
" breakpoint name add <command-options> <breakpoint-id-list>" ) {
1773
- // Create the first variant for the first (and only) argument for this
1774
- // command.
1775
- CommandArgumentEntry arg1;
1776
- CommandArgumentData id_arg;
1777
- id_arg.arg_type = eArgTypeBreakpointID;
1778
- id_arg.arg_repetition = eArgRepeatOptional;
1779
- arg1.push_back (id_arg);
1780
- m_arguments.push_back (arg1);
1738
+ AddSimpleArgumentList (eArgTypeBreakpointID, eArgRepeatOptional);
1781
1739
1782
1740
m_option_group.Append (&m_name_options, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL);
1783
1741
m_option_group.Finalize ();
@@ -1851,14 +1809,7 @@ class CommandObjectBreakpointNameDelete : public CommandObjectParsed {
1851
1809
interpreter, " delete" ,
1852
1810
" Delete a name from the breakpoints provided." ,
1853
1811
" breakpoint name delete <command-options> <breakpoint-id-list>" ) {
1854
- // Create the first variant for the first (and only) argument for this
1855
- // command.
1856
- CommandArgumentEntry arg1;
1857
- CommandArgumentData id_arg;
1858
- id_arg.arg_type = eArgTypeBreakpointID;
1859
- id_arg.arg_repetition = eArgRepeatOptional;
1860
- arg1.push_back (id_arg);
1861
- m_arguments.push_back (arg1);
1812
+ AddSimpleArgumentList (eArgTypeBreakpointID, eArgRepeatOptional);
1862
1813
1863
1814
m_option_group.Append (&m_name_options, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL);
1864
1815
m_option_group.Finalize ();
@@ -2308,12 +2259,7 @@ class CommandObjectBreakpointWrite : public CommandObjectParsed {
2308
2259
" be read in with \" breakpoint read\" . "
2309
2260
" If given no arguments, writes all breakpoints." ,
2310
2261
nullptr ) {
2311
- CommandArgumentEntry arg;
2312
- CommandObject::AddIDsArgumentData (arg, eArgTypeBreakpointID,
2313
- eArgTypeBreakpointIDRange);
2314
- // Add the entry for the first argument for this command to the object's
2315
- // arguments vector.
2316
- m_arguments.push_back (arg);
2262
+ CommandObject::AddIDsArgumentData (eBreakpointArgs);
2317
2263
}
2318
2264
2319
2265
~CommandObjectBreakpointWrite () override = default ;
0 commit comments