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