1228753Smm/* Native-dependent definitions for Solaris SPARC. 2228753Smm 3232153Smm Copyright 2003 Free Software Foundation, Inc. 4228753Smm 5228753Smm This file is part of GDB. 6228753Smm 7228753Smm This program is free software; you can redistribute it and/or modify 8228753Smm it under the terms of the GNU General Public License as published by 9228753Smm the Free Software Foundation; either version 2 of the License, or 10228753Smm (at your option) any later version. 11228753Smm 12228753Smm This program is distributed in the hope that it will be useful, 13228753Smm but WITHOUT ANY WARRANTY; without even the implied warranty of 14228753Smm MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15228753Smm GNU General Public License for more details. 16228753Smm 17228753Smm You should have received a copy of the GNU General Public License 18228753Smm along with this program; if not, write to the Free Software 19228753Smm Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 20228753Smm 21228753Smm#ifndef NM_SOL2_H 22228753Smm#define NM_SOL2_H 23228753Smm 24228753Smm#define GDB_GREGSET_T prgregset_t 25228753Smm#define GDB_FPREGSET_T prfpregset_t 26228753Smm 27228763Smm/* Shared library support. */ 28228753Smm 29232153Smm#include "solib.h" 30232153Smm 31232153Smm/* Hardware wactchpoints. */ 32232153Smm 33232153Smm/* Solaris 2.6 and above can do HW watchpoints. */ 34232153Smm#ifdef NEW_PROC_API 35228753Smm 36228753Smm#define TARGET_HAS_HARDWARE_WATCHPOINTS 37228753Smm 38228753Smm/* The man page for proc(4) on Solaris 2.6 and up says that the system 39228753Smm can support "thousands" of hardware watchpoints, but gives no 40232153Smm method for finding out how many; It doesn't say anything about the 41232153Smm allowed size for the watched area either. So we just tell GDB 42228753Smm 'yes'. */ 43228753Smm#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1 44228753Smm 45228753Smm/* When a hardware watchpoint fires off the PC will be left at the 46228753Smm instruction following the one which caused the watchpoint. It will 47232153Smm *NOT* be necessary for GDB to step over the watchpoint. */ 48228753Smm#define HAVE_CONTINUABLE_WATCHPOINT 1 49232153Smm 50228753Smmextern int procfs_stopped_by_watchpoint (ptid_t); 51228753Smm#define STOPPED_BY_WATCHPOINT(W) \ 52228753Smm procfs_stopped_by_watchpoint(inferior_ptid) 53232153Smm 54232153Smm/* Use these macros for watchpoint insertion/deletion. TYPE can be 0 55228753Smm (write watch), 1 (read watch), 2 (access watch (read/write). */ 56228753Smm 57228753Smmextern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); 58232153Smm#define target_insert_watchpoint(ADDR, LEN, TYPE) \ 59232153Smm procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1) 60228753Smm#define target_remove_watchpoint(ADDR, LEN, TYPE) \ 61228753Smm procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) 62232153Smm 63232153Smm#endif /* NEW_PROC_API */ 64228753Smm 65228753Smm#endif /* nm-sol2.h */ 66232153Smm