kdb.h revision 131903
1131903Smarcel/* 2131903Smarcel * Copyright (c) 2004 Marcel Moolenaar 3131903Smarcel * All rights reserved. 4131903Smarcel * 5131903Smarcel * Redistribution and use in source and binary forms, with or without 6131903Smarcel * modification, are permitted provided that the following conditions 7131903Smarcel * are met: 8131903Smarcel * 9131903Smarcel * 1. Redistributions of source code must retain the above copyright 10131903Smarcel * notice, this list of conditions and the following disclaimer. 11131903Smarcel * 2. Redistributions in binary form must reproduce the above copyright 12131903Smarcel * notice, this list of conditions and the following disclaimer in the 13131903Smarcel * documentation and/or other materials provided with the distribution. 14131903Smarcel * 15131903Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16131903Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17131903Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18131903Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19131903Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20131903Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21131903Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22131903Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23131903Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24131903Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25131903Smarcel * 26131903Smarcel * $FreeBSD: head/sys/amd64/include/kdb.h 131903 2004-07-10 18:40:12Z marcel $ 27131903Smarcel */ 28131903Smarcel 29131903Smarcel#ifndef _MACHINE_KDB_H_ 30131903Smarcel#define _MACHINE_KDB_H_ 31131903Smarcel 32131903Smarcel#include <machine/frame.h> 33131903Smarcel#include <machine/psl.h> 34131903Smarcel 35131903Smarcelstatic __inline void 36131903Smarcelkdb_cpu_clear_singlestep(void) 37131903Smarcel{ 38131903Smarcel kdb_frame->tf_rflags &= ~PSL_T; 39131903Smarcel} 40131903Smarcel 41131903Smarcelstatic __inline void 42131903Smarcelkdb_cpu_set_singlestep(void) 43131903Smarcel{ 44131903Smarcel kdb_frame->tf_rflags |= PSL_T; 45131903Smarcel} 46131903Smarcel 47131903Smarcelstatic __inline void 48131903Smarcelkdb_cpu_trap(int type, int code) 49131903Smarcel{ 50131903Smarcel} 51131903Smarcel 52131903Smarcel#endif /* _MACHINE_KDB_H_ */ 53