Index: sys/amd64/amd64/machdep.c =================================================================== --- sys/amd64/amd64/machdep.c +++ sys/amd64/amd64/machdep.c @@ -520,7 +520,7 @@ * Display the index and function name of any IDT entries that don't use * the default 'rsvd' entry point. */ -DB_SHOW_COMMAND(idt, db_show_idt) +DB_SHOW_COMMAND_FLAGS(idt, db_show_idt, DB_CMD_MEMSAFE) { struct gate_descriptor *ip; int idx; @@ -539,7 +539,7 @@ } /* Show privileged registers. */ -DB_SHOW_COMMAND(sysregs, db_show_sysregs) +DB_SHOW_COMMAND_FLAGS(sysregs, db_show_sysregs, DB_CMD_MEMSAFE) { struct { uint16_t limit; @@ -572,7 +572,7 @@ db_printf("GSBASE\t0x%016lx\n", rdmsr(MSR_GSBASE)); } -DB_SHOW_COMMAND(dbregs, db_show_dbregs) +DB_SHOW_COMMAND_FLAGS(dbregs, db_show_dbregs, DB_CMD_MEMSAFE) { db_printf("dr0\t0x%016lx\n", rdr0()); @@ -580,7 +580,7 @@ db_printf("dr2\t0x%016lx\n", rdr2()); db_printf("dr3\t0x%016lx\n", rdr3()); db_printf("dr6\t0x%016lx\n", rdr6()); - db_printf("dr7\t0x%016lx\n", rdr7()); + db_printf("dr7\t0x%016lx\n", rdr7()); } #endif Index: sys/ddb/db_command.c =================================================================== --- sys/ddb/db_command.c +++ sys/ddb/db_command.c @@ -511,7 +511,7 @@ * At least one non-optional command must be implemented using * DB_COMMAND() so that db_cmd_set gets created. Here is one. */ -DB_COMMAND(panic, db_panic) +DB_COMMAND_FLAGS(panic, db_panic, DB_CMD_MEMSAFE) { db_disable_pager(); panic("from debugger"); Index: sys/ddb/db_watch.c =================================================================== --- sys/ddb/db_watch.c +++ sys/ddb/db_watch.c @@ -216,7 +216,7 @@ * At least one non-optional show-command must be implemented using * DB_SHOW_COMMAND() so that db_show_cmd_set gets created. Here is one. */ -DB_SHOW_COMMAND(watches, db_listwatch_cmd) +DB_SHOW_COMMAND_FLAGS(watches, db_listwatch_cmd, DB_CMD_MEMSAFE) { db_list_watchpoints(); db_md_list_watchpoints(); Index: sys/dev/pci/pci.c =================================================================== --- sys/dev/pci/pci.c +++ sys/dev/pci/pci.c @@ -5376,7 +5376,7 @@ * List resources based on pci map registers, used for within ddb */ -DB_SHOW_COMMAND(pciregs, db_pci_dump) +DB_SHOW_COMMAND_FLAGS(pciregs, db_pci_dump, DB_CMD_MEMSAFE) { struct pci_devinfo *dinfo; struct devlist *devlist_head; @@ -6787,7 +6787,7 @@ } #ifdef DDB -DB_SHOW_COMMAND(pcierr, pci_print_faulted_dev_db) +DB_SHOW_COMMAND_FLAGS(pcierr, pci_print_faulted_dev_db, DB_CMD_MEMSAFE) { pci_print_faulted_dev(); @@ -6816,7 +6816,7 @@ pci_write_config(dev, aer + PCIR_AER_COR_STATUS, r, 4); } -DB_COMMAND(pci_clearerr, db_pci_clearerr) +DB_COMMAND_FLAGS(pci_clearerr, db_pci_clearerr, DB_CMD_MEMSAFE) { struct pci_devinfo *dinfo; device_t dev; Index: sys/i386/i386/machdep.c =================================================================== --- sys/i386/i386/machdep.c +++ sys/i386/i386/machdep.c @@ -643,7 +643,7 @@ * Display the index and function name of any IDT entries that don't use * the default 'rsvd' entry point. */ -DB_SHOW_COMMAND(idt, db_show_idt) +DB_SHOW_COMMAND_FLAGS(idt, db_show_idt, DB_CMD_MEMSAFE) { struct gate_descriptor *ip; int idx; @@ -676,7 +676,7 @@ } /* Show privileged registers. */ -DB_SHOW_COMMAND(sysregs, db_show_sysregs) +DB_SHOW_COMMAND_FLAGS(sysregs, db_show_sysregs, DB_CMD_MEMSAFE) { uint64_t idtr, gdtr; @@ -707,7 +707,7 @@ db_printf("PAT\t0x%016llx\n", rdmsr(MSR_PAT)); } -DB_SHOW_COMMAND(dbregs, db_show_dbregs) +DB_SHOW_COMMAND_FLAGS(dbregs, db_show_dbregs, DB_CMD_MEMSAFE) { db_printf("dr0\t0x%08x\n", rdr0()); @@ -715,7 +715,7 @@ db_printf("dr2\t0x%08x\n", rdr2()); db_printf("dr3\t0x%08x\n", rdr3()); db_printf("dr6\t0x%08x\n", rdr6()); - db_printf("dr7\t0x%08x\n", rdr7()); + db_printf("dr7\t0x%08x\n", rdr7()); } DB_SHOW_COMMAND(frame, db_show_frame) Index: sys/kern/init_main.c =================================================================== --- sys/kern/init_main.c +++ sys/kern/init_main.c @@ -893,7 +893,7 @@ #undef xprint } -DB_SHOW_COMMAND(sysinit, db_show_sysinit) +DB_SHOW_COMMAND_FLAGS(sysinit, db_show_sysinit, DB_CMD_MEMSAFE) { struct sysinit **sipp; Index: sys/kern/kern_cpuset.c =================================================================== --- sys/kern/kern_cpuset.c +++ sys/kern/kern_cpuset.c @@ -2485,7 +2485,7 @@ ddb_display_bitset((const struct bitset *)set, DOMAINSET_SETSIZE); } -DB_SHOW_COMMAND(cpusets, db_show_cpusets) +DB_SHOW_COMMAND_FLAGS(cpusets, db_show_cpusets, DB_CMD_MEMSAFE) { struct cpuset *set; @@ -2505,7 +2505,7 @@ } } -DB_SHOW_COMMAND(domainsets, db_show_domainsets) +DB_SHOW_COMMAND_FLAGS(domainsets, db_show_domainsets, DB_CMD_MEMSAFE) { struct domainset *set; Index: sys/kern/kern_descrip.c =================================================================== --- sys/kern/kern_descrip.c +++ sys/kern/kern_descrip.c @@ -4971,7 +4971,7 @@ db_print_file(fp, 1); } -DB_SHOW_COMMAND(files, db_show_files) +DB_SHOW_COMMAND_FLAGS(files, db_show_files, DB_CMD_MEMSAFE) { struct filedesc *fdp; struct file *fp; Index: sys/kern/kern_intr.c =================================================================== --- sys/kern/kern_intr.c +++ sys/kern/kern_intr.c @@ -1611,7 +1611,7 @@ /* * Dump data about interrupt handlers */ -DB_SHOW_COMMAND(intr, db_show_intr) +DB_SHOW_COMMAND_FLAGS(intr, db_show_intr, DB_CMD_MEMSAFE) { struct intr_event *ie; int all, verbose; @@ -1695,7 +1695,7 @@ /* * DDB command to dump the interrupt statistics. */ -DB_SHOW_COMMAND(intrcnt, db_show_intrcnt) +DB_SHOW_COMMAND_FLAGS(intrcnt, db_show_intrcnt, DB_CMD_MEMSAFE) { u_long *i; char *cp; Index: sys/kern/kern_ktr.c =================================================================== --- sys/kern/kern_ktr.c +++ sys/kern/kern_ktr.c @@ -417,7 +417,7 @@ static int db_ktr_verbose; static int db_mach_vtrace(void); -DB_SHOW_COMMAND(ktr, db_ktr_all) +DB_SHOW_COMMAND_FLAGS(ktr, db_ktr_all, DB_CMD_MEMSAFE) { tstate.cur = (ktr_idx - 1) % ktr_entries; Index: sys/kern/kern_linker.c =================================================================== --- sys/kern/kern_linker.c +++ sys/kern/kern_linker.c @@ -1387,7 +1387,7 @@ } #ifdef DDB -DB_COMMAND(kldstat, db_kldstat) +DB_COMMAND_FLAGS(kldstat, db_kldstat, DB_CMD_MEMSAFE) { linker_file_t lf; Index: sys/kern/kern_malloc.c =================================================================== --- sys/kern/kern_malloc.c +++ sys/kern/kern_malloc.c @@ -1482,7 +1482,7 @@ return (alloced - freed); } -DB_SHOW_COMMAND(malloc, db_show_malloc) +DB_SHOW_COMMAND_FLAGS(malloc, db_show_malloc, DB_CMD_MEMSAFE) { const char *fmt_hdr, *fmt_entry; struct malloc_type *mtp; Index: sys/kern/kern_proc.c =================================================================== --- sys/kern/kern_proc.c +++ sys/kern/kern_proc.c @@ -997,7 +997,7 @@ p->p_pptr == NULL ? 0 : isjobproc(p->p_pptr, pgrp)); } -DB_SHOW_COMMAND(pgrpdump, pgrpdump) +DB_SHOW_COMMAND_FLAGS(pgrpdump, pgrpdump, DB_CMD_MEMSAFE) { struct pgrp *pgrp; struct proc *p; Index: sys/kern/kern_shutdown.c =================================================================== --- sys/kern/kern_shutdown.c +++ sys/kern/kern_shutdown.c @@ -1827,7 +1827,7 @@ } #ifdef DDB -DB_SHOW_COMMAND(panic, db_show_panic) +DB_SHOW_COMMAND_FLAGS(panic, db_show_panic, DB_CMD_MEMSAFE) { if (panicstr == NULL) Index: sys/kern/kern_timeout.c =================================================================== --- sys/kern/kern_timeout.c +++ sys/kern/kern_timeout.c @@ -1542,7 +1542,7 @@ db_printf("\ncpu %d last%s callout argument: %p\n", cpu, dirstr, arg); } -DB_SHOW_COMMAND(callout_last, db_show_callout_last) +DB_SHOW_COMMAND_FLAGS(callout_last, db_show_callout_last, DB_CMD_MEMSAFE) { int cpu, last; Index: sys/kern/subr_autoconf.c =================================================================== --- sys/kern/subr_autoconf.c +++ sys/kern/subr_autoconf.c @@ -298,7 +298,7 @@ #ifdef DDB #include -DB_SHOW_COMMAND(conifhk, db_show_conifhk) +DB_SHOW_COMMAND_FLAGS(conifhk, db_show_conifhk, DB_CMD_MEMSAFE) { struct intr_config_hook *hook_entry; char namebuf[64]; Index: sys/kern/subr_devmap.c =================================================================== --- sys/kern/subr_devmap.c +++ sys/kern/subr_devmap.c @@ -344,7 +344,7 @@ #ifdef DDB #include -DB_SHOW_COMMAND(devmap, db_show_devmap) +DB_SHOW_COMMAND_FLAGS(devmap, db_show_devmap, DB_CMD_MEMSAFE) { devmap_dump_table(db_printf); } Index: sys/kern/subr_intr.c =================================================================== --- sys/kern/subr_intr.c +++ sys/kern/subr_intr.c @@ -1546,7 +1546,7 @@ #endif #ifdef DDB -DB_SHOW_COMMAND(irqs, db_show_irqs) +DB_SHOW_COMMAND_FLAGS(irqs, db_show_irqs, DB_CMD_MEMSAFE) { u_int i, irqsum; u_long num; Index: sys/kern/subr_pcpu.c =================================================================== --- sys/kern/subr_pcpu.c +++ sys/kern/subr_pcpu.c @@ -338,7 +338,7 @@ } #ifdef DDB -DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +DB_SHOW_COMMAND_FLAGS(dpcpu_off, db_show_dpcpu_off, DB_CMD_MEMSAFE) { int id; @@ -390,7 +390,7 @@ #endif } -DB_SHOW_COMMAND(pcpu, db_show_pcpu) +DB_SHOW_COMMAND_FLAGS(pcpu, db_show_pcpu, DB_CMD_MEMSAFE) { struct pcpu *pc; int id; @@ -421,5 +421,5 @@ } } } -DB_SHOW_ALIAS(allpcpu, db_show_cpu_all); +DB_SHOW_ALIAS_FLAGS(allpcpu, db_show_cpu_all, DB_CMD_MEMSAFE); #endif Index: sys/kern/subr_physmem.c =================================================================== --- sys/kern/subr_physmem.c +++ sys/kern/subr_physmem.c @@ -515,7 +515,7 @@ #ifdef DDB #include -DB_SHOW_COMMAND(physmem, db_show_physmem) +DB_SHOW_COMMAND_FLAGS(physmem, db_show_physmem, DB_CMD_MEMSAFE) { physmem_dump_tables(db_printf); Index: sys/kern/subr_prf.c =================================================================== --- sys/kern/subr_prf.c +++ sys/kern/subr_prf.c @@ -1127,7 +1127,7 @@ #ifdef DDB -DB_SHOW_COMMAND(msgbuf, db_show_msgbuf) +DB_SHOW_COMMAND_FLAGS(msgbuf, db_show_msgbuf, DB_CMD_MEMSAFE) { int i, j; Index: sys/kern/subr_rman.c =================================================================== --- sys/kern/subr_rman.c +++ sys/kern/subr_rman.c @@ -1116,7 +1116,7 @@ } } -DB_SHOW_COMMAND(rmans, db_show_rmans) +DB_SHOW_COMMAND_FLAGS(rmans, db_show_rmans, DB_CMD_MEMSAFE) { struct rman *rm; @@ -1134,5 +1134,5 @@ dump_rman(rm); } } -DB_SHOW_ALIAS(allrman, db_show_all_rman); +DB_SHOW_ALIAS_FLAGS(allrman, db_show_all_rman, DB_CMD_MEMSAFE); #endif Index: sys/kern/subr_turnstile.c =================================================================== --- sys/kern/subr_turnstile.c +++ sys/kern/subr_turnstile.c @@ -1263,7 +1263,7 @@ } } } -DB_SHOW_ALIAS(allchains, db_show_allchains) +DB_SHOW_ALIAS_FLAGS(allchains, db_show_allchains, DB_CMD_MEMSAFE) static void print_waiters(struct turnstile *ts, int indent); Index: sys/kern/subr_witness.c =================================================================== --- sys/kern/subr_witness.c +++ sys/kern/subr_witness.c @@ -2604,9 +2604,9 @@ } } } -DB_SHOW_ALIAS(alllocks, db_witness_list_all) +DB_SHOW_ALIAS_FLAGS(alllocks, db_witness_list_all, DB_CMD_MEMSAFE) -DB_SHOW_COMMAND(witness, db_witness_display) +DB_SHOW_COMMAND_FLAGS(witness, db_witness_display, DB_CMD_MEMSAFE) { witness_ddb_display(db_printf); @@ -2782,7 +2782,7 @@ return (db_printf("%.*s", len, data)); } -DB_SHOW_COMMAND(badstacks, db_witness_badstacks) +DB_SHOW_COMMAND_FLAGS(badstacks, db_witness_badstacks, DB_CMD_MEMSAFE) { struct sbuf sb; char buffer[128]; Index: sys/kern/vfs_bio.c =================================================================== --- sys/kern/vfs_bio.c +++ sys/kern/vfs_bio.c @@ -5484,7 +5484,7 @@ db_printf(" "); } -DB_SHOW_COMMAND(bufqueues, bufqueues) +DB_SHOW_COMMAND_FLAGS(bufqueues, bufqueues, DB_CMD_MEMSAFE) { struct bufdomain *bd; struct buf *bp; @@ -5550,7 +5550,7 @@ } } -DB_SHOW_COMMAND(lockedbufs, lockedbufs) +DB_SHOW_COMMAND_FLAGS(lockedbufs, lockedbufs, DB_CMD_MEMSAFE) { struct buf *bp; int i; @@ -5588,7 +5588,7 @@ } } -DB_COMMAND(countfreebufs, db_coundfreebufs) +DB_COMMAND_FLAGS(countfreebufs, db_coundfreebufs, DB_CMD_MEMSAFE) { struct buf *bp; int i, used = 0, nfree = 0; Index: sys/kern/vfs_subr.c =================================================================== --- sys/kern/vfs_subr.c +++ sys/kern/vfs_subr.c @@ -4271,7 +4271,7 @@ * List all of the locked vnodes in the system. * Called when debugging the kernel. */ -DB_SHOW_COMMAND(lockedvnods, lockedvnodes) +DB_SHOW_COMMAND_FLAGS(lockedvnods, lockedvnodes, DB_CMD_MEMSAFE) { struct mount *mp; struct vnode *vp; Index: sys/net/vnet.c =================================================================== --- sys/net/vnet.c +++ sys/net/vnet.c @@ -769,7 +769,7 @@ #undef xprint } -DB_SHOW_COMMAND(vnet_sysinit, db_show_vnet_sysinit) +DB_SHOW_COMMAND_FLAGS(vnet_sysinit, db_show_vnet_sysinit, DB_CMD_MEMSAFE) { struct vnet_sysinit *vs; @@ -783,7 +783,7 @@ } } -DB_SHOW_COMMAND(vnet_sysuninit, db_show_vnet_sysuninit) +DB_SHOW_COMMAND_FLAGS(vnet_sysuninit, db_show_vnet_sysuninit, DB_CMD_MEMSAFE) { struct vnet_sysinit *vs; @@ -799,7 +799,7 @@ } #ifdef VNET_DEBUG -DB_SHOW_COMMAND(vnetrcrs, db_show_vnetrcrs) +DB_SHOW_COMMAND_FLAGS(vnetrcrs, db_show_vnetrcrs, DB_CMD_MEMSAFE) { struct vnet_recursion *vnr; Index: sys/opencrypto/crypto.c =================================================================== --- sys/opencrypto/crypto.c +++ sys/opencrypto/crypto.c @@ -1939,7 +1939,7 @@ } } -DB_SHOW_COMMAND(crypto, db_show_crypto) +DB_SHOW_COMMAND_FLAGS(crypto, db_show_crypto, DB_CMD_MEMSAFE) { struct cryptop *crp; struct crypto_ret_worker *ret_worker; Index: sys/vm/uma_core.c =================================================================== --- sys/vm/uma_core.c +++ sys/vm/uma_core.c @@ -5813,7 +5813,7 @@ return (((int64_t)*used + *cachefree) * kz->uk_size); } -DB_SHOW_COMMAND(uma, db_show_uma) +DB_SHOW_COMMAND_FLAGS(uma, db_show_uma, DB_CMD_MEMSAFE) { const char *fmt_hdr, *fmt_entry; uma_keg_t kz; @@ -5886,7 +5886,7 @@ } } -DB_SHOW_COMMAND(umacache, db_show_umacache) +DB_SHOW_COMMAND_FLAGS(umacache, db_show_umacache, DB_CMD_MEMSAFE) { uma_zone_t z; uint64_t allocs, frees; Index: sys/vm/vm_object.c =================================================================== --- sys/vm/vm_object.c +++ sys/vm/vm_object.c @@ -2748,7 +2748,7 @@ return 0; } -DB_SHOW_COMMAND(vmochk, vm_object_check) +DB_SHOW_COMMAND_FLAGS(vmochk, vm_object_check, DB_CMD_MEMSAFE) { vm_object_t object; @@ -2846,7 +2846,7 @@ vm_object_print_static(addr, have_addr, count, modif); } -DB_SHOW_COMMAND(vmopag, vm_object_print_pages) +DB_SHOW_COMMAND_FLAGS(vmopag, vm_object_print_pages, DB_CMD_MEMSAFE) { vm_object_t object; vm_pindex_t fidx; Index: sys/vm/vm_page.c =================================================================== --- sys/vm/vm_page.c +++ sys/vm/vm_page.c @@ -5535,7 +5535,7 @@ #include -DB_SHOW_COMMAND(page, vm_page_print_page_info) +DB_SHOW_COMMAND_FLAGS(page, vm_page_print_page_info, DB_CMD_MEMSAFE) { db_printf("vm_cnt.v_free_count: %d\n", vm_free_count()); @@ -5549,7 +5549,7 @@ db_printf("vm_cnt.v_inactive_target: %d\n", vm_cnt.v_inactive_target); } -DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info) +DB_SHOW_COMMAND_FLAGS(pageq, vm_page_print_pageq_info, DB_CMD_MEMSAFE) { int dom; Index: sys/vm/vm_phys.c =================================================================== --- sys/vm/vm_phys.c +++ sys/vm/vm_phys.c @@ -1860,7 +1860,7 @@ /* * Show the number of physical pages in each of the free lists. */ -DB_SHOW_COMMAND(freepages, db_show_freepages) +DB_SHOW_COMMAND_FLAGS(freepages, db_show_freepages, DB_CMD_MEMSAFE) { struct vm_freelist *fl; int flind, oind, pind, dom; Index: sys/x86/x86/local_apic.c =================================================================== --- sys/x86/x86/local_apic.c +++ sys/x86/x86/local_apic.c @@ -1701,7 +1701,7 @@ /* * Dump data about APIC IDT vector mappings. */ -DB_SHOW_COMMAND(apic, db_show_apic) +DB_SHOW_COMMAND_FLAGS(apic, db_show_apic, DB_CMD_MEMSAFE) { struct intsrc *isrc; int i, verbose; @@ -1765,7 +1765,7 @@ } /* Show info from the lapic regs for this CPU. */ -DB_SHOW_COMMAND(lapic, db_show_lapic) +DB_SHOW_COMMAND_FLAGS(lapic, db_show_lapic, DB_CMD_MEMSAFE) { uint32_t v;