Searched refs:kd (Results 1 - 25 of 83) sorted by relevance

1234

/freebsd-10.1-release/lib/libkvm/
H A Dkvm_mips.c61 _kvm_freevtop(kvm_t *kd) argument
63 if (kd->vmst != 0) {
64 if (kd->vmst->minidump)
65 return (_kvm_minidump_freevtop(kd));
66 if (kd->vmst->mmapbase != NULL)
67 munmap(kd->vmst->mmapbase, kd->vmst->mmapsize);
68 free(kd->vmst);
69 kd->vmst = NULL;
74 _kvm_initvtop(kvm_t *kd) argument
93 _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_pcpu.c74 _kvm_pcpu_init(kvm_t *kd) argument
80 if (kvm_nlist(kd, kvm_pcpu_nl) < 0)
83 _kvm_err(kd, kd->program, "unable to find cpuid_to_pcpu");
87 _kvm_err(kd, kd->program, "unable to find mp_maxcpus");
90 if (kvm_read(kd, kvm_pcpu_nl[NL_MP_MAXCPUS].n_value, &max,
92 _kvm_err(kd, kd->program, "cannot read mp_maxcpus");
96 _kvm_err(kd, k
131 kvm_getpcpu(kvm_t *kd, int cpu) argument
162 kvm_getmaxcpu(kvm_t *kd) argument
177 kvm_getncpus(kvm_t *kd) argument
187 _kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu, int report_error) argument
217 _kvm_dpcpu_init(kvm_t *kd) argument
267 _kvm_dpcpu_initialized(kvm_t *kd, int intialize) argument
283 _kvm_dpcpu_validaddr(kvm_t *kd, uintptr_t value) argument
299 kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) argument
319 kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) argument
330 kvm_counter_u64_fetch(kvm_t *kd, u_long base) argument
[all...]
H A Dkvm_amd64.c87 _kvm_maphdrs(kvm_t *kd, size_t sz) argument
89 struct vmstate *vm = kd->vmst;
98 vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
100 _kvm_err(kd, kd->program, "cannot mmap corefile");
111 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument
113 Elf_Ehdr *e = kd->vmst->mmapbase;
117 if (kd->rawdump) {
133 _kvm_freevtop(kvm_t *kd) argument
135 struct vmstate *vm = kd
148 _kvm_initvtop(kvm_t *kd) argument
210 _kvm_vatop(kvm_t *kd, u_long va, off_t *pa) argument
347 _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_vnet.c59 _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) argument
98 if (_kvm_nlist(kd, nl, 0) != 0) {
107 /* _kvm_err(kd, kd->program, "%s: no namelist", __func__); */
116 if (kvm_read(kd, nl[NLIST_DUMPTID].n_value, &dumptid,
118 _kvm_err(kd, kd->program, "%s: dumptid", __func__);
138 if (kvm_read(kd, procp, &proc, sizeof(proc)) != sizeof(proc)) {
139 _kvm_err(kd, kd
210 _kvm_vnet_initialized(kvm_t *kd, int intialize) argument
226 _kvm_vnet_validaddr(kvm_t *kd, uintptr_t value) argument
[all...]
H A Dkvm.c80 kvm_geterr(kvm_t *kd) argument
82 return (kd->errbuf);
88 * Report an error using printf style arguments. "program" is kd->program
94 _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...) argument
104 (void)vsnprintf(kd->errbuf,
105 sizeof(kd->errbuf), fmt, ap);
111 _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...) argument
122 char *cp = kd->errbuf;
124 (void)vsnprintf(cp, sizeof(kd->errbuf), fmt, ap);
126 (void)snprintf(&cp[n], sizeof(kd
133 _kvm_malloc(kvm_t *kd, size_t n) argument
144 _kvm_open(kvm_t *kd, const char *uf, const char *mf, int flag, char *errout) argument
229 kvm_t *kd; local
243 kvm_t *kd; local
256 kvm_close(kvm_t *kd) argument
286 kvm_fdnlist_prefix(kvm_t *kd, struct nlist *nl, int missing, const char *prefix, uintptr_t (*validate_fn)(kvm_t *, uintptr_t)) argument
386 _kvm_nlist(kvm_t *kd, struct nlist *nl, int initialize) argument
487 kvm_nlist(kvm_t *kd, struct nlist *nl) argument
498 kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) argument
557 kvm_write(kvm_t *kd, u_long kva, const void *buf, size_t len) argument
[all...]
H A Dkvm_file.c68 #define KREAD(kd, addr, obj) \
69 (kvm_read(kd, addr, obj, sizeof(*obj)) != sizeof(*obj))
71 #define KREADN(kd, addr, obj, cnt) \
72 (kvm_read(kd, addr, obj, (cnt)) != (ssize_t)(cnt))
78 kvm_deadfiles(kvm_t *kd, int op __unused, int arg __unused, long allproc_o, argument
83 int buflen = kd->arglen, ocnt = 0, n = 0, once = 0, i;
87 char *where = kd->argspc;
91 if (KREAD(kd, allproc_o, &p)) {
92 _kvm_err(kd, kd
157 kvm_getfiles(kvm_t *kd, int op, int arg, int *cnt) argument
[all...]
H A Dkvm_i386.c93 _kvm_maphdrs(kvm_t *kd, size_t sz) argument
95 struct vmstate *vm = kd->vmst;
104 vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
106 _kvm_err(kd, kd->program, "cannot mmap corefile");
117 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument
119 Elf_Ehdr *e = kd->vmst->mmapbase;
123 if (kd->rawdump) {
139 _kvm_freevtop(kvm_t *kd) argument
141 struct vmstate *vm = kd
154 _kvm_initvtop(kvm_t *kd) argument
247 _kvm_vatop(kvm_t *kd, u_long va, off_t *pa) argument
343 _kvm_vatop_pae(kvm_t *kd, u_long va, off_t *pa) argument
440 _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_arm.c69 _kvm_maphdrs(kvm_t *kd, size_t sz) argument
71 struct vmstate *vm = kd->vmst;
80 vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
82 _kvm_err(kd, kd->program, "cannot mmap corefile");
93 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) argument
95 Elf32_Ehdr *e = kd->vmst->mmapbase;
111 _kvm_freevtop(kvm_t *kd) argument
113 if (kd->vmst != 0) {
114 if (kd
124 _kvm_initvtop(kvm_t *kd) argument
206 _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
257 _kvm_mdopen(kvm_t *kd) argument
[all...]
H A Dkvm_minidump_amd64.c74 hpt_insert(kvm_t *kd, vm_paddr_t pa, int64_t off) argument
84 hpte->next = kd->vmst->hpt_head[fnv];
85 kd->vmst->hpt_head[fnv] = hpte;
89 hpt_find(kvm_t *kd, vm_paddr_t pa) argument
96 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) {
104 inithash(kvm_t *kd, uint64_t *base, int len, off_t off) argument
116 hpt_insert(kd, pa, off);
124 _kvm_minidump_freevtop(kvm_t *kd) argument
126 struct vmstate *vm = kd->vmst;
133 kd
137 _kvm_minidump_initvtop(kvm_t *kd) argument
203 _kvm_minidump_vatop_v1(kvm_t *kd, u_long va, off_t *pa) argument
252 _kvm_minidump_vatop(kvm_t *kd, u_long va, off_t *pa) argument
325 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_sparc.c80 _kvm_freevtop(kd)
81 kvm_t *kd;
83 if (kd->vmst != 0)
84 free(kd->vmst);
88 _kvm_initvtop(kd)
89 kvm_t *kd;
97 vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
101 kd->vmst = vm;
103 if (fstat(kd->pmfd, &st) < 0)
110 if (lseek(kd
[all...]
H A Dkvm_cptime.c56 _kvm_cp_time_init(kvm_t *kd) argument
59 if (kvm_nlist(kd, kvm_cp_time_nl) < 0)
66 getsysctl(kvm_t *kd, const char *name, void *buf, size_t len) argument
72 _kvm_err(kd, kd->program, "cannot read sysctl %s:%s", name,
77 _kvm_err(kd, kd->program, "sysctl %s has unexpected size",
85 kvm_getcptime(kvm_t *kd, long *cp_time) argument
90 if (kd == NULL) {
95 if (ISALIVE(kd))
[all...]
H A Dkvm_minidump_mips.c78 hpt_insert(kvm_t *kd, uint64_t pa, int64_t off) argument
88 hpte->next = kd->vmst->hpt_head[fnv];
89 kd->vmst->hpt_head[fnv] = hpte;
93 hpt_find(kvm_t *kd, uint64_t pa) argument
100 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next)
108 inithash(kvm_t *kd, uint32_t *base, int len, off_t off) argument
119 hpt_insert(kd, pa, off);
128 _kvm_minidump_freevtop(kvm_t *kd) argument
130 struct vmstate *vm = kd->vmst;
137 kd
141 _kvm_minidump_initvtop(kvm_t *kd) argument
214 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_minidump_arm.c77 hpt_insert(kvm_t *kd, uint64_t pa, int64_t off) argument
87 hpte->next = kd->vmst->hpt_head[fnv];
88 kd->vmst->hpt_head[fnv] = hpte;
92 hpt_find(kvm_t *kd, uint64_t pa) argument
99 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next)
107 inithash(kvm_t *kd, uint32_t *base, int len, off_t off) argument
118 hpt_insert(kd, pa, off);
126 _kvm_minidump_freevtop(kvm_t *kd) argument
128 struct vmstate *vm = kd->vmst;
135 kd
139 _kvm_minidump_initvtop(kvm_t *kd) argument
211 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_minidump_i386.c76 hpt_insert(kvm_t *kd, uint64_t pa, int64_t off) argument
86 hpte->next = kd->vmst->hpt_head[fnv];
87 kd->vmst->hpt_head[fnv] = hpte;
91 hpt_find(kvm_t *kd, uint64_t pa) argument
98 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) {
106 inithash(kvm_t *kd, uint32_t *base, int len, off_t off) argument
118 hpt_insert(kd, pa, off);
126 _kvm_minidump_freevtop(kvm_t *kd) argument
128 struct vmstate *vm = kd->vmst;
135 kd
139 _kvm_minidump_initvtop(kvm_t *kd) argument
200 _kvm_minidump_vatop_pae(kvm_t *kd, u_long va, off_t *pa) argument
240 _kvm_minidump_vatop(kvm_t *kd, u_long va, off_t *pa) argument
280 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa) argument
[all...]
H A Dkvm_proc.c83 #define KREAD(kd, addr, obj) \
84 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
113 kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p, argument
143 if (KREAD(kd, (u_long)p, &proc)) {
144 _kvm_err(kd, kd->program, "can't read proc at %p", p);
150 if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads),
152 _kvm_err(kd, kd->program,
158 if (KREAD(kd, (u_lon
449 kvm_deadprocs(kvm_t *kd, int what, int arg, u_long a_allproc, u_long a_zombproc, int maxcnt) argument
476 kvm_getprocs(kvm_t *kd, int op, int arg, int *cnt) argument
612 _kvm_freeprocs(kvm_t *kd) argument
621 _kvm_realloc(kvm_t *kd, void *p, size_t n) argument
636 kvm_argv(kvm_t *kd, const struct kinfo_proc *kp, int env, int nchr) argument
705 kvm_getargv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument
711 kvm_getenvv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument
[all...]
H A Dkvm_getloadavg.c65 kvm_getloadavg(kvm_t *kd, double loadavg[], int nelem) argument
71 if (ISALIVE(kd))
74 if (kvm_nlist(kd, nl) != 0) {
76 _kvm_err(kd, kd->program,
81 #define KREAD(kd, addr, obj) \
82 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
83 if (KREAD(kd, nl[X_AVERUNNABLE].n_value, &loadinfo)) {
84 _kvm_err(kd, kd
[all...]
H A Dkvm_ia64.c85 ia64_maphdrs(kvm_t *kd, size_t sz) argument
87 struct vmstate *vm = kd->vmst;
96 vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
98 _kvm_err(kd, kd->program, "cannot mmap corefile");
110 phys_addr2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) argument
119 e = (Elf64_Ehdr *)(kd->vmst->mmapbase);
133 _kvm_err(kd, kd->program, "invalid physical address %#jx",
139 phys_kvatop(kvm_t *kd, uint64_ argument
197 phys_read(kvm_t *kd, uint64_t pa, void *buf, size_t bufsz) argument
216 virt_addr2off(kvm_t *kd, uint64_t va, off_t *ofs, size_t pgsz) argument
245 virt_kvatop(kvm_t *kd, uint64_t va, off_t *ofs) argument
256 _kvm_freevtop(kvm_t *kd) argument
269 _kvm_initvtop(kvm_t *kd) argument
369 _kvm_kvatop(kvm_t *kd, u_long va, off_t *ofs) argument
[all...]
H A Dkvm_getswapinfo.c71 #define KREAD(kd, addr, obj) \
72 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
76 if (KREAD(kd, (u_long)(addr), (var))) { \
77 _kvm_err(kd, kd->program, "cannot read %s", msg); \
93 kvm_getswapinfo(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
99 if (kd == NULL) {
104 if (ISALIVE(kd)) {
105 return kvm_getswapinfo_sysctl(kd, swap_ary, swap_max, flags);
107 return kvm_getswapinfo_kvm(kd, swap_ar
112 kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
157 kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
220 nlist_init(kvm_t *kd) argument
248 getsysctl(kvm_t *kd, const char *name, void *ptr, size_t len) argument
[all...]
H A Dkvm_powerpc.c96 powerpc_maphdrs(kvm_t *kd) argument
101 vm = kd->vmst;
104 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
106 _kvm_err(kd, kd->program, "cannot map corefile");
131 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0);
133 _kvm_err(kd, kd->program, "cannot map corefle headers");
143 _kvm_err(kd, kd
153 powerpc_va2off(kvm_t *kd, u_long va, off_t *ofs) argument
176 _kvm_freevtop(kvm_t *kd) argument
192 _kvm_initvtop(kvm_t *kd) argument
209 _kvm_kvatop(kvm_t *kd, u_long va, off_t *ofs) argument
[all...]
/freebsd-10.1-release/sys/cddl/compat/opensolaris/sys/
H A Dsid.h41 ksiddomain_t *kd; local
45 kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
46 kd->kd_len = (uint_t)len;
47 kd->kd_name = kmem_alloc(len, KM_SLEEP);
48 strcpy(kd->kd_name, domain);
49 return (kd);
53 ksiddomain_rele(ksiddomain_t *kd) argument
56 kmem_free(kd->kd_name, kd
[all...]
/freebsd-10.1-release/usr.sbin/asf/
H A Dasf_kvm.c59 kvm_t *kd; local
66 kd = kvm_openfiles(kernfile, corefile, NULL, O_RDONLY, errbuf);
67 if (kd == NULL)
76 switch (kvm_nlist(kd, nl)) {
80 warnx("%s: %s", LINKER_HEAD, kvm_geterr(kd));
81 kvm_close(kd);
84 kvm_close(kd);
91 n = kvm_read(kd, nl[0].n_value, &linker_files, sizeof(linker_files));
95 kvm_close(kd);
104 n = kvm_read(kd, (u_lon
[all...]
/freebsd-10.1-release/crypto/heimdal/lib/krb5/
H A Dkrbhst.c165 krbhst_empty(const struct krb5_krbhst_data *kd) argument
167 return kd->index == &kd->hosts;
171 * Return the default protocol for the `kd' (either TCP or UDP)
175 krbhst_get_default_proto(struct krb5_krbhst_data *kd) argument
177 if (kd->flags & KD_LARGE_MSG)
198 parse_hostspec(krb5_context context, struct krb5_krbhst_data *kd, argument
208 hi->proto = krbhst_get_default_proto(kd);
290 append_host_hostinfo(struct krb5_krbhst_data *kd, struct krb5_krbhst_info *host) argument
294 for(h = kd
306 append_host_string(krb5_context context, struct krb5_krbhst_data *kd, const char *host, int def_port, int port) argument
422 get_next(struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument
434 srv_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *proto, const char *service) argument
458 config_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *conf_string) argument
486 fallback_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *serv_string, int port, int proto) argument
553 struct krb5_krbhst_data *kd = ctx; local
589 plugin_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, enum locate_service_type type) argument
631 kdc_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument
696 admin_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument
750 kpasswd_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument
810 krb524_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument
871 struct krb5_krbhst_data *kd; local
914 struct krb5_krbhst_data *kd; local
[all...]
H A Dsalt-aes.c49 struct _krb5_key_data kd; local
64 kd.schedule = NULL;
65 ALLOC(kd.key, 1);
66 if(kd.key == NULL) {
70 kd.key->keytype = enctype;
71 ret = krb5_data_alloc(&kd.key->keyvalue, et->keytype->size);
80 et->keytype->size, kd.key->keyvalue.data);
82 _krb5_free_key_data(context, &kd, et);
88 ret = _krb5_derive_key(context, et, &kd, "kerberos", strlen("kerberos"));
90 ret = krb5_copy_keyblock_contents(context, kd
[all...]
/freebsd-10.1-release/lib/libprocstat/
H A Dcommon_kvm.h32 dev_t dev2udev(kvm_t *kd, struct cdev *dev);
33 int kdevtoname(kvm_t *kd, struct cdev *dev, char *);
34 int kvm_read_all(kvm_t *kd, unsigned long addr, void *buf,
40 int devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
41 int isofs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
42 int msdosfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
43 int nfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
44 int smbfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
45 int udf_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
46 int ufs_filestat(kvm_t *kd, struc
[all...]
H A Dlibprocstat_internal.h34 kvm_t *kd; member in struct:procstat

Completed in 142 milliseconds

1234