[Lldb-commits] [PATCH] D107869: [LLDB][GUI] Add Process Launch form

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 17 21:30:03 PDT 2021


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

So I am trying this out. I tried the target creation form and I am not able to use arrow keys when entering the path to the main executable. Are you able to do this?

It seems like all text fields have this issue for me:

- left and right arrow keys don't work
- forward and backward delete don't work
- none of the editing like CTRL+A to go to the beginning work, CTRL+E to go to the end, etc.

Next I tried to launch the process with no args and got a error that was due to use filling in the shell if the user didn't specify it. We need to not specify a shell in the launch information if the user didn't specify it because this will cause us to try and launch the program inside of a shell. See inlined comments for fix.

There is also a big usability issue with this dialog if you check the show advanced settings. You must TAB many many times to get to the "Launch" button.

That being said, lets just fix this dialog for now with by removing the not getting the shell if it isn't specified and not setting the arch in the launch info it it wasn't specified, and this should be functional. I will suggest some usability fixes via email and we can work on getting those resolved with individual patches.



================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:3356-3357
+        target_sp ? target_sp->GetPlatform() : PlatformSP();
+    launch_info.GetArchitecture() = Platform::GetAugmentedArchSpec(
+        platform_sp.get(), m_arch_field->GetArchString());
+  }
----------------
Don't set the architecture if the user didn't specify it.


================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:3363-3364
+      launch_info.SetShell(m_shell_field->GetResolvedFileSpec());
+    else
+      launch_info.SetShell(HostInfo::GetDefaultShell());
+    launch_info.SetShellExpandArguments(
----------------
We shouldn't fill this out by default. If you do, then all of your programs will be launched via a shell. On Mac, this doesn't work because we can't debug any Apple code signed binairies and "/bin/sh", "/bin/bash", "/bin/zsh" and all others are not allowed to be debugged. So just remove this else clause. After I did this I was able to debug my binary with this dialog.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107869



More information about the lldb-commits mailing list