================
@@ -280,6 +280,12 @@ SBError Driver::ProcessArgs(const opt::InputArgList &args, 
bool &exiting) {
   }
 
   if (args.hasArg(OPT_wait_for)) {
+    if (!args.hasArg(OPT_attach_name) || !args.hasArg(OPT_attach_pid)) {
----------------
jimingham wrote:

Process::Attach does:

```
  lldb::pid_t attach_pid = attach_info.GetProcessID();
  Status error;
  if (attach_pid == LLDB_INVALID_PROCESS_ID) {
    char process_name[PATH_MAX];

    if (attach_info.GetExecutableFile().GetPath(process_name,
                                                sizeof(process_name))) {
      const bool wait_for_launch = attach_info.GetWaitForLaunch();

```

and then:

```
  if (attach_pid != LLDB_INVALID_PROCESS_ID) {
    error = WillAttachToProcessWithID(attach_pid);
    if (error.Success()) {
      m_public_run_lock.SetRunning();

      // Now attach using these arguments.
      m_should_detach = true;
      const bool restarted = false;
      SetPublicState(eStateAttaching, restarted);
      error = DoAttachToProcessWithID(attach_pid, attach_info);

```

so the help is wrong...

https://github.com/llvm/llvm-project/pull/142424
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to