freebsd-dev/sys/ddb
John Baldwin 47877889f2 ddb ps: Use the pidhash to enumerate processes not in allproc.
Exiting processes that have been removed from allproc but are still
executing are not yet marked PRS_ZOMBIE, so they were not listed (for
example, if a thread panics during exit1()).  To detect these
processes, clear p_list.le_prev to NULL explicitly after removing a
process from the allproc list and check for this sentinel rather than
PRS_ZOMBIE when walking the pidhash.

While here, simplify the pidhash walk to use a single outer loop.

Reviewed by:	kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D27824
2020-12-31 16:00:05 -08: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 SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_break.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_break.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
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 SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_expr.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
db_input.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
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 [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
db_output.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_output.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_print.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_ps.c ddb ps: Use the pidhash to enumerate processes not in allproc. 2020-12-31 16:00:05 -08: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_search_symbol: prevent pollution from bogus symbols 2020-10-26 16:42:53 +00:00
db_sym.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
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 SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_variables.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_watch.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_watch.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_write_cmd.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
ddb.h [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00