diff options
| author | Ed Maste <emaste@freebsd.org> | 2017-05-26 03:15:46 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2017-05-26 03:15:46 +0000 |
| commit | d6fa2c3b4dd3169d0041e748d584d747138eeab4 (patch) | |
| tree | 0013f5a918aca42bf88524f6feb2df747c6aaed4 | |
| parent | 8fa1e3734267a71b8bca39e6d3fa42516a1da924 (diff) | |
| download | bcm5719-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.cpp | 4 |
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", |

