[all-commits] [llvm/llvm-project] 27012c: [debugserver] Add option to propagate SIGSEGV to t...

Alessandro Arzilli via All-commits all-commits at lists.llvm.org
Tue Nov 17 09:28:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 27012c0f75c2e4891277d0d14f9f97a9f564d596
      https://github.com/llvm/llvm-project/commit/27012c0f75c2e4891277d0d14f9f97a9f564d596
  Author: Alessandro Arzilli <alessandro.arzilli at gmail.com>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNB.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/MacOSX/MachTask.h
    M lldb/tools/debugserver/source/MacOSX/MachTask.mm
    M lldb/tools/debugserver/source/RNBContext.h
    M lldb/tools/debugserver/source/RNBRemote.cpp
    M lldb/tools/debugserver/source/debugserver.cpp

  Log Message:
  -----------
  [debugserver] Add option to propagate SIGSEGV to target process

Adds a command line option that makes debugserver propagate the SIGSEGV
signal to the target process.

Motivation: I'm one of the maintainers of Delve [1] a debugger for Go.
We use debugserver as our backend on macOS and one of the most often
reported bugs is that, on macOS, we don't propagate SIGSEGV back to the
target process [2]. Sometimes some programs will actually cause a
SIGSEGV, by design, and then handle it. Those programs can not be
debugged at all.

Since catching signals isn't very important for a Go debugger I'd much
rather have a command line option in debugserver that causes it to let
SIGSEGV go directly to the target process.

[1] https://github.com/go-delve/delve/
[2] https://github.com/go-delve/delve/issues/852

Differential revision: https://reviews.llvm.org/D89315




More information about the All-commits mailing list