1999-04-16 09:35:26 +08:00
|
|
|
|
/* Macro definitions for i386 running under NetBSD.
|
2002-01-06 02:36:32 +08:00
|
|
|
|
Copyright 1994, 1996, 2000, 2002 Free Software Foundation, Inc.
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
1999-07-08 04:19:36 +08:00
|
|
|
|
This file is part of GDB.
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
1999-07-08 04:19:36 +08: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 09:35:26 +08:00
|
|
|
|
|
1999-07-08 04:19:36 +08: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 09:35:26 +08:00
|
|
|
|
|
1999-07-08 04:19:36 +08: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 09:35:26 +08:00
|
|
|
|
|
|
|
|
|
#ifndef TM_NBSD_H
|
|
|
|
|
#define TM_NBSD_H
|
|
|
|
|
|
2000-03-22 09:36:31 +08:00
|
|
|
|
#define HAVE_I387_REGS
|
2002-01-06 02:36:32 +08:00
|
|
|
|
#define HAVE_SSE_REGS
|
2000-03-22 09:36:31 +08:00
|
|
|
|
|
2000-06-01 12:13:36 +08:00
|
|
|
|
#include "i386/tm-i386.h"
|
2000-06-03 07:15:28 +08:00
|
|
|
|
#include "config/tm-nbsd.h"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
2000-03-25 07:06:57 +08: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 09:35:26 +08:00
|
|
|
|
#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
|
1999-07-08 04:19:36 +08:00
|
|
|
|
#define JB_PC 0 /* Setjmp()'s return PC saved here */
|
1999-04-16 09:35:26 +08: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 09:12:42 +08:00
|
|
|
|
extern int get_longjmp_target (CORE_ADDR *);
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
|
|
#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
|
|
|
|
|
|
2000-06-01 12:13:36 +08:00
|
|
|
|
|
|
|
|
|
/* Support for signal handlers. */
|
|
|
|
|
|
2002-01-06 02:36:32 +08:00
|
|
|
|
#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
|
|
|
|
|
extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
|
2000-06-01 12:13:36 +08:00
|
|
|
|
|
2002-01-06 02:36:32 +08:00
|
|
|
|
/* These defines allow the recognition of sigtramps as a function name
|
|
|
|
|
<sigtramp>.
|
2000-06-01 12:13:36 +08:00
|
|
|
|
|
2002-01-06 02:36:32 +08:00
|
|
|
|
FIXME: kettenis/2001-07-13: These should be added to the target
|
|
|
|
|
vector and turned into functions when we go "multi-arch". */
|
|
|
|
|
|
|
|
|
|
#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
|
|
|
|
|
#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
|
|
|
|
|
extern CORE_ADDR i386bsd_sigtramp_start;
|
|
|
|
|
extern CORE_ADDR i386bsd_sigtramp_end;
|
|
|
|
|
|
|
|
|
|
/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
|
|
|
|
|
|
|
|
|
|
#undef FRAME_SAVED_PC
|
|
|
|
|
#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
|
|
|
|
|
extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
|
2000-06-01 12:13:36 +08:00
|
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
|
#endif /* TM_NBSD_H */
|