1 /*-
2 * Copyright (c) 2004-2005, Juniper Networks, Inc.
3 * All rights reserved.
4 *
5 * JNPR: db_trace.c,v 1.8 2007/08/09 11:23:32 katta
6 */
7
8 #include <sys/cdefs.h>
9 __FBSDID("$FreeBSD: releng/8.1/sys/mips/mips/db_trace.c 178172 2008-04-13 07:27:37Z imp $");
10
11 #include <sys/param.h>
12 #include <sys/systm.h>
13 #include <sys/kdb.h>
14 #include <sys/proc.h>
15 #include <sys/stack.h>
16 #include <sys/sysent.h>
17
18 #include <machine/db_machdep.h>
19 #include <machine/md_var.h>
20 #include <machine/pcb.h>
21
22 #include <ddb/ddb.h>
23
24 int
25 db_md_set_watchpoint(db_expr_t addr, db_expr_t size)
26 {
27
28 return(0);
29 }
30
31
32 int
33 db_md_clr_watchpoint( db_expr_t addr, db_expr_t size)
34 {
35
36 return(0);
37 }
38
39
40 void
41 db_md_list_watchpoints()
42 {
43 }
44
45 static int
46 db_backtrace(struct thread *td, db_addr_t frame, int count)
47 {
48 stacktrace_subr((struct trapframe *)frame,
49 (int (*) (const char *, ...))db_printf);
50 return (0);
51 }
52
53 void
54 db_trace_self(void)
55 {
56 db_trace_thread (curthread, -1);
57 return;
58 }
59
60 int
61 db_trace_thread(struct thread *thr, int count)
62 {
63 struct pcb *ctx;
64
65 ctx = kdb_thr_ctx(thr);
66 return (db_backtrace(thr, (db_addr_t) &ctx->pcb_regs, count));
67 }
68
69 void
70 db_show_mdpcpu(struct pcpu *pc)
71 {
72
73 db_printf("ipis = 0x%x\n", pc->pc_pending_ipis);
74 db_printf("next ASID = %d\n", pc->pc_next_asid);
75 db_printf("GENID = %d\n", pc->pc_asid_generation);
76 return;
77 }
Cache object: 6f6db0e85009ae4398c6db2fa03ff1bc
|