summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-04-25 00:52:47 +0000
committerEnrico Granata <egranata@apple.com>2016-04-25 00:52:47 +0000
commit520a422bd8e63087d84e01a01504fdca846ae529 (patch)
tree314d35b1a4d8fb1423f906acb74ae255225a6027 /lldb/source/Interpreter/CommandInterpreter.cpp
parenteb4d823184d3d3c7d588f03fbb72d13f026b6113 (diff)
downloadbcm5719-llvm-520a422bd8e63087d84e01a01504fdca846ae529.tar.gz
bcm5719-llvm-520a422bd8e63087d84e01a01504fdca846ae529.zip
Add a --element-count option to the expression command
This option evaluates an expression and, if the result is of pointer type, treats it as if it was an array of that many elements and displays such elements This has a couple subtle points but is mostly as straightforward as it sounds Add a parray N <expr> alias for this new mode Also, extend the --object-description mode to do the moral equivalent of the above but display each element in --object-description mode Add a poarray N <expr> alias for this llvm-svn: 267372
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index b28c44a5272..bf6cded4e92 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -348,6 +348,8 @@ CommandInterpreter::Initialize ()
po->SetHelp("Evaluate an expression in the current program context, using user defined variables and variables currently in scope, and display the result of evaluation in a language-specific manner.");
po->SetHelpLong("");
}
+ AddAlias("parray", cmd_obj_sp, "--element-count %1 --")->SetHelpLong("");
+ AddAlias("poarray", cmd_obj_sp, "--object-description --element-count %1 --")->SetHelpLong("");
}
cmd_obj_sp = GetCommandSPExact ("process kill", false);
OpenPOWER on IntegriCloud