[all-commits] [llvm/llvm-project] 2e7aa2: Replace the singleton "ShadowListener" with a prim...

jimingham via All-commits all-commits at lists.llvm.org
Wed Aug 16 10:36:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e7aa2ee34eb53347396731dc8a3b2dbc6a3df45
      https://github.com/llvm/llvm-project/commit/2e7aa2ee34eb53347396731dc8a3b2dbc6a3df45
  Author: Jim Ingham <jingham at apple.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/Utility/Broadcaster.h
    M lldb/include/lldb/Utility/Event.h
    M lldb/source/Target/Process.cpp
    M lldb/source/Utility/Broadcaster.cpp
    M lldb/source/Utility/Event.cpp
    M lldb/source/Utility/Listener.cpp
    M lldb/test/API/api/listeners/TestListener.py
    M lldb/test/API/functionalities/interactive_scripted_process/TestInteractiveScriptedProcess.py
    M lldb/test/API/python_api/event/TestEvents.py

  Log Message:
  -----------
  Replace the singleton "ShadowListener" with a primary and N secondary Listeners

Before the addition of the process "Shadow Listener" you could only have one
Listener observing the Process Broadcaster.  That was necessary because fetching the
Process event is what switches the public process state, and for the execution
control logic to be manageable you needed to keep other listeners from causing
this to happen before the main process control engine was ready.

Ismail added the notion of a "ShadowListener" - which allowed you ONE
extra process listener.  This patch inverts that setup by designating the
first listener as primary - and giving it priority in fetching events.

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




More information about the All-commits mailing list