Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / binutils / gdb / i386 / tm.h
1 /* $FreeBSD: src/gnu/usr.bin/binutils/gdb/i386/tm.h,v 1.12.2.1 2000/07/06 21:56:42 obrien Exp $ */
2 /* $DragonFly: src/gnu/usr.bin/binutils/gdb/i386/Attic/tm.h,v 1.2 2003/06/17 04:25:44 dillon Exp $ */
3 /* Target macro definitions for i386 running FreeBSD
4    Copyright (C) 1997 Free Software Foundation, Inc.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
21
22 #ifndef TM_FBSD_H
23 #define TM_FBSD_H 1
24
25 #include "i386/tm-i386bsd.h"
26
27 #undef NUM_REGS
28 #define NUM_REGS 16
29
30 extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));
31
32 #define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
33
34 extern void i386_float_info PARAMS ((void));
35
36 #define FLOAT_INFO i386_float_info ()
37
38 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC")
39
40 /* Saved Pc.  Get it from sigcontext if within sigtramp.  */
41
42 extern CORE_ADDR fbsd_kern_frame_saved_pc (struct frame_info *);
43 #undef FRAME_SAVED_PC
44 #define FRAME_SAVED_PC(FRAME) \
45   (kernel_debugging ? fbsd_kern_frame_saved_pc(FRAME) : \
46   (((FRAME)->signal_handler_caller \
47     ? sigtramp_saved_pc (FRAME) \
48     : read_memory_integer ((FRAME)->frame + 4, 4)) \
49    ))
50
51 /* On FreeBSD, sigtramp has size 0x18 and is immediately below the
52    ps_strings struct which has size 0x10 and is at the top of the
53    user stack.  */
54
55 #undef SIGTRAMP_START
56 #undef SIGTRAMP_END
57 #define SIGTRAMP_START(pc)      0xbfbfdfd8
58 #define SIGTRAMP_END(pc)        0xbfbfdff0
59
60 struct objfile;
61 void freebsd_uthread_new_objfile PARAMS ((struct objfile *objfile));
62 #define target_new_objfile(OBJFILE) freebsd_uthread_new_objfile (OBJFILE)
63
64 extern char *freebsd_uthread_pid_to_str PARAMS ((int pid));
65 #define target_pid_to_str(PID) freebsd_uthread_pid_to_str (PID)
66
67 #endif  /* ifndef TM_FBSD_H */