2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
16 * Carnegie Mellon requests users of this software to return to
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
23 * any improvements or extensions that they make and grant Carnegie the
24 * rights to redistribute these changes.
27 #include <sys/cdefs.h>
28 __FBSDID("$FreeBSD$");
31 * Interface to new debugger.
34 #include <sys/param.h>
35 #include <sys/systm.h>
42 * Read bytes from kernel address space for debugger.
45 db_read_bytes(vm_offset_t addr, size_t size, char *data)
52 prev_jb = kdb_jmpbuf(jb);
59 (void)kdb_jmpbuf(prev_jb);
64 * Write bytes to kernel address space for debugger.
67 db_write_bytes(vm_offset_t addr, size_t size, char *data)
74 prev_jb = kdb_jmpbuf(jb);
81 (void)kdb_jmpbuf(prev_jb);
86 db_show_mdpcpu(struct pcpu *pc)
89 db_printf("curpmap = %p\n", pc->pc_curpmap);
90 db_printf("tssp = %p\n", pc->pc_tssp);
91 db_printf("commontssp = %p\n", pc->pc_commontssp);
92 db_printf("rsp0 = 0x%lx\n", pc->pc_rsp0);
93 db_printf("gs32p = %p\n", pc->pc_gs32p);
94 db_printf("ldt = %p\n", pc->pc_ldt);
95 db_printf("tss = %p\n", pc->pc_tss);