kdb.h revision 170473
1127342Smlaier/*-
2127342Smlaier * Copyright (c) 2004 Marcel Moolenaar
3127342Smlaier * All rights reserved.
4127342Smlaier *
5127342Smlaier * Redistribution and use in source and binary forms, with or without
6127342Smlaier * modification, are permitted provided that the following conditions
7150836Syar * are met:
8150836Syar *
9136224Smtm * 1. Redistributions of source code must retain the above copyright
10127342Smlaier *    notice, this list of conditions and the following disclaimer.
11127342Smlaier * 2. Redistributions in binary form must reproduce the above copyright
12127342Smlaier *    notice, this list of conditions and the following disclaimer in the
13127342Smlaier *    documentation and/or other materials provided with the distribution.
14127342Smlaier *
15127342Smlaier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16127342Smlaier * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17127342Smlaier * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18127342Smlaier * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19136942Spjd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20127342Smlaier * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21127342Smlaier * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22127342Smlaier * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23152271Srse * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24150839Syar * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25127342Smlaier *
26127342Smlaier * $FreeBSD: head/sys/i386/include/kdb.h 170473 2007-06-09 21:55:17Z marcel $
27127342Smlaier */
28127342Smlaier
29150516Spjd#ifndef _MACHINE_KDB_H_
30150516Spjd#define _MACHINE_KDB_H_
31127342Smlaier
32127342Smlaier#include <machine/frame.h>
33150839Syar#include <machine/psl.h>
34150839Syar
35127342Smlaier#define	KDB_STOPPEDPCB(pc)	&stoppcbs[pc->pc_cpuid]
36127342Smlaier
37150839Syarstatic __inline void
38127342Smlaierkdb_cpu_clear_singlestep(void)
39127342Smlaier{
40127342Smlaier	kdb_frame->tf_eflags &= ~PSL_T;
41127342Smlaier}
42127342Smlaier
43159243Sobrienstatic __inline void
44150839Syarkdb_cpu_set_singlestep(void)
45150839Syar{
46150839Syar	kdb_frame->tf_eflags |= PSL_T;
47130954Smlaier}
48127342Smlaier
49127342Smlaierstatic __inline void
50127342Smlaierkdb_cpu_sync_icache(unsigned char *addr, size_t size)
51127342Smlaier{
52150839Syar}
53127342Smlaier
54150839Syarstatic __inline void
55127342Smlaierkdb_cpu_trap(int type, int code)
56127342Smlaier{
57127342Smlaier}
58136942Spjd
59136942Spjd#endif /* _MACHINE_KDB_H_ */
60136942Spjd