Deleted Added
sdiff udiff text old ( 81334 ) new ( 82004 )
full compact
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
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 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/sparc64/include/db_machdep.h 81334 2001-08-09 02:09:34Z obrien $
27 */
28
29#ifndef _MACHINE_DB_MACHDEP_H_
30#define _MACHINE_DB_MACHDEP_H_
31
32#include <machine/frame.h>
33#include <machine/trap.h>
34
35#define BYTE_MSF (1)
36
37typedef vm_offset_t db_addr_t;
38typedef u_long db_expr_t;
39
40struct db_regs {
41 u_long dr_global[8];
42};
43
44typedef struct trapframe db_regs_t;
45extern db_regs_t ddb_regs;
46#define DDB_REGS (&ddb_regs)
47
48#define PC_REGS(regs) ((db_addr_t)(regs)->tf_tpc)
49
50#define BKPT_INST (0)
51#define BKPT_SIZE (4)
52#define BKPT_SET(inst) (BKPT_INST)
53
54#define FIXUP_PC_AFTER_BREAK do { \
55 ddb_regs.tf_tpc = ddb_regs.tf_tnpc; \
56 ddb_regs.tf_tnpc += BKPT_SIZE; \
57} while (0);
58
59#define db_clear_single_step(regs)
60#define db_set_single_step(regs)
61
62#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
63#define IS_WATCHPOINT_TRAP(type, code) (0)
64
65#define inst_trap_return(ins) (0)
66#define inst_return(ins) (0)
67#define inst_call(ins) (0)
68#define inst_load(ins) (0)
69#define inst_store(ins) (0)
70
71#define DB_SMALL_VALUE_MAX (0x7fffffff)
72#define DB_SMALL_VALUE_MIN (-0x40001)
73
74#define DB_ELFSIZE 64
75
76#endif /* !_MACHINE_DB_MACHDEP_H_ */