[all-commits] [llvm/llvm-project] a4f160: [lldb] Fix bug to update process public run lock w...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Wed Apr 19 16:55:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4f160dfc1aa508a88a83a9cb1420d762f863408
      https://github.com/llvm/llvm-project/commit/a4f160dfc1aa508a88a83a9cb1420d762f863408
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/source/Target/Process.cpp
    M lldb/source/Target/Target.cpp

  Log Message:
  -----------
  [lldb] Fix bug to update process public run lock with process state

This patch should address an issue that caused the process public run
lock to not be updated during a process launch/attach when the process
stops.

That caused the public run lock to report its state as running while the
process state is stopped. This prevents the users to interact with the
process (through the command line or via the SBAPI) since it's
considered still running.

To address that, this patch refactors the name of the internal hijack
listeners to a specific pattern `lldb.internal.<action>.hijack` that
are used to ensure that we've attached to or launched a process successfully.

Then, when updating the process public state, after updating the state
value, if the process is not hijacked externally, meaning if the process
doens't have a hijack listener that matches the internal hijack
listeners pattern, we can update the public run lock accordingly.

rdar://108283017

Differential Revision: https://reviews.llvm.org/D148400

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>




More information about the All-commits mailing list