summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2017-05-26 03:15:46 +0000
committerEd Maste <emaste@freebsd.org>2017-05-26 03:15:46 +0000
commitd6fa2c3b4dd3169d0041e748d584d747138eeab4 (patch)
tree0013f5a918aca42bf88524f6feb2df747c6aaed4
parent8fa1e3734267a71b8bca39e6d3fa42516a1da924 (diff)
downloadbcm5719-llvm-d6fa2c3b4dd3169d0041e748d584d747138eeab4.tar.gz
bcm5719-llvm-d6fa2c3b4dd3169d0041e748d584d747138eeab4.zip
FreeBSD ProcessMonitor: map TRAP_CAP to a trace trap
In the absense of a more specific handler for TRAP_CAP (generated by ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace trap. Obtained from FreeBSD r318884. We should later add an option to have LLDB control the trapcap procctl (as with ASLR), as well as report a specific stop reason. For now this change eliminates an assertion failure from LLDB. llvm-svn: 303965
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index 1667490f134..34d99cd39de 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -1132,6 +1132,10 @@ ProcessMessage ProcessMonitor::MonitorSIGTRAP(ProcessMonitor *monitor,
case 0:
case TRAP_TRACE:
+#ifdef TRAP_CAP
+ // Map TRAP_CAP to a trace trap in the absense of a more specific handler.
+ case TRAP_CAP:
+#endif
if (log)
log->Printf("ProcessMonitor::%s() received trace event, tid = %" PRIu64
" : si_code = %d",
OpenPOWER on IntegriCloud