1130803Smarcel/* Native support for SCO OpenServer 5. 2130803Smarcel Copyright 1996, 1998, 2002 Free Software Foundation, Inc. 346283Sdfr Re-written by J. Kean Johnston <jkj@sco.com>. 446283Sdfr Originally written by Robert Lipe <robertl@dgii.com>, based on 546283Sdfr work by Ian Lance Taylor <ian@cygnus.com> and 619370Spst Martin Walker <maw@netcom.com>. 719370Spst 898944Sobrien This file is part of GDB. 919370Spst 1098944Sobrien This program is free software; you can redistribute it and/or modify 1198944Sobrien it under the terms of the GNU General Public License as published by 1298944Sobrien the Free Software Foundation; either version 2 of the License, or 1398944Sobrien (at your option) any later version. 1419370Spst 1598944Sobrien This program is distributed in the hope that it will be useful, 1698944Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1798944Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1898944Sobrien GNU General Public License for more details. 1919370Spst 2098944Sobrien You should have received a copy of the GNU General Public License 2198944Sobrien along with this program; if not, write to the Free Software 2298944Sobrien Foundation, Inc., 59 Temple Place - Suite 330, 2398944Sobrien Boston, MA 02111-1307, USA. */ 2419370Spst 25130803Smarcel#ifndef NM_I386SCO5_H 26130803Smarcel#define NM_I386SCO5_H 27130803Smarcel 2846283Sdfr/* Basically, its a lot like the older versions ... */ 2919370Spst#include "i386/nm-i386sco.h" 3019370Spst 31130803Smarcel/* ... but it can do a lot of SVR4 type stuff too. */ 3246283Sdfr#define SVR4_SHARED_LIBS 33130803Smarcel#include "solib.h" /* Pick up shared library support. */ 3419370Spst 35130803Smarcel/* SCO is unlike other SVR4 systems in that it has SVR4 style shared 36130803Smarcel libs, with a slight twist. We expect 3 traps (2 for the exec and 37130803Smarcel one for the dynamic loader). After the third trap we insert the 38130803Smarcel shared library breakpoints, then wait for the 4th trap. */ 3919370Spst 40130803Smarcel#undef START_INFERIOR_TRAPS_EXPECTED 41130803Smarcel#define START_INFERIOR_TRAPS_EXPECTED 3 42130803Smarcel 43130803Smarcel/* SCO does not provide <sys/ptrace.h>. However, infptrace.c does not 4419370Spst have defaults for these values. */ 4519370Spst 4619370Spst#define PTRACE_ATTACH 10 4719370Spst#define PTRACE_DETACH 11 48130803Smarcel 49130803Smarcel/* Return the size of the user struct. */ 50130803Smarcel 51130803Smarcel#define KERNEL_U_SIZE kernel_u_size () 52130803Smarcelextern int kernel_u_size (void); 53130803Smarcel 54130803Smarcel/* We can attach and detach. */ 55130803Smarcel#define ATTACH_DETACH 56130803Smarcel 57130803Smarcel/* Hardware-assisted breakpoints and watchpoints. */ 58130803Smarcel 59130803Smarcel/* We can also do hardware watchpoints. */ 60130803Smarcel#define TARGET_HAS_HARDWARE_WATCHPOINTS 61130803Smarcel#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1 62130803Smarcel 63130803Smarcel/* After a watchpoint trap, the PC points to the instruction which 64130803Smarcel caused the trap. But we can continue over it without disabling the 65130803Smarcel trap. */ 66130803Smarcel#define HAVE_CONTINUABLE_WATCHPOINT 1 67130803Smarcel#define HAVE_STEPPABLE_WATCHPOINT 68130803Smarcel 69130803Smarcel#define STOPPED_BY_WATCHPOINT(W) \ 70130803Smarcel i386_stopped_by_watchpoint (PIDGET (inferior_ptid)) 71130803Smarcel 72130803Smarcel#define target_insert_watchpoint(addr, len, type) \ 73130803Smarcel i386_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type) 74130803Smarcel 75130803Smarcel#define target_remove_watchpoint(addr, len, type) \ 76130803Smarcel i386_remove_watchpoint (PIDGET (inferior_ptid), addr, len) 77130803Smarcel 78130803Smarcel#endif /* nm-i386sco5.h */ 79