2 Copyright (C) 1998, 2007, 2008, 2009, 2010, 2011
3 Free Software Foundation, Inc.
4 Contributed by Cygnus Solutions.
6 This file is part of the GNU Simulators.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
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.031455 seconds and 4 git commands to generate.