2 Copyright (C) 1998 Free Software Foundation, Inc.
3 Contributed by Cygnus Solutions.
5 This file is part of the GNU Simulators.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 /* This file is meant to be included by sim-basics.h. */
26 /* A list of address ranges. */
28 typedef struct _addr_subrange
{
29 struct _addr_subrange
*next
;
31 /* Range of addresses to be traced is [start,end]. */
32 address_word start
,end
;
35 /* For speed, searching is done on a tree. */
37 typedef struct _addr_range_tree
{
38 struct _addr_range_tree
*lower
;
39 struct _addr_range_tree
*higher
;
41 /* Range of addresses to be traced is [start,end]. */
42 address_word start
,end
;
45 /* The top level struct. */
47 typedef struct _addr_range
{
48 ADDR_SUBRANGE
*ranges
;
49 #define ADDR_RANGE_RANGES(ar) ((ar)->ranges)
50 ADDR_RANGE_TREE
*range_tree
;
51 #define ADDR_RANGE_TREE(ar) ((ar)->range_tree)
54 /* Add address range START,END to AR. */
55 extern void sim_addr_range_add (ADDR_RANGE
* /*ar*/,
56 address_word
/*start*/,
57 address_word
/*end*/);
59 /* Delete address range START,END from AR. */
60 extern void sim_addr_range_delete (ADDR_RANGE
* /*ar*/,
61 address_word
/*start*/,
62 address_word
/*end*/);
64 /* Return non-zero if ADDR is in range AR, traversing the entire tree.
65 If no range is specified, that is defined to mean "everything". */
67 sim_addr_range_hit_p (ADDR_RANGE
* /*ar*/, address_word
/*addr*/);
68 #define ADDR_RANGE_HIT_P(ar, addr) \
69 ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
73 #define SIM_ARANGE_INLINE INLINE
75 #define SIM_ARANGE_INLINE EXTERN_INLINE
77 #include "sim-arange.c"
79 #define SIM_ARANGE_INLINE
81 #define SIM_ARANGE_C_INCLUDED
83 #endif /* SIM_ARANGE_H */
This page took 0.030388 seconds and 4 git commands to generate.