Skip to content

Commit e001bf6

Browse files
committed
Add help text for parray and poarray aliases.
1 parent e11df58 commit e001bf6

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,23 @@ void CommandInterpreter::Initialize() {
362362
"controlled by the type's author.");
363363
po->SetHelpLong("");
364364
}
365-
AddAlias("parray", cmd_obj_sp, "--element-count %1 --")->SetHelpLong("");
366-
AddAlias("poarray", cmd_obj_sp,
367-
"--object-description --element-count %1 --")
368-
->SetHelpLong("");
365+
CommandAlias *parray_alias = AddAlias("parray", cmd_obj_sp,
366+
"--element-count %1 --");
367+
if (parray_alias) {
368+
parray_alias->SetHelp
369+
("parray <COUNT> <EXPRESSION> -- lldb will evaluate EXPRESSION "
370+
"to get a typed-pointer-to-an-array in memory, and will display "
371+
"COUNT elements of that type from the array.");
372+
parray_alias->SetHelpLong("");
373+
}
374+
CommandAlias *poarray_alias = AddAlias("poarray", cmd_obj_sp,
375+
"--object-description --element-count %1 --");
376+
if (poarray_alias) {
377+
poarray_alias->SetHelp("poarray <COUNT> <EXPRESSION> -- lldb will "
378+
"evaluate EXPRESSION to get the address of an array of COUNT "
379+
"objects in memory, and will call po on them.");
380+
poarray_alias->SetHelpLong("");
381+
}
369382
}
370383

371384
cmd_obj_sp = GetCommandSPExact("process kill", false);

0 commit comments

Comments
 (0)