llvm-project/lldb
Pavel Labath a40929dcd2 [lldb] Fix cross-platform kills
This patch fixes an amusing bug where a Platform::Kill operation would
happily terminate a proces on a completely different platform, as long
as they have the same process ID. This was due to the fact that the
implementation was iterating through all known (debugged) processes in
order terminate them directly.

This patch just deletes that logic, and makes everything go through the
OS process termination APIs. While it would be possible to fix the logic
to check for a platform match, it seemed to me that the implementation
was being too smart for its own good -- accessing random Process
objects without knowing anything about their state is risky at best.
Going through the os ensures we avoid any races.

I also "upgrade" the termination signal to a SIGKILL to ensure the
process really dies after this operation.

Differential Revision: https://reviews.llvm.org/D113184
2021-11-09 15:31:07 +01:00
..
bindings [lldb] Make SBType::IsTypeComplete more consistent by forcing the loading of definitions 2021-10-30 13:28:27 +02:00
cmake Revert "Use `GNUInstallDirs` to support custom installation dirs. -- LLVM" 2021-11-02 19:11:44 +01:00
docs [NFC] Inclusive Language: change master to main for .chm files 2021-11-08 08:23:04 -06:00
examples [formatters] Add a libstdcpp formatter for multiset and unify tests across stdlibs 2021-10-30 15:07:23 -07:00
include/lldb [lldb] Use is_style_posix() for path style checks 2021-11-05 21:50:45 +02:00
packages/Python [lldb] Fix cross-platform kills 2021-11-09 15:31:07 +01:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [lldb] Fix cross-platform kills 2021-11-09 15:31:07 +01:00
test [lldb] Fix cross-platform kills 2021-11-09 15:31:07 +01:00
third_party/Python/module [LLDB] Change pexpect timeout to 30 to 60 2021-08-02 06:34:11 +05:00
tools [debugserver] Put building for arm64e behind a CMake flag 2021-11-08 21:01:43 -08:00
unittests [lldb] Remove nested switches from ARMGetSupportedArchitectureAtIndex (NFC) 2021-11-05 21:12:00 -07:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [lldb/lua] Supplement Lua bindings for lldb module 2021-10-12 22:10:21 +08:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py