llvm-project/lldb/source
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
..
API [lldb][NFC] avoid unnecessary roundtrips between different string types 2021-11-01 22:15:01 -07:00
Breakpoint Add breakpoint resolving stats to each target. 2021-10-27 16:50:11 -07:00
Commands [lldb][NFC] avoid unnecessary roundtrips between different string types 2021-11-01 22:15:01 -07:00
Core [lldb] Remove ConstString from plugin names in PluginManager innards 2021-11-03 13:14:21 +01:00
DataFormatters [lldb/Formatters] Remove space from vector type string summaries (NFCI) 2021-10-22 21:18:54 +02:00
Expression [lldb, mlir] Migrate from getNumArgOperands and arg_operands (NFC) 2021-10-07 08:29:42 -07:00
Host [lldb] [Host/Terminal] Fix warnings with termios disabled 2021-10-29 09:58:09 +02:00
Initialization [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Interpreter [lldb][NFC] avoid unnecessary roundtrips between different string types 2021-11-01 22:15:01 -07:00
Plugins [lldb] Fix C2360: initialization of 'identifier' is skipped by 'case' label 2021-11-05 23:09:35 -07:00
Symbol [lldb] Unbreak the macOS build after dfd499a61c 2021-11-02 09:47:44 +01:00
Target [lldb] Fix cross-platform kills 2021-11-09 15:31:07 +01:00
Utility [lldb] Use is_style_posix() for path style checks 2021-11-05 21:50:45 +02:00
CMakeLists.txt [LLVM][CMake][NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project 2021-09-16 18:29:57 +02:00
lldb.cpp [lldb] Reinstate support for LLDB_VERSION_STRING 2021-02-22 16:56:00 -08:00