1 /* Determine the virtual memory area of a given address.
2 Copyright (C) 2002, 2006 Bruno Haible <bruno@clisp.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 /* Describes a virtual memory area, with some info about the gap between
22 it and the next or previous virtual memory area. */
27 #if STACK_DIRECTION < 0
28 /* Info about the gap between this VMA and the previous one.
29 addr must be < vma->start. */
30 int (*is_near_this
) (unsigned long addr
, struct vma_struct
*vma
);
31 /* Private field, not provided by all sigsegv_get_vma implementations. */
32 unsigned long prev_end
;
34 #if STACK_DIRECTION > 0
35 /* Info about the gap between this VMA and the next one.
36 addr must be > vma->end - 1. */
37 int (*is_near_this
) (unsigned long addr
, struct vma_struct
*vma
);
38 /* Private field, not provided by all sigsegv_get_vma implementations. */
39 unsigned long next_start
;
43 /* Determines the virtual memory area to which a given address belongs,
44 and returns 0. Returns -1 if it cannot be determined.
45 This function is used to determine the stack extent when a fault occurs. */
46 extern int sigsegv_get_vma (unsigned long address
, struct vma_struct
*vma
);
48 #endif /* _STACKVMA_H */