1129198Scognet/*	$NetBSD: disassem.h,v 1.4 2001/03/04 04:15:58 matt Exp $	*/
2129198Scognet
3139735Simp/*-
4129198Scognet * Copyright (c) 1997 Mark Brinicombe.
5129198Scognet * Copyright (c) 1997 Causality Limited.
6129198Scognet *
7129198Scognet * All rights reserved.
8129198Scognet *
9129198Scognet * Redistribution and use in source and binary forms, with or without
10129198Scognet * modification, are permitted provided that the following conditions
11129198Scognet * are met:
12129198Scognet * 1. Redistributions of source code must retain the above copyright
13129198Scognet *    notice, this list of conditions and the following disclaimer.
14129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
15129198Scognet *    notice, this list of conditions and the following disclaimer in the
16129198Scognet *    documentation and/or other materials provided with the distribution.
17129198Scognet * 3. All advertising materials mentioning features or use of this software
18129198Scognet *    must display the following acknowledgement:
19129198Scognet *	This product includes software developed by Mark Brinicombe.
20129198Scognet * 4. The name of the company nor the name of the author may be used to
21129198Scognet *    endorse or promote products derived from this software without specific
22129198Scognet *    prior written permission.
23129198Scognet *
24129198Scognet * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
25129198Scognet * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26129198Scognet * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27129198Scognet * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28129198Scognet * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29129198Scognet * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30129198Scognet * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34129198Scognet * SUCH DAMAGE.
35129198Scognet *
36129198Scognet * Define the interface structure required by the disassembler.
37129198Scognet *
38129198Scognet * $FreeBSD$
39129198Scognet */
40129198Scognet
41129198Scognet#ifndef _MACHINE_DISASSEM_H_
42129198Scognet#define _MACHINE_DISASSEM_H_
43129198Scognettypedef struct {
44129198Scognet	u_int	(*di_readword)(u_int);
45290648Smmel	void	(*di_printaddr)(u_int);
46208052Scognet	int	(*di_printf)(const char *, ...) __printflike(1, 2);
47129198Scognet} disasm_interface_t;
48129198Scognet
49129198Scognet/* Prototypes for callable functions */
50129198Scognet
51129198Scognetvm_offset_t disasm(const disasm_interface_t *, vm_offset_t, int);
52129198Scognetvoid disassemble(u_int);
53129198Scognet
54129198Scognet#endif /* !_MACHINE_DISASSEM_H_ */
55