hanchenye-llvm-project/lldb
Pavel Labath 21a365ba59 NativeProcessLinux: Fix handling of raise(SIGTRAP)
In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code
value is one of the codes we know about. However, that list was very
incomplete -- for example, we were not handling SI_TKILL/SI_USER,
generated by raise(SIGTRAP). A cursory examination show there are at
least a dozen codes like these that an app can generate, and more can be
added at any point.

So, instead of trying to play catchup, I change the default behavior to
treat an unknown si_code like an ordinary signal. The only reason we
needed to inspect si_code in the first place is because
watchpoint/breakpoints are notified as SIGTRAP, but we already know
about those, and us starting to use a new debug event is far less likely
than somebody introducing a new non-debug event.

I add a test case to TestRaise to verify we are handling raise(SIGTRAP)
in an application properly.

llvm-svn: 307644
2017-07-11 10:38:40 +00:00
..
cmake cmake: Put PROCESS_VM_READV detection results into Config.h 2017-06-02 12:29:08 +00:00
docs Implementation of remote packets for Trace data. 2017-05-26 11:46:27 +00:00
examples Add an example command to toggle between disassembly-only and source mode. 2017-04-20 21:51:27 +00:00
include/lldb Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
lit Change remaining references to lit.util.capture to use subprocess.check_output. 2017-07-06 21:46:47 +00:00
lldb.xcodeproj Fix Xcode project file for gtest schemes. 2017-07-06 23:25:35 +00:00
lldb.xcworkspace
packages/Python/lldbsuite NativeProcessLinux: Fix handling of raise(SIGTRAP) 2017-07-11 10:38:40 +00:00
resources
scripts Make scripts/analyze-project-deps.py executable 2017-06-29 13:02:15 +00:00
source NativeProcessLinux: Fix handling of raise(SIGTRAP) 2017-07-11 10:38:40 +00:00
test [CMake] Override debugserver to use the build tree on Darwin 2017-03-14 20:04:46 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
unittests The x86 instruction unwinder can be asked to disassemble non-instruction 2017-07-08 00:12:15 +00:00
utils *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
www Update lldb architecture docs 2017-07-04 12:29:34 +00:00
.arcconfig
.clang-format
.gitignore test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
CMakeLists.txt [CMake] Abstract Config.h generation for Xcode 2017-04-27 16:04:26 +00:00
CODE_OWNERS.txt Greg Clayton is no longer working at Apple, he will continue to 2017-03-01 00:00:45 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00