]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/config/sparc/nm-sol2.h
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / config / sparc / nm-sol2.h
1 /* Native-dependent definitions for Solaris SPARC.
2
3 Copyright 2003, 2007 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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 3 of the License, or
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef NM_SOL2_H
21 #define NM_SOL2_H
22
23 #define GDB_GREGSET_T prgregset_t
24 #define GDB_FPREGSET_T prfpregset_t
25
26 /* Hardware wactchpoints. */
27
28 /* Solaris 2.6 and above can do HW watchpoints. */
29 #ifdef NEW_PROC_API
30
31 #define TARGET_HAS_HARDWARE_WATCHPOINTS
32
33 /* The man page for proc(4) on Solaris 2.6 and up says that the system
34 can support "thousands" of hardware watchpoints, but gives no
35 method for finding out how many; It doesn't say anything about the
36 allowed size for the watched area either. So we just tell GDB
37 'yes'. */
38 #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
39
40 /* When a hardware watchpoint fires off the PC will be left at the
41 instruction following the one which caused the watchpoint. It will
42 *NOT* be necessary for GDB to step over the watchpoint. */
43 #define HAVE_CONTINUABLE_WATCHPOINT 1
44
45 extern int procfs_stopped_by_watchpoint (ptid_t);
46 #define STOPPED_BY_WATCHPOINT(W) \
47 procfs_stopped_by_watchpoint(inferior_ptid)
48
49 /* Use these macros for watchpoint insertion/deletion. TYPE can be 0
50 (write watch), 1 (read watch), 2 (access watch (read/write). */
51
52 extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
53 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
54 procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1)
55 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
56 procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
57
58 #endif /* NEW_PROC_API */
59
60 #endif /* nm-sol2.h */