Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/kthr.c 132624 2004-07-25 05:29:15Z marcel $");
---
> __FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/kthr.c 142151 2005-02-20 22:55:07Z kan $");
39a40,41
> #include <defs.h>
>
104a107,108
> kt->pid = p.p_pid;
> kt->paddr = paddr;
110c114
< curkthr = kgdb_thr_lookup(dumptid);
---
> curkthr = kgdb_thr_lookup_tid(dumptid);
117c121
< kgdb_thr_lookup(int tid)
---
> kgdb_thr_lookup_tid(int tid)
127a132,164
> kgdb_thr_lookup_taddr(uintptr_t taddr)
> {
> struct kthr *kt;
>
> kt = first;
> while (kt != NULL && kt->kaddr != taddr)
> kt = kt->next;
> return (kt);
> }
>
> struct kthr *
> kgdb_thr_lookup_pid(int pid)
> {
> struct kthr *kt;
>
> kt = first;
> while (kt != NULL && kt->pid != pid)
> kt = kt->next;
> return (kt);
> }
>
> struct kthr *
> kgdb_thr_lookup_paddr(uintptr_t paddr)
> {
> struct kthr *kt;
>
> kt = first;
> while (kt != NULL && kt->paddr != paddr)
> kt = kt->next;
> return (kt);
> }
>
> struct kthr *
141a179,196
>
> char *
> kgdb_thr_extra_thread_info(int tid)
> {
> struct kthr *kt;
> struct proc *p;
> static char comm[MAXCOMLEN + 1];
>
> kt = kgdb_thr_lookup_tid(tid);
> if (kt == NULL)
> return (NULL);
> p = (struct proc *)kt->paddr;
> if (kvm_read(kvm, (uintptr_t)&p->p_comm[0], &comm, sizeof(comm)) !=
> sizeof(comm))
> return (NULL);
>
> return (comm);
> }