[Lldb-commits] [PATCH] D68908: remove somewhat dangerous 'd'(etach) and 'k'(ill) shortcuts

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Jul 25 15:48:40 PDT 2020


clayborg added a comment.

So it seems like we should be either moving everything to the process menu, or keeping everything and introducing a confirmation dialog for any dangerous commands (kill, both detaches). This patch seems to keep some dangerous commands (detach suspended), remove one (detach), and add another (kill).



================
Comment at: lldb/source/Core/IOHandler.cpp:3766
-        {'d', "Detach and resume process"},
         {'D', "Detach with process suspended"},
         {'h', "Show help dialog"},
----------------
Do we really want to remove 'd' and not 'D' as well? We now handle this in the process menu right?




================
Comment at: lldb/source/Core/IOHandler.cpp:4331
-    case 'd': // 'd' == detach and let run
     case 'D': // 'D' == detach and keep stopped
     {
----------------
Do we really want to remove 'd' and not 'D' as well? We now handle this in the process menu right?


================
Comment at: lldb/source/Core/IOHandler.cpp:4340-4349
-    case 'k':
-      // 'k' == kill
-      {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasProcessScope())
-          exe_ctx.GetProcessRef().Destroy(false);
----------------
Is this not handled in the process menu? 'k' seems dangerous. Either that or we can introduce a confirmation dialog?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D68908





More information about the lldb-commits mailing list