Skip to content

Commit be69e12

Browse files
committed
[lldb][lldb-dap] explicitly set the expr as an alias for expression.
dap console does not recognise `expr` as a command because it is not explicitly set. It works fine in normal lldb because it is gotten from approximate match which is not available in the SBAPI
1 parent 6f34d03 commit be69e12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ void CommandInterpreter::Initialize() {
444444
if (cmd_obj_sp) {
445445
// Ensure `e` runs `expression`.
446446
AddAlias("e", cmd_obj_sp);
447+
AddAlias("expr", cmd_obj_sp);
447448
AddAlias("call", cmd_obj_sp, "--")->SetHelpLong("");
448449
CommandAlias *parray_alias =
449450
AddAlias("parray", cmd_obj_sp, "--element-count %1 --");
@@ -1376,7 +1377,9 @@ bool CommandInterpreter::GetAliasFullName(llvm::StringRef cmd,
13761377
}
13771378

13781379
bool CommandInterpreter::AliasExists(llvm::StringRef cmd) const {
1379-
return m_alias_dict.find(cmd) != m_alias_dict.end();
1380+
std::string alias_name;
1381+
return GetAliasFullName(cmd, alias_name);
1382+
// return m_alias_dict.find(cmd) != m_alias_dict.end();
13801383
}
13811384

13821385
bool CommandInterpreter::UserCommandExists(llvm::StringRef cmd) const {

0 commit comments

Comments
 (0)