1 /* Fault handler information.
2 Copyright (C) 2004 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. */
18 /* The included file defines:
20 SIGSEGV_EXC_STATE_TYPE
21 is a type containing state describing details of an exception,
22 excluding the thread state.
23 SIGSEGV_EXC_STATE_FLAVOR
24 is a macro expanding to a constant int value denoting the
25 SIGSEGV_EXC_STATE_TYPE type.
26 SIGSEGV_EXC_STATE_COUNT
27 is a macro expanding to the number of words of the
28 SIGSEGV_EXC_STATE_TYPE type.
30 SIGSEGV_THREAD_STATE_TYPE
31 is a type containing the state of a (stopped or interrupted) thread.
32 SIGSEGV_THREAD_STATE_FLAVOR
33 is a macro expanding to a constant int value denoting the
34 SIGSEGV_THREAD_STATE_TYPE type.
35 SIGSEGV_THREAD_STATE_COUNT
36 is a macro expanding to the number of words of the
37 SIGSEGV_THREAD_STATE_TYPE type.
39 SIGSEGV_FAULT_ADDRESS(thr_state, exc_state)
40 is a macro for fetching the fault address.
42 SIGSEGV_STACK_POINTER(thr_state)
43 is a macro, expanding to an lvalue, for fetching the stackpointer at
44 the moment the fault occurred, and for setting the stackpointer in
45 effect when the thread continues.
47 SIGSEGV_PROGRAM_COUNTER(thr_state)
48 is a macro, expanding to an lvalue, for fetching the program counter
49 (= instruction pointer) at the moment the fault occurred, and for
50 setting the program counter before letting the thread continue.
54 #include CFG_MACHFAULT