]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gdb/gdb/config/sparc/nm-sol2.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gdb / gdb / config / sparc / nm-sol2.h
1 /* Native-dependent definitions for Solaris SPARC.
2
3    Copyright 2003 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 2 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, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21 #ifndef NM_SOL2_H
22 #define NM_SOL2_H
23
24 #define GDB_GREGSET_T prgregset_t
25 #define GDB_FPREGSET_T prfpregset_t
26
27 /* Shared library support.  */
28
29 #include "solib.h"
30
31 /* Hardware wactchpoints.  */
32
33 /* Solaris 2.6 and above can do HW watchpoints.  */
34 #ifdef NEW_PROC_API
35
36 #define TARGET_HAS_HARDWARE_WATCHPOINTS
37
38 /* The man page for proc(4) on Solaris 2.6 and up says that the system
39    can support "thousands" of hardware watchpoints, but gives no
40    method for finding out how many; It doesn't say anything about the
41    allowed size for the watched area either.  So we just tell GDB
42    'yes'.  */
43 #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
44
45 /* When a hardware watchpoint fires off the PC will be left at the
46    instruction following the one which caused the watchpoint.  It will
47    *NOT* be necessary for GDB to step over the watchpoint.  */
48 #define HAVE_CONTINUABLE_WATCHPOINT 1
49
50 extern int procfs_stopped_by_watchpoint (ptid_t);
51 #define STOPPED_BY_WATCHPOINT(W) \
52   procfs_stopped_by_watchpoint(inferior_ptid)
53
54 /* Use these macros for watchpoint insertion/deletion.  TYPE can be 0
55    (write watch), 1 (read watch), 2 (access watch (read/write).  */
56
57 extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
58 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
59         procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1)
60 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
61         procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
62
63 #endif /* NEW_PROC_API */
64
65 #endif /* nm-sol2.h */