[all-commits] [llvm/llvm-project] 806875: [lldb] [gdb-remote] Refactor killing process and m...

Michał Górny via All-commits all-commits at lists.llvm.org
Mon Jul 25 09:43:51 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8068751189af3099d9abef8953a9639d6798535c
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

  Log Message:
  [lldb] [gdb-remote] Refactor killing process and move it to client

Refactor the code responsible for sending the "k" packet and move it
into GDBRemoteCommunicationClient::KillProcess() method.  This is part
of refactoring to enable multiprocess support in the client,
and to support using the vKill packet instead.

As part of the refactoring, the following functional changes apply:

- Some redundant logging has been removed, as any failures are returned
  via exit_string anyway.

- SetLastStopPacket() is no longer called.  It is used only to populate
  the thread list, and since the process has just exited and we're
  terminating the process instance, there's really no reason to set it.

- On successful kill, exit_string is set to "killed", to clearly
  indicate that the process has terminated on our request rather than
  on its own.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D130340

More information about the All-commits mailing list