[Lldb-commits] [PATCH] D61469: [Alias] Add 're' alias for register

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 3 13:36:53 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB359927: [Alias] Add 're' alias for register (authored by JDevlieghere, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D61469?vs=197872&id=198078#toc

Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61469/new/

https://reviews.llvm.org/D61469

Files:
  packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
  source/Interpreter/CommandInterpreter.cpp


Index: source/Interpreter/CommandInterpreter.cpp
===================================================================
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -429,6 +429,11 @@
     AddAlias("var", cmd_obj_sp);
     AddAlias("vo", cmd_obj_sp, "--object-description");
   }
+
+  cmd_obj_sp = GetCommandSPExact("register", false);
+  if (cmd_obj_sp) {
+    AddAlias("re", cmd_obj_sp);
+  }
 }
 
 void CommandInterpreter::Clear() {
Index: packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
+++ packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
@@ -187,7 +187,8 @@
         elif not value.IsValid():
             return  # If register doesn't exist, skip this test
 
-        self.runCmd("register write " + register + " \'" + new_value + "\'")
+        # Also test the 're' alias.
+        self.runCmd("re write " + register + " \'" + new_value + "\'")
         self.expect(
             "register read " +
             register,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61469.198078.patch
Type: text/x-patch
Size: 1221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190503/9209e219/attachment.bin>


More information about the lldb-commits mailing list