1997-01-15 22:37:09 +00:00
|
|
|
/* Macro definitions for x86 running under FreeBSD Unix.
|
|
|
|
Copyright 1996 Free Software Foundation, Inc.
|
1994-06-10 13:42:18 +00:00
|
|
|
|
|
|
|
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
|
1997-01-15 22:37:09 +00:00
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
#ifndef TM_FBSD_H
|
|
|
|
#define TM_FBSD_H 1
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
#include "i386/tm-i386bsd.h"
|
1994-06-10 13:42:18 +00:00
|
|
|
|
|
|
|
#undef NUM_REGS
|
1995-01-06 14:52:06 +00:00
|
|
|
#define NUM_REGS 14
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
|
|
|
|
|
|
|
|
extern void i386_float_info PARAMS ((void));
|
|
|
|
|
|
|
|
#define FLOAT_INFO i386_float_info ()
|
|
|
|
|
|
|
|
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC")
|
1994-06-10 13:42:18 +00:00
|
|
|
|
|
|
|
/* 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. */
|
1997-01-15 22:37:09 +00:00
|
|
|
|
1996-10-29 21:52:21 +00:00
|
|
|
extern CORE_ADDR fbsd_kern_frame_chain (struct frame_info *);
|
1997-01-15 22:37:09 +00:00
|
|
|
#undef FRAME_CHAIN
|
1994-06-10 13:42:18 +00:00
|
|
|
#define FRAME_CHAIN(thisframe) \
|
1996-10-29 21:52:21 +00:00
|
|
|
(kernel_debugging ? fbsd_kern_frame_chain(thisframe) : \
|
|
|
|
((thisframe)->signal_handler_caller \
|
|
|
|
? (thisframe)->frame \
|
1994-06-10 13:42:18 +00:00
|
|
|
: (!inside_entry_file ((thisframe)->pc) \
|
|
|
|
? read_memory_integer ((thisframe)->frame, 4) \
|
1996-10-29 21:52:21 +00:00
|
|
|
: 0)))
|
1994-06-10 13:42:18 +00:00
|
|
|
|
|
|
|
/* Saved Pc. Get it from sigcontext if within sigtramp. */
|
|
|
|
|
1996-10-29 21:52:21 +00:00
|
|
|
extern CORE_ADDR fbsd_kern_frame_saved_pc (struct frame_info *);
|
1997-01-15 22:37:09 +00:00
|
|
|
#undef FRAME_SAVED_PC
|
1994-06-10 13:42:18 +00:00
|
|
|
#define FRAME_SAVED_PC(FRAME) \
|
1996-10-29 21:52:21 +00:00
|
|
|
(kernel_debugging ? fbsd_kern_frame_saved_pc(FRAME) : \
|
1994-06-10 13:42:18 +00:00
|
|
|
(((FRAME)->signal_handler_caller \
|
|
|
|
? sigtramp_saved_pc (FRAME) \
|
|
|
|
: read_memory_integer ((FRAME)->frame + 4, 4)) \
|
1996-10-29 21:52:21 +00:00
|
|
|
))
|
1995-01-17 13:52:39 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
#endif /* TM_FBSD_H */
|