1999-04-16 01:35:26 +00:00
|
|
|
|
/* Macro definitions for i386 running under NetBSD.
|
2000-06-02 23:15:28 +00:00
|
|
|
|
Copyright 1994, 2000 Free Software Foundation, Inc.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
|
This file is part of GDB.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
|
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.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
|
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.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
|
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. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
|
|
#ifndef TM_NBSD_H
|
|
|
|
|
#define TM_NBSD_H
|
|
|
|
|
|
2000-03-22 01:36:31 +00:00
|
|
|
|
#define HAVE_I387_REGS
|
|
|
|
|
|
2000-06-01 04:13:36 +00:00
|
|
|
|
#include "i386/tm-i386.h"
|
2000-06-02 23:15:28 +00:00
|
|
|
|
#include "config/tm-nbsd.h"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
2000-03-24 23:06:57 +00:00
|
|
|
|
extern use_struct_convention_fn i386nbsd_use_struct_convention;
|
|
|
|
|
#define USE_STRUCT_CONVENTION(gcc_p, type) \
|
|
|
|
|
i386nbsd_use_struct_convention(gcc_p, type)
|
|
|
|
|
|
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
|
#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
|
1999-07-07 20:19:36 +00:00
|
|
|
|
#define JB_PC 0 /* Setjmp()'s return PC saved here */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
|
|
/* 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 */
|
|
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
|
extern int get_longjmp_target (CORE_ADDR *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
|
|
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
|
|
|
|
|
2000-06-01 04:13:36 +00:00
|
|
|
|
|
|
|
|
|
/* Support for signal handlers. */
|
|
|
|
|
|
|
|
|
|
/* The sigtramp is above the user stack and immediately below the
|
|
|
|
|
user area. Using constants here allows for cross debugging. */
|
|
|
|
|
|
|
|
|
|
#define SIGTRAMP_START(pc) 0xbfbfdf20
|
|
|
|
|
#define SIGTRAMP_END(pc) 0xbfbfdff0
|
|
|
|
|
|
|
|
|
|
/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
|
|
|
|
|
#define SIGCONTEXT_PC_OFFSET 20
|
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
|
#endif /* TM_NBSD_H */
|