[Lldb-commits] [lldb] [lldb][lldb-dap] explicitly set the expr as an alias for expression. (PR #134562)
via lldb-commits
lldb-commits at lists.llvm.org
Sun Apr 6 14:41:56 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ebuka Ezike (da-viper)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/134562.diff
1 Files Affected:
- (modified) lldb/source/Interpreter/CommandInterpreter.cpp (+4-1)
``````````diff
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 112d2f20fda41..a4071f5f0a602 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -444,6 +444,7 @@ void CommandInterpreter::Initialize() {
if (cmd_obj_sp) {
// Ensure `e` runs `expression`.
AddAlias("e", cmd_obj_sp);
+ AddAlias("expr", cmd_obj_sp);
AddAlias("call", cmd_obj_sp, "--")->SetHelpLong("");
CommandAlias *parray_alias =
AddAlias("parray", cmd_obj_sp, "--element-count %1 --");
@@ -1376,7 +1377,9 @@ bool CommandInterpreter::GetAliasFullName(llvm::StringRef cmd,
}
bool CommandInterpreter::AliasExists(llvm::StringRef cmd) const {
- return m_alias_dict.find(cmd) != m_alias_dict.end();
+ std::string alias_name;
+ return GetAliasFullName(cmd, alias_name);
+ // return m_alias_dict.find(cmd) != m_alias_dict.end();
}
bool CommandInterpreter::UserCommandExists(llvm::StringRef cmd) const {
``````````
</details>
https://github.com/llvm/llvm-project/pull/134562
More information about the lldb-commits
mailing list