1/*
2 * Copyright (c) 2004 Marcel Moolenaar
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 *
--- 11 unchanged lines hidden (view full) ---
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/kthr.c 275644 2014-12-09 14:21:43Z dchagin $");
29
30#include <sys/param.h>
31#include <sys/cpuset.h>
32#include <sys/proc.h>
33#include <sys/types.h>
34#include <sys/signal.h>
35#include <err.h>
36#include <inttypes.h>
--- 54 unchanged lines hidden (view full) ---
91 warnx("kvm_read: %s", kvm_geterr(kvm));
92 break;
93 }
94 kt = malloc(sizeof(*kt));
95 kt->next = first;
96 kt->kaddr = addr;
97 if (td.td_tid == dumptid)
98 kt->pcb = dumppcb;
99 else if (td.td_oncpu != NOCPU &&
100 CPU_ISSET(td.td_oncpu, &stopped_cpus))
101 kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu);
102 else
103 kt->pcb = (uintptr_t)td.td_pcb;
104 kt->kstack = td.td_kstack;
105 kt->tid = td.td_tid;
106 kt->pid = p.p_pid;
107 kt->paddr = paddr;
--- 145 unchanged lines hidden ---
2 * Copyright (c) 2004 Marcel Moolenaar
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 *
--- 11 unchanged lines hidden (view full) ---
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/kthr.c 275644 2014-12-09 14:21:43Z dchagin $");
29
30#include <sys/param.h>
31#include <sys/cpuset.h>
32#include <sys/proc.h>
33#include <sys/types.h>
34#include <sys/signal.h>
35#include <err.h>
36#include <inttypes.h>
--- 54 unchanged lines hidden (view full) ---
91 warnx("kvm_read: %s", kvm_geterr(kvm));
92 break;
93 }
94 kt = malloc(sizeof(*kt));
95 kt->next = first;
96 kt->kaddr = addr;
97 if (td.td_tid == dumptid)
98 kt->pcb = dumppcb;
99 else if (td.td_oncpu != NOCPU &&
100 CPU_ISSET(td.td_oncpu, &stopped_cpus))
101 kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu);
102 else
103 kt->pcb = (uintptr_t)td.td_pcb;
104 kt->kstack = td.td_kstack;
105 kt->tid = td.td_tid;
106 kt->pid = p.p_pid;
107 kt->paddr = paddr;
--- 145 unchanged lines hidden ---