[Lldb-commits] [PATCH] D105028: [lldb] Fix that `process signal` completion always returns all signals

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 22 04:51:53 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG078003482e90: [lldb] Fix that `process signal` completion always returns all signals (authored by teemperor).
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105028

Files:
  lldb/source/Commands/CommandObjectProcess.cpp
  lldb/test/API/functionalities/completion/TestCompletion.py


Index: lldb/test/API/functionalities/completion/TestCompletion.py
===================================================================
--- lldb/test/API/functionalities/completion/TestCompletion.py
+++ lldb/test/API/functionalities/completion/TestCompletion.py
@@ -164,6 +164,8 @@
 
         self.complete_from_to('process signal ',
                               'process signal SIG')
+        self.complete_from_to('process signal SIGIN',
+                              'process signal SIGINT')
         self.complete_from_to('process signal SIGA',
                               ['SIGABRT',
                                'SIGALRM'])
Index: lldb/source/Commands/CommandObjectProcess.cpp
===================================================================
--- lldb/source/Commands/CommandObjectProcess.cpp
+++ lldb/source/Commands/CommandObjectProcess.cpp
@@ -1043,7 +1043,7 @@
     UnixSignalsSP signals = m_exe_ctx.GetProcessPtr()->GetUnixSignals();
     int signo = signals->GetFirstSignalNumber();
     while (signo != LLDB_INVALID_SIGNAL_NUMBER) {
-      request.AddCompletion(signals->GetSignalAsCString(signo), "");
+      request.TryCompleteCurrentArg(signals->GetSignalAsCString(signo));
       signo = signals->GetNextSignalNumber(signo);
     }
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105028.360770.patch
Type: text/x-patch
Size: 1263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210722/7bd8ac4d/attachment.bin>


More information about the lldb-commits mailing list