OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /or1k/trunk/gdb-5.0/gdb/config/i386
    from Rev 107 to Rev 1765
    Reverse comparison

Rev 107 → Rev 1765

/cygwin.mt
0,0 → 1,6
# Target: Intel 386 run win32
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-cygwin.h
 
 
 
/nm-i386mach.h
0,0 → 1,27
/* Native definitions for Mach on an Intel 386
Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Do implement the attach and detach commands. */
/* #define ATTACH_DETACH 1 */
 
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
 
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
/nm-i386v42mp.h
0,0 → 1,22
/* Native support for i386 running SVR4.
Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "nm-sysv4.h"
/fbsd.mh
0,0 → 1,5
# Host: Intel 386 running FreeBSD
XDEPFILES= ser-tcp.o
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o
XM_FILE= xm-i386bsd.h
NAT_FILE= nm-fbsd.h
/i386v.mh
0,0 → 1,8
# Host: Intel 386 running System V
 
XM_FILE= xm-i386v.h
XDEPFILES=
XM_CLIBS= -lPW
 
NAT_FILE= nm-i386v.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
/tm-fbsd.h
0,0 → 1,33
/* Target macro definitions for i386 running FreeBSD
Copyright (C) 1997 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "i386/tm-i386bsd.h"
 
 
#undef NUM_REGS
#define NUM_REGS 14
 
 
#undef IN_SOLIB_CALL_TRAMPOLINE
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC")
 
 
extern i386_float_info ();
#define FLOAT_INFO i386_float_info ()
/i386lynx.mt
0,0 → 1,3
# Target: Intel 386 running LynxOS
TDEPFILES= coff-solib.o i386-tdep.o i386ly-tdep.o
TM_FILE= tm-i386lynx.h
/i386mk.mh
0,0 → 1,4
# Host: Intel 386 running Mach3 with OSF 1/MK
 
XDEPFILES= os-mach3.o i386mach3-xdep.o i387-tdep.o
XM_FILE= xm-i386osf1mk.h
/nm-nbsd.h
0,0 → 1,33
/* Native-dependent definitions for Intel 386 running NetBSD, for GDB.
Copyright 1986, 1987, 1989, 1992, 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef NM_NBSD_H
#define NM_NBSD_H
 
/* Get generic NetBSD native definitions. */
#include "nm-nbsd.h"
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));
 
extern int
i386_register_u_addr PARAMS ((int, int));
 
#endif /* NM_NBSD_H */
/i386v42mp.mh
0,0 → 1,13
# Host: Intel 386 running SVR4
 
XM_FILE= xm-i386v4.h
XDEPFILES=
# for network communication
XM_CLIBS= -lsocket -lnsl
 
# we don't want nm-i386v4.h since that defines LOSING_POLL which isn't
# appropriate for i386v42mp
NAT_FILE= nm-i386v42mp.h
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o uw-thread.o
 
/i386mach.mh
0,0 → 1,10
# Host: Intel 386 running Mach
 
# This is for mach2, maybe, or is obsolete (and seems to have only
# host and native, not target). Once we get the mach3 stuff working,
# I think it can go away.
 
XDEPFILES=
XM_FILE= xm-i386mach.h
NAT_FILE= nm-i386mach.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o i386mach-nat.o
/i386sco5.mh
0,0 → 1,17
# Host: Intel 386 running SCO OpenServer 5
# Much like 3.2v4, except we don't have to avoid problems with const
 
XM_FILE= xm-i386sco.h
 
#
# Not all configurations of SCO OpenServer 5 come with the TCP/IP
# runtime, but all come with the development system, so we always
# have socket(), gethostbyname(), and friends.
#
XDEPFILES= ser-tcp.o
XM_CLIBS= -lPW -lsocket
 
NAT_FILE= nm-i386sco5.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corefile.o core-aout.o \
corelow.o i386v-nat.o solib.o
 
/tm-i386bsd.h
0,0 → 1,44
/* Macro definitions for i386 running under BSD Unix.
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386BSD_H
#define TM_I386BSD_H 1
 
#include "i386/tm-i386.h"
 
/* 386BSD cannot handle the segment registers. */
/* BSDI can't handle them either. */
 
#undef NUM_REGS
#define NUM_REGS 10
 
/* On 386 bsd, sigtramp is above the user stack and immediately below
the user area. Using constants here allows for cross debugging.
These are tested for BSDI but should work on 386BSD. */
 
#define SIGTRAMP_START(pc) 0xfdbfdfc0
#define SIGTRAMP_END(pc) 0xfdbfe000
 
/* Saved Pc. Get it from sigcontext if within sigtramp. */
 
/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
#define SIGCONTEXT_PC_OFFSET 20
 
#endif /* ifndef TM_I386BSD_H */
/nm-i386sol2.h
0,0 → 1,60
/* Native support for i386 running Solaris 2.
Copyright 1998 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "nm-sysv4.h"
 
#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
 
#define TARGET_HAS_HARDWARE_WATCHPOINTS
 
/* The man page for proc4 on solaris 6 and 7 says that the system
can support "thousands" of hardware watchpoints, but gives no
method for finding out how many. So just tell GDB 'yes'. */
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE, CNT, OT) 1
 
/* When a hardware watchpoint fires off the PC will be left at the
instruction following the one which caused the watchpoint.
It will *NOT* be necessary for GDB to step over the watchpoint. */
#define HAVE_CONTINUABLE_WATCHPOINT
 
/* Solaris x86 2.6 and 2.7 targets have a kernel bug when stepping
over an instruction that causes a page fault without triggering
a hardware watchpoint. The kernel properly notices that it shouldn't
stop, because the hardware watchpoint is not triggered, but it forgets
the step request and continues the program normally.
Work around the problem by removing hardware watchpoints if a step is
requested, GDB will check for a hardware watchpoint trigger after the
step anyway. */
#define CANNOT_STEP_HW_WATCHPOINTS
 
extern int procfs_stopped_by_watchpoint PARAMS ((int));
#define STOPPED_BY_WATCHPOINT(W) \
procfs_stopped_by_watchpoint(inferior_pid)
 
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
 
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1)
#define target_remove_watchpoint(ADDR, LEN, TYPE) \
procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
 
#endif /* NEW_PROC_API */
/nbsd.mh
0,0 → 1,5
# Host: Intel 386 running NetBSD
XDEPFILES= ser-tcp.o
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o i386nbsd-nat.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
/nm-i386aix.h
0,0 → 1,43
/* Native support for i386 aix ps/2.
Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/*
* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com)
* Revision: 5-May-93 00:11:35
*/
 
#ifndef NM_I386AIX_H
#define NM_I386AIX_H 1
 
/* code to execute to print interesting information about the
* floating point processor (if any)
* No need to define if there is nothing to do.
*/
#define FLOAT_INFO { i386_float_info (); }
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
#undef KERNEL_U_ADDR
#define KERNEL_U_ADDR 0xf03fd000
 
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
 
#endif /* NM_I386AIX_H */
/ptx.mt
0,0 → 1,3
# Target: Sequent Symmetry running ptx 2.0, with Weitek 1167 or i387.
TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
TM_FILE= tm-ptx.h
/tm-nbsd.h
0,0 → 1,47
/* Macro definitions for i386 running under NetBSD.
Copyright 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_NBSD_H
#define TM_NBSD_H
 
#define HAVE_I387_REGS
 
#include "i386/tm-i386bsd.h"
#include "tm-nbsd.h"
 
extern use_struct_convention_fn i386nbsd_use_struct_convention;
#define USE_STRUCT_CONVENTION(gcc_p, type) \
i386nbsd_use_struct_convention(gcc_p, type)
 
 
#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
#define JB_PC 0 /* Setjmp()'s return PC saved here */
 
/* Figure out where the longjmp will land. Slurp the args out of the stack.
We expect the first arg to be a pointer to the jmp_buf structure from which
we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
This routine returns true on success */
 
extern int
get_longjmp_target PARAMS ((CORE_ADDR *));
 
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
 
#endif /* TM_NBSD_H */
/xm-i386bsd.h
0,0 → 1,23
/* Host-dependent definitions for Intel 386 running BSD Unix, for GDB.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
#include <machine/limits.h> /* for INT_MIN */
/xm-i386mach.h
0,0 → 1,31
/* Definitions to make GDB run on Mach on an Intel 386
Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
 
#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
 
/* <errno.h> only defines this if __STDC__!!! */
extern int errno;
 
extern char *strdup ();
/embed.mt
0,0 → 1,3
# Target: Embedded Intel 386
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386v.h
/symmetry.mh
0,0 → 1,5
# Host: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
XDEPFILES=
XM_FILE= xm-symmetry.h
NAT_FILE= nm-symmetry.h
NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o
/nm-i386sco.h
0,0 → 1,42
/* Native support for i386.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#if 0
/* code to execute to print interesting information about the
floating point processor (if any)
No need to define if there is nothing to do.
On the 386, unfortunately this code is host-dependent (and lives
in the i386-xdep.c file), so we can't
do this unless we *know* we aren't cross-debugging. FIXME.
*/
#define FLOAT_INFO { i386_float_info (); }
#endif /*0 */
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));
 
extern int
i386_register_u_addr PARAMS ((int, int));
 
/* When calling functions on SCO, sometimes we get an error writing some
of the segment registers. This would appear to be a kernel
bug/non-feature. */
#define CANNOT_STORE_REGISTER(regno) ((regno) == 14 || (regno) == 15)
/nm-ptx4.h
0,0 → 1,63
/* Definitions to make GDB run on a Sequent Symmetry under ptx
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "nm-sysv4.h"
 
#undef USE_PROC_FS
 
#include "nm-symmetry.h"
 
#define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0)
#define PTRACE_WRITE_REGS(pid,regaddr) \
mptrace (XPT_WREGS, (pid), (regaddr), 0)
 
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
 
#define FETCH_INFERIOR_REGISTERS
 
/* We must fetch all the regs before storing, since we store all at once. */
 
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
 
#define CHILD_WAIT
struct target_waitstatus;
extern int child_wait PARAMS ((int, struct target_waitstatus *));
 
/*
* ptx does attach as of ptx version 2.1. Prior to that, the interface
* exists but does not work.
*
* FIXME: Using attach/detach requires using the ptx MPDEBUGGER
* interface. There are still problems with that, so for now don't
* enable attach/detach. If you turn it on anyway, it will mostly
* work, but has a number of bugs. -fubar, 2/94.
*/
/*#define ATTACH_DETACH 1 */
#undef ATTACH_DETACH
#define PTRACE_ATTACH XPT_DEBUG
#define PTRACE_DETACH XPT_UNDEBUG
/*
* The following drivel is needed because there are two ptrace-ish
* calls on ptx: ptrace() and mptrace(), each of which does about half
* of the ptrace functions.
*/
#define PTRACE_ATTACH_CALL(pid) ptx_do_attach(pid)
#define PTRACE_DETACH_CALL(pid, signo) ptx_do_detach(pid, signo)
/fbsd.mt
0,0 → 1,3
# Target: Intel 386 running FreeBSD
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
TM_FILE= tm-fbsd.h
/tm-i386sol2.h
0,0 → 1,53
/* Macro definitions for GDB on an Intel i386 running Solaris 2.
Copyright (C) 1998 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
 
#define HAVE_I387_REGS
#include "i386/tm-i386v4.h"
 
/* Signal handler frames under Solaris 2 are recognized by a return address
of 0xFFFFFFFF, the third parameter on the signal handler stack is
a pointer to an ucontext. */
#undef sigtramp_saved_pc
#undef I386V4_SIGTRAMP_SAVED_PC
#define SIGCONTEXT_PC_OFFSET (36 + 14 * 4)
#undef IN_SIGTRAMP
#define IN_SIGTRAMP(pc, name) (pc == 0xFFFFFFFF)
 
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
#define SOFUN_ADDRESS_MAYBE_MISSING
 
extern char *sunpro_static_transform_name PARAMS ((char *));
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '.')
 
#define FAULTED_USE_SIGINFO
 
/* Macros to extract process id and thread id from a composite pid/tid.
Allocate lower 16 bits for process id, next 15 bits for thread id, and
one bit for a flag to indicate a user thread vs. a kernel thread. */
#define PIDGET(PID) (((PID) & 0xffff))
#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16)
#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16))
 
#endif /* ifndef TM_I386SOL2_H */
/i386v.mt
0,0 → 1,3
# Target: Intel 386 running System V
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386v.h
/xm-nbsd.h
0,0 → 1,24
/* Parameters for execution on a i386 running NetBSD, for GDB.
Copyright 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Get generic NetBSD host definitions. */
#include "xm-nbsd.h"
 
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
/i386mk.mt
0,0 → 1,6
# Target: Intel 386 with a.out in osf 1/mk
TDEPFILES= i386-tdep.o
TM_FILE= tm-i386osf1mk.h
 
TM_CFLAGS= -I/usr/mach3/include
TM_CLIBS= /usr/mach3/ccs/lib/libmachid.a /usr/mach3/ccs/lib/libnetname.a /usr/mach3/ccs/lib/libmach.a
/i386v42mp.mt
0,0 → 1,3
# Target: Intel 386 running SVR4.2MP
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386v42mp.h
/i386sco.mh
0,0 → 1,13
# Host: Intel 386 running SCO Unix (pre-SVR4)
 
XM_FILE= xm-i386sco.h
XDEPFILES=
XM_CLIBS= -lPW
 
NAT_FILE= nm-i386sco.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
 
#msg The SCO C compiler cannot parse symtab.h when value.h has been included.
#msg This is a bug in the compiler; the code is valid.
#msg Therefore, you must use GCC to compile GDB on SCO machines.
CC=gcc -D_POSIX_SOURCE=1
/nm-i386v4.h
0,0 → 1,25
/* Native support for i386 running SVR4.
Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "nm-sysv4.h"
 
/* Poll causes GDB to hang, at least under Unixware 1.1.2. */
#define LOSING_POLL
/i386sco5.mt
0,0 → 1,3
# Target: Intel 386 running SCO Open Server 5
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386sco5.h
/tm-i386nw.h
0,0 → 1,49
/* Macro definitions for i386 running NetWare.
Copyright 1993, 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386NW_H
#define TM_I386NW_H 1
 
#include "i386/tm-i386.h"
 
/* Stop backtracing when we wander into main. */
 
#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
 
 
/* Offsets (in target ints) into jmp_buf. Not defined in any system header
file, so we have to step through setjmp/longjmp with a debugger and figure
them out. */
 
#define JB_ELEMENT_SIZE 4 /* jmp_buf[] is array of ints */
 
#define JB_PC 6 /* Setjmp()'s return PC saved here */
 
/* Figure out where the longjmp will land. Slurp the args out of the stack.
We expect the first arg to be a pointer to the jmp_buf structure from which
we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
This routine returns true on success */
 
extern int
get_longjmp_target PARAMS ((CORE_ADDR *));
 
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
 
#endif /* ifndef TM_I386NW_H */
/xm-windows.h
0,0 → 1,36
/* Definitions for hosting on WIN32, built with Microsoft Visual C/C++, for GDB.
Copyright 1996, 1998 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "i386/xm-cygwin.h"
 
#undef PRINTF_HAS_LONG_LONG
#undef HAVE_UNISTD_H
#undef HAVE_TERMIO_H
#undef HAVE_TERMIOS_H
#undef HAVE_SGTTY_H
#undef HAVE_SBRK
#define CANT_FORK
 
#define MALLOC_INCOMPATIBLE
 
#include <malloc.h>
 
#define SIGQUIT 3
#define SIGTRAP 5
/tm-ptx4.h
0,0 → 1,25
/* Target machine definitions for GDB on a Sequent Symmetry under ptx
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
Symmetry version by Jay Vosburgh (fubar@sequent.com).
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define SEQUENT_PTX4
 
#include "tm-ptx.h"
/nm-sun386.h
0,0 → 1,28
/* Native support for Sun 386i, for GDB, the GNU debugger.
Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Do implement the attach and detach commands. */
 
#define ATTACH_DETACH
 
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
 
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
/nbsd.mt
0,0 → 1,5
# Target: Intel 386 running NetBSD
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
TM_FILE= tm-nbsd.h
 
GDBSERVER_DEPFILES= low-nbsd.o
/tm-i386v4.h
0,0 → 1,79
/* Macro definitions for GDB on an Intel i386 running SVR4.
Copyright (C) 1991, 1994 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386V4_H
#define TM_I386V4_H 1
 
/* Pick up most of what we need from the generic i386 target include file. */
 
#include "i386/tm-i386.h"
 
/* Pick up more stuff from the generic SVR4 host include file. */
 
#include "tm-sysv4.h"
 
/* Use the alternate method of determining valid frame chains. */
 
#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
 
/* Offsets (in target ints) into jmp_buf. Not defined in any system header
file, so we have to step through setjmp/longjmp with a debugger and figure
them out. Note that <setjmp> defines _JBLEN as 10, which is the default
if no specific machine is selected, even though we only use 6 slots. */
 
#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
 
#define JB_EBX 0
#define JB_ESI 1
#define JB_EDI 2
#define JB_EBP 3
#define JB_ESP 4
#define JB_EDX 5
 
#define JB_PC JB_EDX /* Setjmp()'s return PC saved in EDX */
 
/* Figure out where the longjmp will land. Slurp the args out of the stack.
We expect the first arg to be a pointer to the jmp_buf structure from which
we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
This routine returns true on success */
 
extern int
get_longjmp_target PARAMS ((CORE_ADDR *));
 
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
 
/* The following redefines make backtracing through sigtramp work.
They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
from the ucontext structure which is pushed by the kernel on the
user stack. Unfortunately there are three variants of sigtramp handlers. */
 
#define I386V4_SIGTRAMP_SAVED_PC
#define IN_SIGTRAMP(pc, name) ((name) \
&& (STREQ ("_sigreturn", name) \
|| STREQ ("_sigacthandler", name) \
|| STREQ ("sigvechandler", name)))
 
/* Saved Pc. Get it from ucontext if within sigtramp. */
 
#define sigtramp_saved_pc i386v4_sigtramp_saved_pc
extern CORE_ADDR i386v4_sigtramp_saved_pc PARAMS ((struct frame_info *));
 
#endif /* ifndef TM_I386V4_H */
/xm-ptx4.h
0,0 → 1,26
/* Definitions to make GDB run on a Sequent Symmetry under ptx, with
Weitek 1167 and i387 support. Copyright 1986, 1987, 1989, 1992,
1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
 
#include "xm-sysv4.h"
 
#include "xm-ptx.h"
/symmetry.mt
0,0 → 1,3
# Target: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
TDEPFILES= i386-tdep.o symm-tdep.o i387-tdep.o
TM_FILE= tm-symmetry.h
/sun386.mh
0,0 → 1,5
# Host: Sun 386i
XDEPFILES=
XM_FILE= xm-sun386.h
NAT_FILE= nm-sun386.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o sun386-nat.o
/tm-sun386.h
0,0 → 1,204
/* Parameters for a Sun 386i target machine, for GDB, the GNU debugger.
Copyright 1986, 1987, 1991, 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#if !defined (TM_SUN386_H)
#define TM_SUN386_H 1
 
#include "i386/tm-i386.h"
 
#ifndef sun386
#define sun386
#endif
#define SUNOS4
#define USE_MACHINE_REG_H
 
/* Perhaps some day this will work even without the following #define */
#define COFF_ENCAPSULATE
 
#ifdef COFF_ENCAPSULATE
/* Avoid conflicts between our include files and <sys/exec.h>
(maybe not needed anymore). */
#define _EXEC_
#endif
 
/* sun386 ptrace seems unable to change the frame pointer */
#define PTRACE_FP_BUG
 
/* Address of end of stack space. */
 
#define STACK_END_ADDR 0xfc000000
 
/* Number of machine registers */
 
#undef NUM_REGS
#define NUM_REGS 35
 
/* Initializer for an array of names of registers. There should be NUM_REGS
strings in this initializer. The order of the first 8 registers must match
the compiler's numbering scheme (which is the same as the 386 scheme) also,
this table must match regmap in i386-pinsn.c. */
 
#undef REGISTER_NAMES
#define REGISTER_NAMES { "gs", "fs", "es", "ds", \
"edi", "esi", "ebp", "esp", \
"ebx", "edx", "ecx", "eax", \
"retaddr", "trapnum", "errcode", "ip", \
"cs", "ps", "sp", "ss", \
"fst0", "fst1", "fst2", "fst3", \
"fst4", "fst5", "fst6", "fst7", \
"fctrl", "fstat", "ftag", "fip", \
"fcs", "fopoff", "fopsel" \
}
 
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
 
#undef FP_REGNUM
#define FP_REGNUM 6 /* (ebp) Contains address of executing stack frame */
#undef SP_REGNUM
#define SP_REGNUM 18 /* (usp) Contains address of top of stack */
#undef PS_REGNUM
#define PS_REGNUM 17 /* (ps) Contains processor status */
#undef PC_REGNUM
#define PC_REGNUM 15 /* (eip) Contains program counter */
#undef FP0_REGNUM
#define FP0_REGNUM 20 /* Floating point register 0 */
#undef FPC_REGNUM
#define FPC_REGNUM 28 /* 80387 control register */
 
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
 
#undef REGISTER_BYTES
#define REGISTER_BYTES (20*4+8*10+7*4)
 
/* Index within `registers' of the first byte of the space for
register N. */
 
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 160 \
: (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 10) + 80 \
: (N) * 4)
 
/* Number of bytes of storage in the actual machine representation
for register N. */
 
#undef REGISTER_RAW_SIZE
#define REGISTER_RAW_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 10 : 4)
 
/* Number of bytes of storage in the program's representation
for register N. */
 
#undef REGISTER_VIRTUAL_SIZE
#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 8 : 4)
 
/* Nonzero if register N requires conversion
from raw format to virtual format. */
 
#undef REGISTER_CONVERTIBLE
#define REGISTER_CONVERTIBLE(N) (((unsigned)((N) - FP0_REGNUM)) < 8)
 
/* Convert data from raw format for register REGNUM in buffer FROM
to virtual format with type TYPE in buffer TO. */
 
#undef REGISTER_CONVERT_TO_VIRTUAL
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
{ \
double val; \
i387_to_double ((FROM), (char *)&val); \
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
}
extern void
i387_to_double PARAMS ((char *, char *));
 
/* Convert data from virtual format with type TYPE in buffer FROM
to raw format for register REGNUM in buffer TO. */
 
#undef REGISTER_CONVERT_TO_RAW
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
{ \
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
double_to_i387((char *)&val, (TO)); \
}
extern void
double_to_i387 PARAMS ((char *, char *));
 
/* Return the GDB type object for the "standard" data type
of data in register N. */
 
#undef REGISTER_VIRTUAL_TYPE
#define REGISTER_VIRTUAL_TYPE(N) \
(((unsigned)((N) - FP0_REGNUM)) < 8 ? builtin_type_double : builtin_type_int)
 
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
 
#undef EXTRACT_RETURN_VALUE
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy (VALBUF, REGBUF + REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), TYPE_LENGTH (TYPE))
 
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
 
#undef STORE_RETURN_VALUE
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), VALBUF, TYPE_LENGTH (TYPE))
 
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
 
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer. */
 
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) \
(!inside_entry_file ((thisframe)->pc) ? \
read_memory_integer ((thisframe)->frame, 4) :\
0)
 
/* Define other aspects of the stack frame. */
 
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
 
#undef FRAMELESS_FUNCTION_INVOCATION
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
 
#undef FRAME_SAVED_PC
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
 
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME. */
 
#undef FIX_CALL_DUMMY
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{ \
*(int *)((char *)(dummyname) + 1) = (int)(fun) - (pc) - 5; \
}
 
#endif /* !defined (TM_SUN386_H) */
/xm-i386v4.h
0,0 → 1,28
/* Macro definitions for GDB on an Intel i386 running SVR4.
Copyright 1991, 1992 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Pick up most of what we need from the generic i386 host include file. */
 
#include "i386/xm-i386v.h"
 
/* Pick up more stuff from the generic SVR4 host include file. */
 
#include "xm-sysv4.h"
/i386nw.mt
0,0 → 1,3
# Target: Intel 386 running NetWare
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386nw.h
/xm-sun386.h
0,0 → 1,21
/* Host support for Sun 386i, for GDB, the GNU debugger.
Copyright (C) 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
/tm-ptx.h
0,0 → 1,233
/* Target machine definitions for GDB on a Sequent Symmetry under ptx
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
Symmetry version by Jay Vosburgh (fubar@sequent.com).
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_PTX_H
#define TM_PTX_H 1
 
/* I don't know if this will work for cross-debugging, even if you do get
a copy of the right include file. */
 
#include <sys/reg.h>
 
#ifdef SEQUENT_PTX4
#include "i386/tm-i386v4.h"
#else /* !SEQUENT_PTX4 */
#include "i386/tm-i386v.h"
#endif
 
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
on most implementations. Here we have to undo what tm-i386v.h gave
us and restore the default. */
 
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 2
 
/* Amount PC must be decremented by after a breakpoint. This is often the
number of bytes in BREAKPOINT but not always (such as now). */
 
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
 
#if 0
-- -this code can 't be used unless we know we are running native,
since it uses host specific ptrace calls.
/* code for 80387 fpu. Functions are from i386-dep.c, copied into
* symm-dep.c.
*/
#define FLOAT_INFO { i386_float_info(); }
#endif
 
/* Number of machine registers */
 
#undef NUM_REGS
#define NUM_REGS 49
 
/* Initializer for an array of names of registers. There should be at least
NUM_REGS strings in this initializer. Any excess ones are simply ignored.
The order of the first 8 registers must match the compiler's numbering
scheme (which is the same as the 386 scheme) and also regmap in the various
*-nat.c files. */
 
#undef REGISTER_NAMES
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
"esp", "ebp", "esi", "edi", \
"eip", "eflags", "st0", "st1", \
"st2", "st3", "st4", "st5", \
"st6", "st7", "fp1", "fp2", \
"fp3", "fp4", "fp5", "fp6", \
"fp7", "fp8", "fp9", "fp10", \
"fp11", "fp12", "fp13", "fp14", \
"fp15", "fp16", "fp17", "fp18", \
"fp19", "fp20", "fp21", "fp22", \
"fp23", "fp24", "fp25", "fp26", \
"fp27", "fp28", "fp29", "fp30", \
"fp31" }
 
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
 
#define EAX_REGNUM 0
#define ECX_REGNUM 1
#define EDX_REGNUM 2
#define EBX_REGNUM 3
 
#define ESP_REGNUM 4
#define EBP_REGNUM 5
 
#define ESI_REGNUM 6
#define EDI_REGNUM 7
 
#define EIP_REGNUM 8
#define EFLAGS_REGNUM 9
 
#define ST0_REGNUM 10
#define ST1_REGNUM 11
#define ST2_REGNUM 12
#define ST3_REGNUM 13
 
#define ST4_REGNUM 14
#define ST5_REGNUM 15
#define ST6_REGNUM 16
#define ST7_REGNUM 17
 
#define FP1_REGNUM 18 /* first 1167 register */
/* Get %fp2 - %fp31 by addition, since they are contiguous */
 
#undef SP_REGNUM
#define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */
#undef FP_REGNUM
#define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */
#undef PC_REGNUM
#define PC_REGNUM EIP_REGNUM /* Contains program counter */
#undef PS_REGNUM
#define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */
 
/*
* For ptx, this is a little bit bizarre, since the register block
* is below the u area in memory. This means that blockend here ends
* up being negative (for the call from coredep.c) since the value in
* u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us
* u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define
* FETCH_INFERIOR_REGISTERS (and supply our own functions for that),
* the core file case will be the only use of this function.
*/
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
{ (addr) = ptx_register_u_addr((blockend), (regno)); }
 
extern int
ptx_register_u_addr PARAMS ((int, int));
 
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. 10 i*86 registers, 8 i387
registers, and 31 Weitek 1167 registers */
 
#undef REGISTER_BYTES
#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
 
/* Index within `registers' of the first byte of the space for register N. */
 
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < ST0_REGNUM) ? ((N) * 4) : \
((N) < FP1_REGNUM) ? (40 + (((N) - ST0_REGNUM) * 10)) : \
(40 + 80 + (((N) - FP1_REGNUM) * 4)))
 
/* Number of bytes of storage in the actual machine representation for
register N. All registers are 4 bytes, except 387 st(0) - st(7),
which are 80 bits each. */
 
#undef REGISTER_RAW_SIZE
#define REGISTER_RAW_SIZE(N) \
(((N) < ST0_REGNUM) ? 4 : \
((N) < FP1_REGNUM) ? 10 : \
4)
 
/* Largest value REGISTER_RAW_SIZE can have. */
 
#undef MAX_REGISTER_RAW_SIZE
#define MAX_REGISTER_RAW_SIZE 10
 
/* Nonzero if register N requires conversion
from raw format to virtual format. */
 
#undef REGISTER_CONVERTIBLE
#define REGISTER_CONVERTIBLE(N) \
((N < ST0_REGNUM) ? 0 : \
(N < FP1_REGNUM) ? 1 : \
0)
 
/* Convert data from raw format for register REGNUM
to virtual format for register REGNUM. */
extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */
 
#undef REGISTER_CONVERT_TO_VIRTUAL
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
(REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \
(FROM),(TO)) : \
(void)memcpy ((TO), (FROM), 4))
 
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
 
#undef REGISTER_CONVERT_TO_RAW
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
(REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \
(FROM),(TO)) : \
(void)memcpy ((TO), (FROM), 4))
 
/* Return the GDB type object for the "standard" data type
of data in register N. */
/*
* Note: the 1167 registers (the last line, builtin_type_float) are
* generally used in pairs, with each pair being treated as a double.
* It it also possible to use them singly as floats. I'm not sure how
* in gdb to treat the register pair pseudo-doubles. -fubar
*/
#undef REGISTER_VIRTUAL_TYPE
#define REGISTER_VIRTUAL_TYPE(N) \
((N < ST0_REGNUM) ? builtin_type_int : \
(N < FP1_REGNUM) ? builtin_type_double : \
builtin_type_float)
 
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
 
#undef EXTRACT_RETURN_VALUE
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
 
/*
#undef FRAME_FIND_SAVED_REGS
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
{ ptx_frame_find_saved_regs((frame_info), &(frame_saved_regs)); }
*/
 
#endif /* ifndef TM_PTX_H */
/nm-i386sco4.h
0,0 → 1,33
/* Native support for SCO 3.2v4.
Copyright 1993 Free Software Foundation, Inc.
Contributed by Cygnus Support. By Ian Lance Taylor
<ian@cygnus.com> based on work by Martin Walker <maw@netcom.com>.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* SCO 3.2v4 is actually just like SCO 3.2v2, except that it
additionally supports attaching to a process. */
 
#include "i386/nm-i386sco.h"
 
#define ATTACH_DETACH
 
/* SCO, in its wisdom, does not provide <sys/ptrace.h>. infptrace.c
does not have defaults for these values. */
#define PTRACE_ATTACH 10
#define PTRACE_DETACH 11
/tm-i386v.h
0,0 → 1,96
/* Macro definitions for i386, Unix System V.
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386V_H
#define TM_I386V_H 1
 
/* First pick up the generic *86 target file. */
 
#include "i386/tm-i386.h"
 
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is
2 on most implementations. Override here to 4. */
 
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 4
 
#undef STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ char buf[REGISTER_SIZE]; \
(SP) -= sizeof (ADDR); \
store_address (buf, sizeof (ADDR), ADDR); \
write_memory ((SP), buf, sizeof (ADDR)); }
 
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
 
#undef EXTRACT_RETURN_VALUE
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
 
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
 
#undef STORE_RETURN_VALUE
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
 
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
 
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer. */
 
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) \
(!inside_entry_file ((thisframe)->pc) ? \
read_memory_integer ((thisframe)->frame, 4) :\
0)
 
/* Define other aspects of the stack frame. */
 
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
 
#undef FRAMELESS_FUNCTION_INVOCATION
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
 
#undef FRAME_SAVED_PC
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
 
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
 
#undef FRAME_NUM_ARGS
#define FRAME_NUM_ARGS(fi) (-1)
 
/* Forward decl's for prototypes */
struct frame_info;
struct frame_saved_regs;
 
extern int
i386_frame_num_args PARAMS ((struct frame_info *));
 
#endif /* ifndef TM_I386V_H */
/xm-ptx.h
0,0 → 1,42
/* Definitions to make GDB run on a Sequent Symmetry under ptx, with
Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1992, 1993, 1996
Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
 
#ifdef _SEQUENT_PTX4_
#include "xm-sysv4.h"
#endif /* _SEQUENT_PTX4_ */
 
/* This machine doesn't have the siginterrupt call. */
#define NO_SIGINTERRUPT
 
#define HAVE_WAIT_STRUCT
 
#undef HAVE_TERMIO
#define HAVE_TERMIOS
#define USG
 
#define NEED_POSIX_SETPGID
 
#define USE_O_NOCTTY
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
/i386dgux.mh
0,0 → 1,10
# Host: Intel 386 running DGUX, cloned from SVR4
 
XM_FILE= xm-i386v4.h
XDEPFILES= ser-tcp.o
# for network communication
XM_CLIBS= -lsocket -lnsl
 
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
/sun386.mt
0,0 → 1,3
# Target: Sun 386i target configuration file.
TDEPFILES= i386-tdep.o solib.o
TM_FILE= tm-sun386.h
/i386sco4.mh
0,0 → 1,12
# Host: Intel 386 running SCO Unix 3.2v4
 
XM_FILE= xm-i386sco.h
XDEPFILES=
XM_CLIBS= -lPW
 
NAT_FILE= nm-i386sco4.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
 
# The cc compiler mishandles const in cases like
# struct type ** const (c_builtin_types[]) =
MH_CFLAGS=-Dconst=
/tm-i386mk.h
0,0 → 1,38
/* Macro definitions for i386, Mach 3.0, OSF 1/MK
Copyright (C) 1992, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Until OSF switches to a newer Mach kernel that has
* a different get_emul_vector() interface.
*/
#define MK67 1
 
#include "i386/tm-i386m3.h"
 
/* FIMXE: kettenis/2000-03-26: On OSF 1, `long double' is equivalent
to `double'. However, I'm not sure what is the consequence of:
 
#define TARGET_LONG_DOUBLE_FORMAT TARGET_DOUBLE_FORMAT
#define TARGET_LONG_DOUBLE_BIT TARGET_DOUBLE_BIT
 
So I'll go with the current status quo instead. It looks like this
target won't compile anyway. Perhaps it should be obsoleted? */
#undef TARGET_LONG_DOUBLE_FORMAT
#undef TARGET_LONG_DOUBLE_BIT
/i386v32.mh
0,0 → 1,9
# Host: Intel 386 running System V release 3.2
 
XM_FILE= xm-i386v32.h
XDEPFILES=
XM_CLIBS= -lPW
 
NAT_FILE= nm-i386v.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
 
/nm-symmetry.h
0,0 → 1,47
/* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0,
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
 
#define FETCH_INFERIOR_REGISTERS
 
/* We must fetch all the regs before storing, since we store all at once. */
 
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
 
#ifdef _SEQUENT_
#define CHILD_WAIT
extern int child_wait PARAMS ((int, struct target_waitstatus *));
#endif
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
 
#ifdef _SEQUENT_
#include <sys/param.h>
#include <sys/user.h>
#include <sys/mc_vmparam.h>
/* VA_UAREA is defined in <sys/mc_vmparam.h>, and is dependant upon
sizeof(struct user) */
#define KERNEL_U_ADDR (VA_UAREA) /* ptx */
#else
#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) /* dynix */
#endif
/xm-i386v.h
0,0 → 1,45
/* Host support for i386.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
/* I'm running gdb 3.4 under 386/ix 2.0.2, which is a derivative of AT&T's
Sys V/386 3.2.
 
On some machines, gdb crashes when it's starting up while calling the
vendor's termio tgetent() routine. It always works when run under
itself (actually, under 3.2, it's not an infinitely recursive bug.)
After some poking around, it appears that depending on the environment
size, or whether you're running YP, or the phase of the moon or something,
the stack is not always long-aligned when main() is called, and tgetent()
takes strong offense at that. On some machines this bug never appears, but
on those where it does, it occurs quite reliably. */
#define ALIGN_STACK_ON_STARTUP
 
/* define USG if you are using sys5 /usr/include's */
#define USG
 
#define HAVE_TERMIO
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
 
#define KERNEL_U_ADDR 0xe0000000
/xm-i386mk.h
0,0 → 1,26
/* Definitions to make GDB run on Mach 3 OSF 1/MK on an Intel 386
Copyright (C) 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HAVE_TERMIO 1
 
#define EMULATOR_BASE 0xa0000000
#define EMULATOR_END 0xa0040000
 
#include "i386/xm-i386m3.h"
/xm-i386v32.h
0,0 → 1,25
/* Macro defintions for i386, running System V 3.2.
Copyright (C) 1989 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#include "i386/xm-i386v.h"
 
/* Apparently there is inconsistency among various System V's about what
the name of this field is. */
#define U_FPSTATE(u) u.u_fps.u_fpstate
/nm-linux.h
0,0 → 1,82
/* Native support for GNU/Linux, for GDB, the GNU debugger.
Copyright (C) 1986, 1987, 1989, 1992, 1996, 1998, 2000
Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef NM_LINUX_H
#define NM_LINUX_H
 
#include "i386/nm-i386v.h"
#include "nm-linux.h"
 
/* Return sizeof user struct to callers in less machine dependent routines */
 
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size PARAMS ((void));
 
#define U_REGS_OFFSET 0
 
/* GNU/Linux supports the 386 hardware debugging registers. */
 
#define TARGET_HAS_HARDWARE_WATCHPOINTS
 
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
 
/* After a watchpoint trap, the PC points to the instruction after
the one that caused the trap. Therefore we don't need to step over it.
But we do need to reset the status register to avoid another trap. */
#define HAVE_CONTINUABLE_WATCHPOINT
 
#define STOPPED_BY_WATCHPOINT(W) \
i386_stopped_by_watchpoint (inferior_pid)
 
/* Use these macros for watchpoint insertion/removal. */
 
#define target_insert_watchpoint(addr, len, type) \
i386_insert_watchpoint (inferior_pid, addr, len, type)
 
#define target_remove_watchpoint(addr, len, type) \
i386_remove_watchpoint (inferior_pid, addr, len)
 
/* We define this if link.h is available, because with ELF we use SVR4 style
shared libraries. */
 
#ifdef HAVE_LINK_H
#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
#endif
 
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
#define FETCH_INFERIOR_REGISTERS
 
/* Nevertheless, define CANNOT_{FETCH,STORE}_REGISTER, because we fall
back on the code `infptrace.c' (well a copy of that code in
`i386-linux-nat.c' for now) and we can access only the
general-purpose registers in that way. */
#define CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
#define CANNOT_STORE_REGISTER(regno) CANNOT_FETCH_REGISTER (regno)
 
extern CORE_ADDR
i386_stopped_by_watchpoint PARAMS ((int));
extern int
i386_insert_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len, int rw));
extern int
i386_remove_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len));
 
#endif /* #ifndef NM_LINUX_H */
/tm-i386.h
0,0 → 1,431
/* Macro definitions for GDB on an Intel i[345]86.
Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386_H
#define TM_I386_H 1
 
/* Forward decl's for prototypes */
struct frame_info;
struct frame_saved_regs;
struct type;
 
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
 
/* The format used for `long double' on almost all i386 targets is the
i387 extended floating-point format. In fact, of all targets in the
GCC 2.95 tree, only OSF/1 does it different, and insists on having
a `long double' that's not `long' at all. */
 
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i387_ext
 
/* Although the i386 extended floating-point has only 80 significant
bits, a `long double' actually takes up 96, probably to enforce
alignment. */
 
#define TARGET_LONG_DOUBLE_BIT 96
 
/* Used for example in valprint.c:print_floating() to enable checking
for NaN's */
 
#define IEEE_FLOAT
 
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
on most implementations. */
 
#define START_INFERIOR_TRAPS_EXPECTED 2
 
/* Offset from address of function to start of its code.
Zero on most machines. */
 
#define FUNCTION_START_OFFSET 0
 
/* Advance PC across any function entry prologue instructions to reach some
"real" code. */
 
#define SKIP_PROLOGUE(frompc) (i386_skip_prologue (frompc))
 
extern int i386_skip_prologue PARAMS ((int));
 
/* Immediately after a function call, return the saved pc. Can't always go
through the frames for this because on some machines the new frame is not
set up until the new function executes some instructions. */
 
#define SAVED_PC_AFTER_CALL(frame) (read_memory_integer (read_register (SP_REGNUM), 4))
 
/* Stack grows downward. */
 
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
/* Sequence of bytes for breakpoint instruction. */
 
#define BREAKPOINT {0xcc}
 
/* Amount PC must be decremented by after a breakpoint. This is often the
number of bytes in BREAKPOINT but not always. */
 
#define DECR_PC_AFTER_BREAK 1
 
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
real way to know how big a register is. */
 
#define REGISTER_SIZE 4
 
/* This register file is parameterized by two macros:
HAVE_I387_REGS --- register file should include i387 registers
HAVE_SSE_REGS --- register file should include SSE registers
If HAVE_SSE_REGS is #defined, then HAVE_I387_REGS must also be #defined.
However, GDB code should not test those macros with #ifdef, since
that makes code which is annoying to multi-arch. Instead, GDB code
should check the values of NUM_GREGS, NUM_FREGS, and NUM_SSE_REGS,
which will eventually get mapped onto architecture vector entries.
 
It's okay to use the macros in tm-*.h files, though, since those
files will get completely replaced when we multi-arch anyway. */
 
/* Number of general registers, present on every 32-bit x86 variant. */
#define NUM_GREGS (16)
 
/* Number of floating-point unit registers. */
#ifdef HAVE_I387_REGS
#define NUM_FREGS (16)
#else
#define NUM_FREGS (0)
#endif
 
/* Number of SSE registers. */
#ifdef HAVE_SSE_REGS
#define NUM_SSE_REGS (9)
#else
#define NUM_SSE_REGS (0)
#endif
 
#define NUM_REGS (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS)
 
/* Largest number of registers we could have in any configuration. */
#define MAX_NUM_REGS (16 + 16 + 9)
 
/* Initializer for an array of names of registers. There should be at least
NUM_REGS strings in this initializer. Any excess ones are simply ignored.
The order of the first 8 registers must match the compiler's numbering
scheme (which is the same as the 386 scheme) and also regmap in the various
*-nat.c files. */
 
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
"esp", "ebp", "esi", "edi", \
"eip", "eflags", "cs", "ss", \
"ds", "es", "fs", "gs", \
"st0", "st1", "st2", "st3", \
"st4", "st5", "st6", "st7", \
"fctrl", "fstat", "ftag", "fiseg", \
"fioff", "foseg", "fooff", "fop", \
"xmm0", "xmm1", "xmm2", "xmm3", \
"xmm4", "xmm5", "xmm6", "xmm7", \
"mxcsr" \
}
 
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
 
#define FP_REGNUM 5 /* (ebp) Contains address of executing stack
frame */
#define SP_REGNUM 4 /* (usp) Contains address of top of stack */
#define PC_REGNUM 8 /* (eip) Contains program counter */
#define PS_REGNUM 9 /* (ps) Contains processor status */
 
/* These registers are present only if HAVE_I387_REGS is #defined.
We promise that FP0 .. FP7 will always be consecutive register numbers. */
#define FP0_REGNUM 16 /* first FPU floating-point register */
#define FP7_REGNUM 23 /* last FPU floating-point register */
 
/* All of these control registers (except for FCOFF and FDOFF) are
sixteen bits long (at most) in the FPU, but are zero-extended to
thirty-two bits in GDB's register file. This makes it easier to
compute the size of the control register file, and somewhat easier
to convert to and from the FSAVE instruction's 32-bit format. */
#define FIRST_FPU_CTRL_REGNUM 24
#define FCTRL_REGNUM 24 /* FPU control word */
#define FPC_REGNUM 24 /* old name for FCTRL_REGNUM */
#define FSTAT_REGNUM 25 /* FPU status word */
#define FTAG_REGNUM 26 /* FPU register tag word */
#define FCS_REGNUM 27 /* FPU instruction's code segment selector
16 bits, called "FPU Instruction Pointer
Selector" in the x86 manuals */
#define FCOFF_REGNUM 28 /* FPU instruction's offset within segment
("Fpu Code OFFset") */
#define FDS_REGNUM 29 /* FPU operand's data segment */
#define FDOFF_REGNUM 30 /* FPU operand's offset within segment */
#define FOP_REGNUM 31 /* FPU opcode, bottom eleven bits */
#define LAST_FPU_CTRL_REGNUM 31
 
/* These registers are present only if HAVE_SSE_REGS is #defined.
We promise that XMM0 .. XMM7 will always have consecutive reg numbers. */
#define XMM0_REGNUM 32 /* first SSE data register */
#define XMM7_REGNUM 39 /* last SSE data register */
#define MXCSR_REGNUM 40 /* Streaming SIMD Extension control/status */
 
#define IS_FP_REGNUM(n) (FP0_REGNUM <= (n) && (n) <= FP7_REGNUM)
#define IS_SSE_REGNUM(n) (XMM0_REGNUM <= (n) && (n) <= XMM7_REGNUM)
 
#define FPU_REG_RAW_SIZE (10)
 
/* Sizes of individual register sets. These cover the entire register
file, so summing up the sizes of those portions actually present
yields REGISTER_BYTES. */
#define SIZEOF_GREGS (NUM_GREGS * 4)
#define SIZEOF_FPU_REGS (8 * FPU_REG_RAW_SIZE)
#define SIZEOF_FPU_CTRL_REGS \
((LAST_FPU_CTRL_REGNUM - FIRST_FPU_CTRL_REGNUM + 1) * 4)
#define SIZEOF_SSE_REGS (8 * 16 + 4)
 
 
/* Total amount of space needed to store our copies of the machine's register
state, the array `registers'. */
#ifdef HAVE_SSE_REGS
#define REGISTER_BYTES \
(SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS)
#else
#ifdef HAVE_I387_REGS
#define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS)
#else
#define REGISTER_BYTES (SIZEOF_GREGS)
#endif
#endif
 
/* Index within `registers' of the first byte of the space for register N. */
#define REGISTER_BYTE(n) (i386_register_byte[(n)])
extern int i386_register_byte[];
 
/* Number of bytes of storage in the actual machine representation for
register N. */
#define REGISTER_RAW_SIZE(n) (i386_register_raw_size[(n)])
extern int i386_register_raw_size[];
 
/* Largest value REGISTER_RAW_SIZE can have. */
#define MAX_REGISTER_RAW_SIZE 16
 
/* Number of bytes of storage in the program's representation
for register N. */
#define REGISTER_VIRTUAL_SIZE(n) (i386_register_virtual_size[(n)])
extern int i386_register_virtual_size[];
 
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#define MAX_REGISTER_VIRTUAL_SIZE 16
 
/* Return the GDB type object for the "standard" data type of data in
register N. Perhaps si and di should go here, but potentially they
could be used for things other than address. */
 
#define REGISTER_VIRTUAL_TYPE(N) \
(((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM) \
? lookup_pointer_type (builtin_type_void) \
: IS_FP_REGNUM(N) ? builtin_type_long_double \
: IS_SSE_REGNUM(N) ? builtin_type_v4sf \
: builtin_type_int)
 
/* REGISTER_CONVERTIBLE(N) is true iff register N's virtual format is
different from its raw format. Note that this definition assumes
that the host supports IEEE 32-bit floats, since it doesn't say
that SSE registers need conversion. Even if we can't find a
counterexample, this is still sloppy. */
#define REGISTER_CONVERTIBLE(n) (IS_FP_REGNUM (n))
 
/* Convert data from raw format for register REGNUM in buffer FROM to
virtual format with type TYPE in buffer TO. */
 
#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) \
i386_register_convert_to_virtual ((regnum), (type), (from), (to));
extern void i386_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to);
 
/* Convert data from virtual format with type TYPE in buffer FROM to
raw format for register REGNUM in buffer TO. */
 
#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) \
i386_register_convert_to_raw ((type), (regnum), (from), (to));
extern void i386_register_convert_to_raw (struct type *type, int regnum,
char *from, char *to);
 
/* Print out the i387 floating point state. */
#ifdef HAVE_I387_REGS
extern void i387_float_info (void);
#define FLOAT_INFO { i387_float_info (); }
#endif
 
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function. */
 
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ char buf[REGISTER_SIZE]; \
(SP) -= sizeof (ADDR); \
store_address (buf, sizeof (ADDR), ADDR); \
write_memory ((SP), buf, sizeof (ADDR)); }
 
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
 
#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \
i386_extract_return_value ((type), (regbuf), (valbuf))
extern void i386_extract_return_value (struct type *type, char *regbuf,
char *valbuf);
 
/* Write into appropriate registers a function return value of type TYPE, given
in virtual format. */
 
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
write_register_bytes (REGISTER_BYTE (FP0_REGNUM), (VALBUF), \
TYPE_LENGTH (TYPE)); \
else \
write_register_bytes (0, (VALBUF), TYPE_LENGTH (TYPE)); \
}
 
/* Extract from an array REGBUF containing the (raw) register state the address
in which a function should return its structure value, as a CORE_ADDR (or an
expression that can be used as one). */
 
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
 
/* The following redefines make backtracing through sigtramp work.
They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
from the sigcontext structure which is pushed by the kernel on the
user stack, along with a pointer to it. */
 
/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
chain-pointer.
In the case of the i386, the frame's nominal address
is the address of a 4-byte word containing the calling frame's address. */
 
#define FRAME_CHAIN(thisframe) \
((thisframe)->signal_handler_caller \
? (thisframe)->frame \
: (!inside_entry_file ((thisframe)->pc) \
? read_memory_integer ((thisframe)->frame, 4) \
: 0))
 
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
 
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
 
/* Saved Pc. Get it from sigcontext if within sigtramp. */
 
#define FRAME_SAVED_PC(FRAME) \
(((FRAME)->signal_handler_caller \
? sigtramp_saved_pc (FRAME) \
: read_memory_integer ((FRAME)->frame + 4, 4)) \
)
 
extern CORE_ADDR sigtramp_saved_pc PARAMS ((struct frame_info *));
 
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
 
/* Return number of args passed to a frame. Can return -1, meaning no way
to tell, which is typical now that the C compiler delays popping them. */
 
#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
 
extern int i386_frame_num_args PARAMS ((struct frame_info *));
 
/* Return number of bytes at start of arglist that are not really args. */
 
#define FRAME_ARGS_SKIP 8
 
/* Put here the code to store, into a struct frame_saved_regs,
the addresses of the saved registers of frame described by FRAME_INFO.
This includes special registers such as pc and fp saved in special
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
 
extern void i386_frame_init_saved_regs PARAMS ((struct frame_info *));
#define FRAME_INIT_SAVED_REGS(FI) i386_frame_init_saved_regs (FI)
 
 
/* Things needed for making the inferior call functions. */
 
/* "An argument's size is increased, if necessary, to make it a
multiple of [32 bit] words. This may require tail padding,
depending on the size of the argument" - from the x86 ABI. */
#define PARM_BOUNDARY 32
 
/* Push an empty stack frame, to record the current PC, etc. */
 
#define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
 
extern void i386_push_dummy_frame PARAMS ((void));
 
/* Discard from the stack the innermost frame, restoring all registers. */
 
#define POP_FRAME { i386_pop_frame (); }
 
extern void i386_pop_frame PARAMS ((void));
 
/* this is
* call 11223344 (32 bit relative)
* int3
*/
 
#define CALL_DUMMY { 0x223344e8, 0xcc11 }
 
#define CALL_DUMMY_LENGTH 8
 
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
 
#define CALL_DUMMY_BREAKPOINT_OFFSET 5
 
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME. */
 
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{ \
int from, to, delta, loc; \
loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
from = loc + 5; \
to = (int)(fun); \
delta = to - from; \
*((char *)(dummyname) + 1) = (delta & 0xff); \
*((char *)(dummyname) + 2) = ((delta >> 8) & 0xff); \
*((char *)(dummyname) + 3) = ((delta >> 16) & 0xff); \
*((char *)(dummyname) + 4) = ((delta >> 24) & 0xff); \
}
 
extern void print_387_control_word PARAMS ((unsigned int));
extern void print_387_status_word PARAMS ((unsigned int));
 
/* Offset from SP to first arg on stack at first instruction of a function */
 
#define SP_ARG0 (1 * 4)
 
#endif /* ifndef TM_I386_H */
/tm-symmetry.h
0,0 → 1,321
/* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994
Free Software Foundation, Inc.
Symmetry version by Jay Vosburgh (fubar@sequent.com).
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_SYMMETRY_H
#define TM_SYMMETRY_H 1
 
/* I don't know if this will work for cross-debugging, even if you do get
a copy of the right include file. */
#include <machine/reg.h>
 
#include "i386/tm-i386v.h"
 
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 2
 
/* Amount PC must be decremented by after a breakpoint. This is often the
number of bytes in BREAKPOINT but not always (such as now). */
 
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
 
#if 0
/* --- this code can't be used unless we know we are running native,
since it uses host specific ptrace calls. */
/* code for 80387 fpu. Functions are from i386-dep.c, copied into
* symm-dep.c.
*/
#define FLOAT_INFO { i386_float_info(); }
#endif
 
/* Number of machine registers */
 
#undef NUM_REGS
#define NUM_REGS 49
 
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */
 
/* Initializer for an array of names of registers. There should be at least
NUM_REGS strings in this initializer. Any excess ones are simply ignored.
Symmetry registers are in this weird order to match the register numbers
in the symbol table entries. If you change the order, things will probably
break mysteriously for no apparent reason. Also note that the st(0)...
st(7) 387 registers are represented as st0...st7. */
 
#undef REGISTER_NAMES
#define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \
"ebx", "esi", "edi", "st2", "st3", \
"st4", "st5", "st6", "st7", "esp", \
"ebp", "eip", "eflags","fp1", "fp2", \
"fp3", "fp4", "fp5", "fp6", "fp7", \
"fp8", "fp9", "fp10", "fp11", "fp12", \
"fp13", "fp14", "fp15", "fp16", "fp17", \
"fp18", "fp19", "fp20", "fp21", "fp22", \
"fp23", "fp24", "fp25", "fp26", "fp27", \
"fp28", "fp29", "fp30", "fp31" }
 
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
 
#define EAX_REGNUM 0
#define EDX_REGNUM 1
#define ECX_REGNUM 2
#define ST0_REGNUM 3
#define ST1_REGNUM 4
#define EBX_REGNUM 5
#define ESI_REGNUM 6
#define EDI_REGNUM 7
#define ST2_REGNUM 8
#define ST3_REGNUM 9
 
#define ST4_REGNUM 10
#define ST5_REGNUM 11
#define ST6_REGNUM 12
#define ST7_REGNUM 13
 
#define FP1_REGNUM 18 /* first 1167 register */
/* Get %fp2 - %fp31 by addition, since they are contiguous */
 
#undef SP_REGNUM
#define SP_REGNUM 14 /* (usp) Contains address of top of stack */
#define ESP_REGNUM 14
#undef FP_REGNUM
#define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */
#define EBP_REGNUM 15
#undef PC_REGNUM
#define PC_REGNUM 16 /* (eip) Contains program counter */
#define EIP_REGNUM 16
#undef PS_REGNUM
#define PS_REGNUM 17 /* (ps) Contains processor status */
#define EFLAGS_REGNUM 17
 
/*
* Following macro translates i386 opcode register numbers to Symmetry
* register numbers. This is used by i386_frame_find_saved_regs.
*
* %eax %ecx %edx %ebx %esp %ebp %esi %edi
* i386 0 1 2 3 4 5 6 7
* Symmetry 0 2 1 5 14 15 6 7
*
*/
#define I386_REGNO_TO_SYMMETRY(n) \
((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n))
 
/* The magic numbers below are offsets into u_ar0 in the user struct.
* They live in <machine/reg.h>. Gdb calls this macro with blockend
* holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are
* saved in the u area (along with a few others that aren't useful
* here. See <machine/reg.h>).
*/
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
{ struct user foo; /* needed for finding fpu regs */ \
switch (regno) { \
case 0: \
addr = blockend + EAX * sizeof(int); break; \
case 1: \
addr = blockend + EDX * sizeof(int); break; \
case 2: \
addr = blockend + ECX * sizeof(int); break; \
case 3: /* st(0) */ \
addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \
break; \
case 4: /* st(1) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \
break; \
case 5: \
addr = blockend + EBX * sizeof(int); break; \
case 6: \
addr = blockend + ESI * sizeof(int); break; \
case 7: \
addr = blockend + EDI * sizeof(int); break; \
case 8: /* st(2) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \
break; \
case 9: /* st(3) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \
break; \
case 10: /* st(4) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \
break; \
case 11: /* st(5) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \
break; \
case 12: /* st(6) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \
break; \
case 13: /* st(7) */ \
addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \
break; \
case 14: \
addr = blockend + ESP * sizeof(int); break; \
case 15: \
addr = blockend + EBP * sizeof(int); break; \
case 16: \
addr = blockend + EIP * sizeof(int); break; \
case 17: \
addr = blockend + FLAGS * sizeof(int); break; \
case 18: /* fp1 */ \
case 19: /* fp2 */ \
case 20: /* fp3 */ \
case 21: /* fp4 */ \
case 22: /* fp5 */ \
case 23: /* fp6 */ \
case 24: /* fp7 */ \
case 25: /* fp8 */ \
case 26: /* fp9 */ \
case 27: /* fp10 */ \
case 28: /* fp11 */ \
case 29: /* fp12 */ \
case 30: /* fp13 */ \
case 31: /* fp14 */ \
case 32: /* fp15 */ \
case 33: /* fp16 */ \
case 34: /* fp17 */ \
case 35: /* fp18 */ \
case 36: /* fp19 */ \
case 37: /* fp20 */ \
case 38: /* fp21 */ \
case 39: /* fp22 */ \
case 40: /* fp23 */ \
case 41: /* fp24 */ \
case 42: /* fp25 */ \
case 43: /* fp26 */ \
case 44: /* fp27 */ \
case 45: /* fp28 */ \
case 46: /* fp29 */ \
case 47: /* fp30 */ \
case 48: /* fp31 */ \
addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \
} \
}
 
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. 10 i*86 registers, 8 i387
registers, and 31 Weitek 1167 registers */
 
#undef REGISTER_BYTES
#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
 
/* Index within `registers' of the first byte of the space for
register N. */
 
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < 3) ? ((N) * 4) : \
((N) < 5) ? ((((N) - 2) * 10) + 2) : \
((N) < 8) ? ((((N) - 5) * 4) + 32) : \
((N) < 14) ? ((((N) - 8) * 10) + 44) : \
((((N) - 14) * 4) + 104))
 
/* Number of bytes of storage in the actual machine representation
* for register N. All registers are 4 bytes, except 387 st(0) - st(7),
* which are 80 bits each.
*/
 
#undef REGISTER_RAW_SIZE
#define REGISTER_RAW_SIZE(N) \
(((N) < 3) ? 4 : \
((N) < 5) ? 10 : \
((N) < 8) ? 4 : \
((N) < 14) ? 10 : \
4)
 
/* Nonzero if register N requires conversion
from raw format to virtual format. */
 
#undef REGISTER_CONVERTIBLE
#define REGISTER_CONVERTIBLE(N) \
(((N) < 3) ? 0 : \
((N) < 5) ? 1 : \
((N) < 8) ? 0 : \
((N) < 14) ? 1 : \
0)
 
#include "floatformat.h"
 
/* Convert data from raw format for register REGNUM in buffer FROM
to virtual format with type TYPE in buffer TO. */
 
#undef REGISTER_CONVERT_TO_VIRTUAL
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
{ \
double val; \
floatformat_to_double (&floatformat_i387_ext, (FROM), &val); \
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
}
 
/* Convert data from virtual format with type TYPE in buffer FROM
to raw format for register REGNUM in buffer TO. */
 
#undef REGISTER_CONVERT_TO_RAW
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
{ \
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
floatformat_from_double (&floatformat_i387_ext, &val, (TO)); \
}
 
/* Return the GDB type object for the "standard" data type
of data in register N. */
 
#undef REGISTER_VIRTUAL_TYPE
#define REGISTER_VIRTUAL_TYPE(N) \
((N < 3) ? builtin_type_int : \
(N < 5) ? builtin_type_double : \
(N < 8) ? builtin_type_int : \
(N < 14) ? builtin_type_double : \
builtin_type_int)
 
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
Native cc passes the address in eax, gcc (up to version 2.5.8)
passes it on the stack. gcc should be fixed in future versions to
adopt native cc conventions. */
 
#undef STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR))
 
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
 
#undef EXTRACT_RETURN_VALUE
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
 
/* The following redefines make backtracing through sigtramp work.
They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
from the sigcontext structure which is pushed by the kernel on the
user stack, along with a pointer to it. */
 
#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name))
 
/* Offset to saved PC in sigcontext, from <signal.h>. */
#define SIGCONTEXT_PC_OFFSET 16
 
#endif /* ifndef TM_SYMMETRY_H */
/i386aix.mh
0,0 → 1,10
# Host: IBM PS/2 (i386) running AIX PS/2
 
XM_FILE= xm-i386aix.h
XDEPFILES=
 
NAT_FILE= nm-i386aix.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o i386aix-nat.o
 
# Use gcc. Only coff output can be debugged
CC=gcc
/xm-symmetry.h
0,0 → 1,29
/* Definitions to make GDB run on a Sequent Symmetry under
dynix 3.1, with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
 
/* This machine doesn't have the siginterrupt call. */
#define NO_SIGINTERRUPT
 
#define HAVE_WAIT_STRUCT
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
/ptx4.mh
0,0 → 1,7
# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
 
XM_FILE= xm-ptx4.h
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o solib.o core-regset.o
XM_CLIBS= -lseq
 
NAT_FILE= nm-ptx4.h
/nm-i386lynx.h
0,0 → 1,26
/* Native-dependent definitions for Intel 386 running LynxOS.
Copyright 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef NM_I386LYNX_H
#define NM_I386LYNX_H
 
#include "nm-lynx.h"
 
#endif /* NM_I386LYNX_H */
/tm-i386os9k.h
0,0 → 1,64
/* Macro definitions for i386 running under BSD Unix.
Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
 
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386OS9K_H
#define TM_I386OS9K_H 1
 
#include "i386/tm-i386.h"
 
/* Number of machine registers */
 
#undef NUM_REGS
#define NUM_REGS (16) /* Basic i*86 regs */
 
/* Initializer for an array of names of registers. There should be at least
NUM_REGS strings in this initializer. Any excess ones are simply ignored.
The order of the first 8 registers must match the compiler's numbering
scheme (which is the same as the 386 scheme) and also regmap in the various
*-nat.c files. */
 
#undef REGISTER_NAMES
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
"esp", "ebp", "esi", "edi", \
"eip", "eflags", "cs", "ss", \
"ds", "es", "fs", "gs", \
}
 
#define DATABASE_REG 3 /* ebx */
 
/* Amount PC must be decremented by after a breakpoint. This is often the
number of bytes in BREAKPOINT but not always (such as now). */
 
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
 
/* On 386 bsd, sigtramp is above the user stack and immediately below
the user area. Using constants here allows for cross debugging.
These are tested for BSDI but should work on 386BSD. */
#define SIGTRAMP_START(pc) 0xfdbfdfc0
#define SIGTRAMP_END(pc) 0xfdbfe000
 
/* Saved Pc. Get it from sigcontext if within sigtramp. */
 
/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
#define SIGCONTEXT_PC_OFFSET 20
 
#define BELIEVE_PCC_PROMOTION 1
 
#endif /* #ifndef TM_I386OS9K_H */
/tm-cygwin.h
0,0 → 1,31
/* Macro definitions for i386 running under the win32 API Unix.
Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
 
#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */
#define HAVE_I387_REGS
 
#include "i386/tm-i386v.h"
 
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, 0)
extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR pc, char *name));
 
extern char *cygwin_pid_to_str PARAMS ((int pid));
/i386v4.mh
0,0 → 1,10
# Host: Intel 386 running SVR4
 
XM_FILE= xm-i386v4.h
XDEPFILES=
# for network communication
XM_CLIBS= -lsocket -lnsl
 
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
/nm-go32.h
0,0 → 1,84
/* Native definitions for Intel x86 running DJGPP.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define NO_PTRACE_H
 
#include "i386/nm-i386v.h"
 
#define TARGET_HAS_HARDWARE_WATCHPOINTS
 
/* Returns the number of hardware watchpoints of type TYPE that we can
set. Value is positive if we can set CNT watchpoints, zero if
setting watchpoints of type TYPE is not supported, and negative if
CNT is more than the maximum number of watchpoints of type TYPE
that we can support. TYPE is one of bp_hardware_watchpoint,
bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint.
CNT is the number of such watchpoints used so far (including this
one). OTHERTYPE is non-zero if other types of watchpoints are
currently enabled.
 
We always return 1 here because we don't have enough information
about possible overlap of addresses that they want to watch. As
an extreme example, consider the case where all the watchpoints
watch the same address and the same region length: then we can
handle a virtually unlimited number of watchpoints, due to debug
register sharing implemented via reference counts in go32-nat.c. */
 
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
 
/* Returns non-zero if we can use hardware watchpoints to watch a region
whose address is ADDR and whose length is LEN. */
 
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr,len) \
go32_region_ok_for_watchpoint(addr,len)
extern int go32_region_ok_for_watchpoint (CORE_ADDR, int);
 
/* After a watchpoint trap, the PC points to the instruction after the
one that caused the trap. Therefore we don't need to step over it.
But we do need to reset the status register to avoid another trap. */
 
#define HAVE_CONTINUABLE_WATCHPOINT
 
#define STOPPED_BY_WATCHPOINT(W) \
go32_stopped_by_watchpoint (inferior_pid, 0)
 
#define target_stopped_data_address() \
go32_stopped_by_watchpoint (inferior_pid, 1)
extern CORE_ADDR go32_stopped_by_watchpoint (int, int);
 
/* Use these macros for watchpoint insertion/removal. */
 
#define target_insert_watchpoint(addr, len, type) \
go32_insert_watchpoint (inferior_pid, addr, len, type)
extern int go32_insert_watchpoint (int, CORE_ADDR, int, int);
 
#define target_remove_watchpoint(addr, len, type) \
go32_remove_watchpoint (inferior_pid, addr, len, type)
extern int go32_remove_watchpoint (int, CORE_ADDR, int, int);
 
#define target_insert_hw_breakpoint(addr, shadow) \
go32_insert_hw_breakpoint(addr, shadow)
extern int go32_insert_hw_breakpoint (CORE_ADDR, void *);
 
#define target_remove_hw_breakpoint(addr, shadow) \
go32_remove_hw_breakpoint(addr, shadow)
extern int go32_remove_hw_breakpoint (CORE_ADDR, void *);
 
#define DECR_PC_AFTER_HW_BREAK 0
/tm-i386lynx.h
0,0 → 1,34
/* Macro definitions for Intel 386 running under LynxOS.
Copyright 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386LYNX_H
#define TM_I386LYNX_H
 
#include "tm-lynx.h"
 
/* Most definitions from sysv could be used. */
#include "i386/tm-i386.h"
 
#undef SAVED_PC_AFTER_CALL
 
#define SAVED_PC_AFTER_CALL i386lynx_saved_pc_after_call
CORE_ADDR i386lynx_saved_pc_after_call ();
 
#endif /* TM_I386LYNX_H */
/xm-cygwin.h
0,0 → 1,35
/* Definitions for hosting on WIN32, for GDB.
Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
#include "fopen-bin.h"
 
#define GDBINIT_FILENAME "gdb.ini"
 
#define SLASH_P(X) ((X)=='\\' || (X) == '/')
#define ROOTED_P(X) ((SLASH_P((X)[0]))|| ((X)[1] ==':'))
#define SLASH_CHAR '/'
#define SLASH_STRING "/"
 
/* Define this if source files use \r\n rather than just \n. */
#define CRLF_SOURCE_FILES
 
#define HAVE_SIGSETMASK 0
/i386aix.mt
0,0 → 1,7
# This port, for aix ps/2 (i386), will allow you to debug the coff
# output generated gcc-2.3.3 + gas. It will not understand IBM's
# proprietary debug info.
#
# Target: IBM PS/2 (i386) running AIX PS/2
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386aix.h
/xm-i386lynx.h
0,0 → 1,25
/* Host-dependent definitions for Intel 386 running LynxOS.
Copyright 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
/* Get generic LynxOS host definitions. */
 
#include "xm-lynx.h"
/go32.mh
0,0 → 1,19
# Host: Intel x86 running DJGPP
# we don't need mmalloc on DJGPP
MH_CFLAGS= -DNO_MMALLOC
MMALLOC=
MMALLOC_CFLAGS=
 
XM_FILE= xm-go32.h
XDEPFILES=
 
NAT_FILE= nm-go32.h
NATDEPFILES= go32-nat.o
 
TERMCAP=
HOST_IPC=
SER_HARDWIRE= ser-go32.o
CC= gcc
XM_CLIBS= -ldbg
 
 
/nm-m3.h
0,0 → 1,23
/* Native-dependent definitions for Intel 386 running Mach 3.
Copyright 1994 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Include the generic Mach 3 definitions. */
 
#include "nm-m3.h"
/tm-go32.h
0,0 → 1,51
/* Target-dependent definitions for Intel x86 running DJGPP.
Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_GO32_H
#define TM_GO32_H
 
#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
#define HAVE_I387_REGS
 
#include "i386/tm-i386.h"
 
/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
chain-pointer.
In the case of the i386, the frame's nominal address
is the address of a 4-byte word containing the calling frame's address.
DJGPP doesn't have any special frames for signal handlers, they are
just normal C functions. */
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) \
(!inside_entry_file ((thisframe)->pc) ? \
read_memory_integer ((thisframe)->frame, 4) :\
0)
 
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#undef FRAMELESS_FUNCTION_INVOCATION
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue(FI))
 
#undef FRAME_SAVED_PC
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
 
#endif /* TM_GO32_H */
/ptx4.mt
0,0 → 1,3
# Target: Sequent Symmetry running ptx 4.0, with Weitek 1167 or i387.
TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
TM_FILE= tm-ptx4.h
/nm-i386bsd.h
0,0 → 1,40
/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef NM_I386BSD_H
#define NM_I386BSD_H
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
 
#include <machine/vmparam.h>
#define KERNEL_U_ADDR USRSTACK
 
#undef FLOAT_INFO /* No float info yet */
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));
 
extern int
i386_register_u_addr PARAMS ((int, int));
 
#define PTRACE_ARG3_TYPE char*
 
#endif /* NM_I386BSD_H */
/gdbserve.mt
0,0 → 1,3
# Target: GDBSERVE.NLM running on a i386
TDEPFILES= i386.o
CPU_FILE= i386
/i386v4.mt
0,0 → 1,3
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386v4.h
/xm-go32.h
0,0 → 1,40
/* Host-dependent definitions for Intel x86 running DJGPP.
Copyright 1993-1996 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
#include "fopen-bin.h"
 
#define GDBINIT_FILENAME "gdb.ini"
 
#define SLASH_P(X) ((X)=='\\' || (X) == '/')
 
#define ROOTED_P(X) ((SLASH_P((X)[0])) || ((X)[0] && (X)[1] ==':'))
 
#define SLASH_CHAR '/'
#define SLASH_STRING "/"
 
#define CRLF_SOURCE_FILES
 
#define DIRNAME_SEPARATOR ';'
 
#define HOST_I386
 
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
/i386bsd.mh
0,0 → 1,7
# Host: Intel 386 running 386BSD
 
XM_FILE= xm-i386bsd.h
XDEPFILES=
 
NAT_FILE= nm-i386bsd.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o
/tm-i386v42mp.h
0,0 → 1,64
/* Macro definitions for GDB on an Intel i386 running SVR4.2MP
Copyright (C) 1991, 1994 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386V42MP_H
#define TM_I386V42MP_H 1
 
/* pick up more generic x86 sysv4 stuff */
 
#include "i386/tm-i386v4.h"
 
/* define to select for other sysv4.2mp weirdness (see procfs.c) */
 
#define UNIXWARE
 
/* The following macros extract process and lwp/thread ids from a
composite id.
 
For consistency with UnixWare core files, allocate bits 0-15 for
process ids and bits 16 and up for lwp ids. Reserve bit 31 for
negative return values to indicate exceptions, and use bit 30 as a
flag to indicate a user-mode thread, leaving 14 bits for lwp
ids. */
 
/* Number of bits in composite id allocated to process number. */
#define PIDBITS 16
 
/* Return the process id stored in composite PID. */
#define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1)))
 
/* Return the thread or lwp id stored in composite PID. */
#define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS)
#define LIDGET(PID) TIDGET(PID)
 
/* Construct a composite id from lwp LID and the process portion of
composite PID. */
#define MERGEPID(PID, LID) (PIDGET(PID) | ((LID) << PIDBITS))
#define MKLID(PID, LID) MERGEPID(PID, LID)
 
/* Construct a composite id from thread TID and the process portion of
composite PID. */
#define MKTID(PID, TID) (MERGEPID(PID, TID) | 0x40000000)
 
/* Return whether PID contains a user-space thread id. */
#define ISTID(PID) ((PID) & 0x40000000)
 
#endif /* ifndef TM_I386V42MP_H */
/nm-gnu.h
0,0 → 1,23
/* Native-dependent definitions for Intel 386 running the GNU Hurd
Copyright 1994, 1995 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Include the generic hurd definitions. */
 
#include "nm-gnu.h"
/go32.mt
0,0 → 1,3
# Target: Intel 386 running DJGPP
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-go32.h
/i386m3.mh
0,0 → 1,7
# Host: Intel 386 running Mach3
 
XDEPFILES= i387-tdep.o core-aout.o
NATDEPFILES= i386m3-nat.o m3-nat.o fork-child.o
NAT_CLIBS= -lmachid -lnetname -lmach
XM_FILE= xm-i386m3.h
NAT_FILE= nm-m3.h
/tm-i386aix.h
0,0 → 1,47
/* Macro defintions for IBM AIX PS/2 (i386).
Copyright 1986, 1987, 1989, 1992, 1993, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com). */
 
#ifndef TM_I386AIX_H
#define TM_I386AIX_H 1
 
#include "i386/tm-i386.h"
#include <sys/reg.h>
 
#ifndef I386
#define I386 1
#endif
 
/* AIX/i386 has FPU support. However, the native configuration (which
is the only supported configuration) doesn't make the FPU control
registers available. Override the appropriate symbols such that
only the normal FPU registers are included in GDB's register array. */
 
#undef NUM_FPREGS
#define NUM_FPREGS (8)
 
#undef NUM_REGS
#define NUM_REGS (NUM_GREGS + NUM_FPREGS)
 
#undef REGISTER_BYTES
#define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS)
 
#endif /* TM_I386AIX_H */
/i386bsd.mt
0,0 → 1,3
# Target: Intel 386 running BSD
TM_FILE= tm-i386bsd.h
TDEPFILES= i386-tdep.o
/linux.mh
0,0 → 1,10
# Host: Intel 386 running GNU/Linux
 
XM_FILE= xm-linux.h
XDEPFILES= ser-tcp.o
 
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
core-aout.o i386v-nat.o i386-linux-nat.o linux-thread.o lin-thread.o
 
LOADLIBES = -ldl -rdynamic
/vxworks.mt
0,0 → 1,3
# Target: i386 running VxWorks
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-vxworks.h
/xm-i386aix.h
0,0 → 1,34
/* Macro defintions for AIX PS/2 (i386)
Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/*
* Changed for IBM AIX ps/2 by Minh Tran Le (tranle@intellicorp.com)
* Revision: 23-Oct-92 17:42:49
*/
 
#include "i386/xm-i386v.h"
 
#undef HAVE_TERMIO
#define HAVE_SGTTY
 
#include <limits.h>
 
/* Use setpgid instead of setpgrp on AIX */
#define NEED_POSIX_SETPGID
/i386gnu.mh
0,0 → 1,30
# Host: Intel 386 running the GNU Hurd
XDEPFILES= i387-tdep.o
NATDEPFILES= i386gnu-nat.o gnu-nat.o fork-child.o solib.o corelow.o notify_S.o process_reply_S.o msg_reply_S.o msg_U.o exc_request_U.o exc_request_S.o
XM_FILE= xm-i386gnu.h
NAT_FILE= nm-gnu.h
MH_CFLAGS = -D_GNU_SOURCE
 
XM_CLIBS = -lshouldbeinlibc
 
# Use our own user stubs for the msg rpcs, so we can make them time out, in
# case the program is fucked, or we guess the wrong signal thread.
msg-MIGUFLAGS = -D'MSG_IMPORTS=waittime 1000;'
 
# ick
MIGCOM = $(MIG) -cc cat - /dev/null
 
# Reply servers need special massaging of the code mig generates, to make
# them work correctly for error returns in some cases.
%_reply_S.h %_reply_S.c: %_reply.defs
$(CPP) $(CPPFLAGS) -DSERVERPREFIX=S_ -x c $< \
| $(MIGCOM) -sheader $*_reply_S.h -server $*_reply_S.raw -user /dev/null -header /dev/null \
&& $(AWK) -f $(srcdir)/reply_mig_hack.awk < $*_reply_S.raw > $*_reply_S.c
# Normal servers
%_S.h %_S.c: %.defs
$(CPP) $(CPPFLAGS) -DSERVERPREFIX=S_ -x c $< \
| $(MIGCOM) -sheader $*_S.h -server $*_S.c -user /dev/null -header /dev/null
# User rpc stubs
%_U.h %_U.c: %.defs
$(CPP) $(CPPFLAGS) $($*-MIGUFLAGS) -x c $< \
| $(MIGCOM) -sheader /dev/null -server /dev/null -user $*_U.c -header $*_U.h
/xm-i386sco.h
0,0 → 1,43
/* Macro defintions for i386, running SCO Unix System V/386 3.2.
Copyright (C) 1989 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* In 3.2v4 <sys/user.h> requires on <sys/dir.h>. */
#include <sys/types.h>
#include <sys/dir.h>
 
#include "i386/xm-i386v.h"
 
/* Apparently there is inconsistency among various System V's about what
the name of this field is. */
#define U_FPSTATE(u) u.u_fps.u_fpstate
 
/* SCO 3.2v2 and later have job control. */
/* SCO 3.2v4 I know has termios; I'm not sure about earlier versions.
GDB does not currently support the termio/job control combination. */
#undef HAVE_TERMIO
#define HAVE_TERMIOS
 
/* SCO's assembler doesn't grok dollar signs in identifiers.
So we use dots instead. This item must be coordinated with G++. */
#undef CPLUS_MARKER
#define CPLUS_MARKER '.'
 
/* Use setpgid instead of setpgrp on SCO */
#define NEED_POSIX_SETPGID
/i386m3.mt
0,0 → 1,3
# Target: Intel 386 with a.out under Mach 3
TDEPFILES= i386-tdep.o
TM_FILE= tm-i386m3.h
/nm-i386v.h
0,0 → 1,37
/* Native support for i386.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#if 0
/* code to execute to print interesting information about the
floating point processor (if any)
No need to define if there is nothing to do.
On the 386, unfortunately this code is host-dependent (and lives
in the i386-xdep.c file), so we can't
do this unless we *know* we aren't cross-debugging. FIXME.
*/
#define FLOAT_INFO { i386_float_info (); }
#endif /*0 */
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));
 
extern int
i386_register_u_addr PARAMS ((int, int));
/linux.mt
0,0 → 1,5
# Target: Intel 386 running GNU/Linux
TDEPFILES= i386-tdep.o i386-linux-tdep.o i387-tdep.o
TM_FILE= tm-linux.h
 
GDBSERVER_DEPFILES= low-linux.o
/i386os9k.mt
0,0 → 1,3
# Target: Intel 386 running OS9000
TDEPFILES= i386-tdep.o remote-os9k.o
TM_FILE= tm-i386os9k.h
/nm-i386sco5.h
0,0 → 1,38
/* Native support for SCO OpenServer 5
Copyright 1996, 1998 Free Software Foundation, Inc.
Re-written by J. Kean Johnston <jkj@sco.com>.
Originally written by Robert Lipe <robertl@dgii.com>, based on
work by Ian Lance Taylor <ian@cygnus.com> and
Martin Walker <maw@netcom.com>.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Basically, its a lot like the older versions ... */
#include "i386/nm-i386sco.h"
 
/* ... but it can do a lot of SVR4 type stuff too. */
#define SVR4_SHARED_LIBS
#include "solib.h" /* Pick up shared library support */
 
#define ATTACH_DETACH
 
/* SCO does not provide <sys/ptrace.h>. infptrace.c does not
have defaults for these values. */
 
#define PTRACE_ATTACH 10
#define PTRACE_DETACH 11
/i386gnu.mt
0,0 → 1,3
# Target: Intel 386/elf/GNU Hurd
TDEPFILES= i386-tdep.o
TM_FILE= tm-i386gnu.h
/tm-i386sco5.h
0,0 → 1,63
/* Macro definitions for GDB on an Intel i386 running SCO Open Server 5.
Copyright (C) 1998 Free Software Foundation, Inc.
Written by J. Kean Johnston (jkj@sco.com).
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386SCO5_H
#define TM_I386SCO5_H 1
 
/* Pick up most of what we need from the generic i386 target include file. */
 
#include "i386/tm-i386.h"
 
/* Pick up more stuff from the generic SYSV and SVR4 host include files. */
#include "i386/tm-i386v.h"
#include "tm-sysv4.h"
 
#define KERNEL_U_SIZE kernel_u_size()
 
/*
* SCO is unlike other SVR3 targets in that it has SVR4 style shared
* libs, with a slight twist. We expect 3 traps (2 for the exec and
* one for the dynamic loader). After the third trap we insert the
* SOLIB breakpoints, then wait for the 4th trap.
*/
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 3
 
/* We can also do hardware watchpoints */
#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
 
/* After a watchpoint trap, the PC points to the instruction which
caused the trap. But we can continue over it without disabling the
trap. */
#define HAVE_CONTINUABLE_WATCHPOINT
#define HAVE_STEPPABLE_WATCHPOINT
 
#define STOPPED_BY_WATCHPOINT(W) \
i386_stopped_by_watchpoint (inferior_pid)
 
#define target_insert_watchpoint(addr, len, type) \
i386_insert_watchpoint (inferior_pid, addr, len, type)
 
#define target_remove_watchpoint(addr, len, type) \
i386_remove_watchpoint (inferior_pid, addr, len)
 
#endif /* ifndef TM_I386SCO5_H */
/tm-vxworks.h
0,0 → 1,28
/* Target machine description for VxWorks on the 80[3456]86,
for GDB, the GNU debugger.
Copyright (C) 1999 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_VXWORKS_H
#define TM_VXWORKS_H
 
#include "i386/tm-i386v.h"
#include "tm-vxworks.h"
 
#endif /* ifndef TM_VXWORKS_H */
/ncr3000.mh
0,0 → 1,17
# Host: NCR 3000 (Intel 386 running SVR4)
 
# The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
# This compiler not only emits obnoxious copyright messages every time
# you run it, but it chokes and dies on a whole bunch of GNU source
# files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
# Unfortunately though, the AT&T compiler sometimes generates code that
# the assembler barfs on if -g is used, so disable it by default as well.
CC = /usr/ccs/ATT/cc
CFLAGS =
 
XM_FILE= xm-i386v4.h
XDEPFILES=
 
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
/i386sol2.mh
0,0 → 1,8
# Host: Intel 386 running Solaris 2 (SVR4)
 
XM_FILE= xm-i386v4.h
XDEPFILES=
 
NAT_FILE= nm-i386sol2.h
NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
/tm-i386m3.h
0,0 → 1,56
/* Macro definitions for i386, Mach 3.0
Copyright (C) 1992 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
/* Include common definitions for Mach3 systems */
#include "nm-m3.h"
 
/* Define offsets to access CPROC stack when it does not have
* a kernel thread.
*/
#define MACHINE_CPROC_SP_OFFSET 20
#define MACHINE_CPROC_PC_OFFSET 16
#define MACHINE_CPROC_FP_OFFSET 12
 
/* Thread flavors used in re-setting the T bit.
* @@ this is also bad for cross debugging.
*/
#define TRACE_FLAVOR i386_THREAD_STATE
#define TRACE_FLAVOR_SIZE i386_THREAD_STATE_COUNT
#define TRACE_SET(x,state) \
((struct i386_thread_state *)state)->efl |= 0x100
#define TRACE_CLEAR(x,state) \
((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
 
/* we can do it */
#define ATTACH_DETACH 1
 
/* Sigh. There should be a file for i386 but no sysv stuff in it */
#include "i386/tm-i386.h"
 
/* I want to test this float info code. See comment in tm-i386v.h */
#undef FLOAT_INFO
#define FLOAT_INFO { i386_mach3_float_info (); }
 
/* Address of end of stack space.
* for MACH, see <machine/vmparam.h>
* @@@ I don't know what is in the 5 ints...
*/
#undef STACK_END_ADDR
#define STACK_END_ADDR (0xc0000000-sizeof(int [5]))
/i386aout.mt
0,0 → 1,3
# Target: Intel 386 with a.out
TDEPFILES= i386-tdep.o
TM_FILE= tm-i386v.h
/xm-i386m3.h
0,0 → 1,34
/* Definitions to make GDB run on Mach 3 on an Intel 386
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
/* Do implement the attach and detach commands. */
#define ATTACH_DETACH 1
 
/* Not needeed */
#define KERNEL_U_ADDR 0
 
#ifndef EMULATOR_BASE
/* For EMULATOR_BASE and EMULATOR_END.
* OSF 1/MK has different values in some other place.
*/
#include <machine/vmparam.h>
#endif /* EMULATOR_BASE */
/cygwin.mh
0,0 → 1,6
MH_CFLAGS=
XM_FILE=xm-cygwin.h
XDEPFILES=ser-tcp.o
NATDEPFILES= win32-nat.o
NAT_FILE=../nm-empty.h
XM_CLIBS=
/tm-linux.h
0,0 → 1,140
/* Definitions to target GDB to GNU/Linux on 386.
Copyright 1992, 1993 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_LINUX_H
#define TM_LINUX_H
 
#define I386_GNULINUX_TARGET
#define HAVE_I387_REGS
#ifdef HAVE_PTRACE_GETXFPREGS
#define HAVE_SSE_REGS
#endif
 
#include "i386/tm-i386.h"
#include "tm-linux.h"
 
/* FIXME: kettenis/2000-03-26: We should get rid of this last piece of
Linux-specific `long double'-support code, probably by adding code
to valprint.c:print_floating() to recognize various extended
floating-point formats. */
 
#if defined(HAVE_LONG_DOUBLE) && defined(HOST_I386)
/* The host and target are i386 machines and the compiler supports
long doubles. Long doubles on the host therefore have the same
layout as a 387 FPU stack register. */
 
#define TARGET_ANALYZE_FLOATING \
do \
{ \
unsigned expon; \
\
low = extract_unsigned_integer (valaddr, 4); \
high = extract_unsigned_integer (valaddr + 4, 4); \
expon = extract_unsigned_integer (valaddr + 8, 2); \
\
nonnegative = ((expon & 0x8000) == 0); \
is_nan = ((expon & 0x7fff) == 0x7fff) \
&& ((high & 0x80000000) == 0x80000000) \
&& (((high & 0x7fffffff) | low) != 0); \
} \
while (0)
 
#endif
 
/* The following works around a problem with /usr/include/sys/procfs.h */
#define sys_quotactl 1
 
/* When the i386 Linux kernel calls a signal handler, the return
address points to a bit of code on the stack. These definitions
are used to identify this bit of code as a signal trampoline in
order to support backtracing through calls to signal handlers. */
 
#define IN_SIGTRAMP(pc, name) i386_linux_in_sigtramp (pc, name)
extern int i386_linux_in_sigtramp (CORE_ADDR, char *);
 
/* We need our own version of sigtramp_saved_pc to get the saved PC in
a sigtramp routine. */
 
#define sigtramp_saved_pc i386_linux_sigtramp_saved_pc
extern CORE_ADDR i386_linux_sigtramp_saved_pc (struct frame_info *);
 
/* Signal trampolines don't have a meaningful frame. As in tm-i386.h,
the frame pointer value we use is actually the frame pointer of the
calling frame--that is, the frame which was in progress when the
signal trampoline was entered. gdb mostly treats this frame
pointer value as a magic cookie. We detect the case of a signal
trampoline by looking at the SIGNAL_HANDLER_CALLER field, which is
set based on IN_SIGTRAMP.
 
When a signal trampoline is invoked from a frameless function, we
essentially have two frameless functions in a row. In this case,
we use the same magic cookie for three frames in a row. We detect
this case by seeing whether the next frame has
SIGNAL_HANDLER_CALLER set, and, if it does, checking whether the
current frame is actually frameless. In this case, we need to get
the PC by looking at the SP register value stored in the signal
context.
 
This should work in most cases except in horrible situations where
a signal occurs just as we enter a function but before the frame
has been set up. */
 
#define FRAMELESS_SIGNAL(FRAME) \
((FRAME)->next != NULL \
&& (FRAME)->next->signal_handler_caller \
&& frameless_look_for_prologue (FRAME))
 
#undef FRAME_CHAIN
#define FRAME_CHAIN(FRAME) \
((FRAME)->signal_handler_caller \
? (FRAME)->frame \
: (FRAMELESS_SIGNAL (FRAME) \
? (FRAME)->frame \
: (!inside_entry_file ((FRAME)->pc) \
? read_memory_integer ((FRAME)->frame, 4) \
: 0)))
 
#undef FRAME_SAVED_PC
#define FRAME_SAVED_PC(FRAME) \
((FRAME)->signal_handler_caller \
? sigtramp_saved_pc (FRAME) \
: (FRAMELESS_SIGNAL (FRAME) \
? read_memory_integer (i386_linux_sigtramp_saved_sp ((FRAME)->next), 4) \
: read_memory_integer ((FRAME)->frame + 4, 4)))
 
extern CORE_ADDR i386_linux_sigtramp_saved_sp (struct frame_info *);
 
#undef SAVED_PC_AFTER_CALL
#define SAVED_PC_AFTER_CALL(frame) i386_linux_saved_pc_after_call (frame)
extern CORE_ADDR i386_linux_saved_pc_after_call (struct frame_info *);
 
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we
need to skip over the dynamic linker call. This function decides
when to skip, and where to skip to. See the comments for
SKIP_SOLIB_RESOLVER at the top of infrun.c. */
#define SKIP_SOLIB_RESOLVER i386_linux_skip_solib_resolver
extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc);
 
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
 
#endif /* #ifndef TM_LINUX_H */
/ncr3000.mt
0,0 → 1,3
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
TM_FILE= tm-i386v4.h
/i386lynx.mh
0,0 → 1,11
# Host: Intel 386 running LynxOS
 
XM_FILE= xm-i386lynx.h
XM_CLIBS= -lbsd
XDEPFILES= ser-tcp.o
 
NAT_FILE= nm-i386lynx.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
 
GDBSERVER_LIBS= -lbsd
GDBSERVER_DEPFILES= low-lynx.o
/tm-i386gnu.h
0,0 → 1,51
/* Macro definitions for i386 running the GNU Hurd.
Copyright (C) 1992, 1999 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef TM_I386GNU_H
#define TM_I386GNU_H 1
 
/* Include common definitions for GNU systems.
FIXME: This does not belong here since this is supposed to contain
only native-dependent information. */
#include "nm-gnu.h"
 
/* Thread flavors used in re-setting the T bit.
FIXME: This is native-dependent. */
#define THREAD_STATE_FLAVOR i386_REGS_SEGS_STATE
#define THREAD_STATE_SIZE i386_THREAD_STATE_COUNT
#define THREAD_STATE_SET_TRACED(state) \
((struct i386_thread_state *)state)->efl |= 0x100
#define THREAD_STATE_CLEAR_TRACED(state) \
((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
 
/* We can attach and detach.
FIXME: This is probably native-dependent too. */
#define ATTACH_DETACH 1
 
#define HAVE_I387_REGS
#include "i386/tm-i386.h"
 
/* Offset to saved PC in sigcontext. */
#define SIGCONTEXT_PC_OFFSET 68
 
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
#include "tm-sysv4.h"
 
#endif /* TM_I386GNU_H */
/xm-linux.h
0,0 → 1,41
/* Native support for GNU/Linux, for GDB, the GNU debugger.
Copyright (C) 1986, 1987, 1989, 1992, 2000 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef XM_LINUX_H
#define XM_LINUX_H
 
#define HOST_I386
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
 
#define HAVE_TERMIOS
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
 
#define NEED_POSIX_SETPGID
 
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>
 
#endif /* #ifndef XM_LINUX_H */
/i386sol2.mt
0,0 → 1,3
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
TM_FILE= tm-i386sol2.h
/xm-i386gnu.h
0,0 → 1,26
/* Definitions to make GDB run on the GNU Hurd on an Intel 386
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#define HOST_BYTE_ORDER LITTLE_ENDIAN
 
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
 
/* Do implement the attach and detach commands. */
#define ATTACH_DETACH 1
/nm-fbsd.h
0,0 → 1,99
/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB.
Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
 
This file is part of GDB.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
 
#ifndef NM_FREEBSD_H
#define NM_FREEBSD_H
 
/* Be shared lib aware */
#include "solib.h"
 
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
 
#include <machine/vmparam.h>
#define KERNEL_U_ADDR USRSTACK
 
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));
 
extern int
i386_register_u_addr PARAMS ((int, int));
 
#define PTRACE_ARG3_TYPE char*
 
/* make structure definitions match up with those expected in solib.c */
#define link_object sod
#define lo_name sod_name
#define lo_library sod_library
#define lo_unused sod_reserved
#define lo_major sod_major
#define lo_minor sod_minor
#define lo_next sod_next
 
#define link_map so_map
#define lm_addr som_addr
#define lm_name som_path
#define lm_next som_next
#define lm_lop som_sod
#define lm_lob som_sodbase
#define lm_rwt som_write
#define lm_ld som_dynamic
#define lm_lpd som_spd
 
#define link_dynamic_2 section_dispatch_table
#define ld_loaded sdt_loaded
#define ld_need sdt_sods
#define ld_rules sdt_filler1
#define ld_got sdt_got
#define ld_plt sdt_plt
#define ld_rel sdt_rel
#define ld_hash sdt_hash
#define ld_stab sdt_nzlist
#define ld_stab_hash sdt_filler2
#define ld_buckets sdt_buckets
#define ld_symbols sdt_strings
#define ld_symb_size sdt_str_sz
#define ld_text sdt_text_sz
#define ld_plt_sz sdt_plt_sz
 
#define rtc_symb rt_symbol
#define rtc_sp rt_sp
#define rtc_next rt_next
 
#define ld_debug so_debug
#define ldd_version dd_version
#define ldd_in_debugger dd_in_debugger
#define ldd_sym_loaded dd_sym_loaded
#define ldd_bp_addr dd_bpt_addr
#define ldd_bp_inst dd_bpt_shadow
#define ldd_cp dd_cc
 
#define link_dynamic _dynamic
#define ld_version d_version
#define ldd d_debug
#define ld_un d_un
#define ld_2 d_sdt
 
/* Return sizeof user struct to callers in less machine dependent routines */
 
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size PARAMS ((void));
 
#endif /* NM_FREEBSD_H */
/ptx.mh
0,0 → 1,7
# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
 
XM_FILE= xm-ptx.h
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o
XM_CLIBS= -lPW -lseq
 
NAT_FILE= nm-symmetry.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.