db_ps.c (256281) | db_ps.c (273265) |
---|---|
1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: stable/10/sys/ddb/db_ps.c 228687 2011-12-18 15:36:21Z pluknet $"); | 31__FBSDID("$FreeBSD: stable/10/sys/ddb/db_ps.c 273265 2014-10-18 19:22:59Z pfg $"); |
32 33#include <sys/param.h> 34#include <sys/cons.h> 35#include <sys/jail.h> 36#include <sys/kdb.h> 37#include <sys/proc.h> 38#include <sys/sysent.h> 39#include <sys/systm.h> --- 110 unchanged lines hidden (view full) --- 150 state[0] = 'L'; 151 else if (dflag) 152 state[0] = 'D'; 153 else if (sflag) 154 state[0] = 'S'; 155 else if (wflag) 156 state[0] = 'W'; 157 else | 32 33#include <sys/param.h> 34#include <sys/cons.h> 35#include <sys/jail.h> 36#include <sys/kdb.h> 37#include <sys/proc.h> 38#include <sys/sysent.h> 39#include <sys/systm.h> --- 110 unchanged lines hidden (view full) --- 150 state[0] = 'L'; 151 else if (dflag) 152 state[0] = 'D'; 153 else if (sflag) 154 state[0] = 'S'; 155 else if (wflag) 156 state[0] = 'W'; 157 else |
158 state[0] = '?'; | 158 state[0] = '?'; |
159 } 160 break; 161 case PRS_NEW: 162 state[0] = 'N'; 163 break; 164 case PRS_ZOMBIE: 165 state[0] = 'Z'; 166 break; --- 39 unchanged lines hidden (view full) --- 206 dumpthread(p, td, p->p_flag & P_HADTHREADS); 207 if (db_pager_quit) 208 break; 209 } 210 211 p = LIST_NEXT(p, p_list); 212 if (p == NULL && np > 0) 213 p = LIST_FIRST(&zombproc); | 159 } 160 break; 161 case PRS_NEW: 162 state[0] = 'N'; 163 break; 164 case PRS_ZOMBIE: 165 state[0] = 'Z'; 166 break; --- 39 unchanged lines hidden (view full) --- 206 dumpthread(p, td, p->p_flag & P_HADTHREADS); 207 if (db_pager_quit) 208 break; 209 } 210 211 p = LIST_NEXT(p, p_list); 212 if (p == NULL && np > 0) 213 p = LIST_FIRST(&zombproc); |
214 } | 214 } |
215} 216 217static void 218dumpthread(volatile struct proc *p, volatile struct thread *td, int all) 219{ 220 char state[9], wprefix; 221 const char *wmesg; 222 void *wchan; --- 246 unchanged lines hidden --- | 215} 216 217static void 218dumpthread(volatile struct proc *p, volatile struct thread *td, int all) 219{ 220 char state[9], wprefix; 221 const char *wmesg; 222 void *wchan; --- 246 unchanged lines hidden --- |