freebsd-dev/sys/ddb
Kyle Evans c79cee7136 kernel: provide panicky version of __unreachable
__builtin_unreachable doesn't raise any compile-time warnings/errors on its
own, so problems with its usage can't be easily detected. While it would be
nice for this situation to change and compilers to at least add a warning
for trivial cases where local state means the instruction can't be reached,
this isn't the case at the moment and likely will not happen.

This commit adds an __assert_unreachable, whose intent is incredibly clear:
it asserts that this instruction is unreachable. On INVARIANTS builds, it's
a panic(), and on non-INVARIANTS it expands to  __unreachable().

Existing users of __unreachable() are converted to __assert_unreachable,
to improve debuggability if this assumption is violated.

Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D23793
2020-05-13 18:07:37 +00:00
..
db_access.c No need to force md code to define a macro that's the same as 2018-04-16 13:52:23 +00:00
db_access.h
db_break.c
db_break.h
db_capture.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_command.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
db_command.h ddb(4): Move an extern variable declaration to a header 2019-09-09 01:33:45 +00:00
db_examine.c
db_expr.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
db_input.c
db_lex.c ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
db_lex.h ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
db_main.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_output.c
db_output.h
db_print.c
db_ps.c sleep(9), sleepqueue(9): const'ify wchan pointers 2019-12-24 16:19:33 +00:00
db_run.c ddb(4): Move an extern variable declaration to a header 2019-09-09 01:33:45 +00:00
db_script.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_sym.c
db_sym.h
db_textdump.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_thread.c proc: eliminate the zombproc list 2019-08-28 16:18:23 +00:00
db_variables.c
db_variables.h
db_watch.c
db_watch.h
db_write_cmd.c
ddb.h Fix PPC symbol resolution 2018-05-10 03:59:48 +00:00