diff options
| author | David Spickett <david.spickett@linaro.org> | 2023-03-16 11:32:35 +0000 |
|---|---|---|
| committer | David Spickett <david.spickett@linaro.org> | 2023-03-21 11:45:13 +0000 |
| commit | c8af0d3cea8cab9277651f8cabe54e2f1a3b167f (patch) | |
| tree | 807f28bac320f0ecdd2ecb0c00ee008e101285d2 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h | |
| parent | af99aa0ff77da893457605113062220957dc7499 (diff) | |
[lldb] Add compile time checks for signal codes when on the matching platform
This adds a new macro to the UnixSignals subclasses, ADD_SIGCODE.
ADD_SIGCODE(4, ILL_ILLOPC, 1, "illegal opcode");
Adds a sigcode to signal 4. That code is ILL_ILLOPC and we expect
its value to be 1. When compiling on a system that matches the class
e.g. FreeBSD for FreeBSDSignals, the macro will check that that is true.
When you're not on FreeBSD we just use the number 1, and ILL_ILLOPC
won't be defined to anything because we don't include csignal.
Example error:
LinuxSignals.cpp:52:3: error: static_assert failed due to requirement
'ILL_COPROC == 9' "Value mismatch for signal code ILL_COPROC"
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D146222
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h')
0 files changed, 0 insertions, 0 deletions
