Deleted Added
full compact
db_ps.c (283088) db_ps.c (283248)
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: head/sys/ddb/db_ps.c 283088 2015-05-18 22:27:46Z pfg $");
31__FBSDID("$FreeBSD: head/sys/ddb/db_ps.c 283248 2015-05-21 15:16:18Z 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>

--- 30 unchanged lines hidden (view full) ---

70 * <pid> <ppi> <pgi> <uid> <stat> < wmesg > < wchan > <name>
71 * <pid> <ppi> <pgi> <uid> <stat> (threaded) <command>
72 * <tid > <stat> < wmesg > < wchan > <name>
73 *
74 * For machines with 64-bit pointers, we expand the wchan field 8 more
75 * characters.
76 */
77void
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>

--- 30 unchanged lines hidden (view full) ---

70 * <pid> <ppi> <pgi> <uid> <stat> < wmesg > < wchan > <name>
71 * <pid> <ppi> <pgi> <uid> <stat> (threaded) <command>
72 * <tid > <stat> < wmesg > < wchan > <name>
73 *
74 * For machines with 64-bit pointers, we expand the wchan field 8 more
75 * characters.
76 */
77void
78db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
78db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif)
79{
80 volatile struct proc *p, *pp;
81 volatile struct thread *td;
82 struct ucred *cred;
83 struct pgrp *pgrp;
84 char state[9];
85 int np, rflag, sflag, dflag, lflag, wflag;
86

--- 207 unchanged lines hidden (view full) ---

294 db_printf("]");
295 db_printf("\n");
296}
297
298DB_SHOW_COMMAND(thread, db_show_thread)
299{
300 struct thread *td;
301 struct lock_object *lock;
79{
80 volatile struct proc *p, *pp;
81 volatile struct thread *td;
82 struct ucred *cred;
83 struct pgrp *pgrp;
84 char state[9];
85 int np, rflag, sflag, dflag, lflag, wflag;
86

--- 207 unchanged lines hidden (view full) ---

294 db_printf("]");
295 db_printf("\n");
296}
297
298DB_SHOW_COMMAND(thread, db_show_thread)
299{
300 struct thread *td;
301 struct lock_object *lock;
302 boolean_t comma;
302 bool comma;
303
304 /* Determine which thread to examine. */
305 if (have_addr)
306 td = db_lookup_thread(addr, false);
307 else
308 td = kdb_thread;
309 lock = (struct lock_object *)td->td_lock;
310

--- 116 unchanged lines hidden (view full) ---

427 FOREACH_THREAD_IN_PROC(p, td) {
428 dumpthread(p, td, 1);
429 if (db_pager_quit)
430 break;
431 }
432}
433
434void
303
304 /* Determine which thread to examine. */
305 if (have_addr)
306 td = db_lookup_thread(addr, false);
307 else
308 td = kdb_thread;
309 lock = (struct lock_object *)td->td_lock;
310

--- 116 unchanged lines hidden (view full) ---

427 FOREACH_THREAD_IN_PROC(p, td) {
428 dumpthread(p, td, 1);
429 if (db_pager_quit)
430 break;
431 }
432}
433
434void
435db_findstack_cmd(db_expr_t addr, boolean_t have_addr,
436 db_expr_t dummy3 __unused, char *dummy4 __unused)
435db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused,
436 char *dummy4 __unused)
437{
438 struct proc *p;
439 struct thread *td;
440 struct kstack_cache_entry *ks_ce;
441 vm_offset_t saddr;
442
443 if (have_addr)
444 saddr = addr;

--- 24 unchanged lines hidden ---
437{
438 struct proc *p;
439 struct thread *td;
440 struct kstack_cache_entry *ks_ce;
441 vm_offset_t saddr;
442
443 if (have_addr)
444 saddr = addr;

--- 24 unchanged lines hidden ---