1 /* Target-dependent definitions for OpenBSD/i386.
2 Copyright 2001 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
24 #include "i386/tm-i386.h"
26 /* OpenBSD uses the old gcc convention for struct returns. */
28 #define USE_STRUCT_CONVENTION(gcc_p, type) \
29 generic_use_struct_convention (1, type)
32 /* Support for longjmp. */
34 /* Details about jmp_buf. It's supposed to be an array of integers. */
36 #define JB_ELEMENT_SIZE 4 /* Size of elements in jmp_buf. */
37 #define JB_PC 0 /* Array index of saved PC. */
39 /* Figure out where the longjmp will land. Store the address that
40 longjmp will jump to in *ADDR, and return non-zero if successful. */
42 #define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
43 extern int get_longjmp_target (CORE_ADDR
*addr
);
46 /* Support for signal handlers. */
48 #define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
49 extern int i386bsd_in_sigtramp (CORE_ADDR pc
, char *name
);
51 /* These defines allow the recognition of sigtramps as a function name
54 FIXME: kettenis/2001-07-13: These should be added to the target
55 vector and turned into functions when we go "multi-arch". */
57 #define SIGTRAMP_START(pc) i386bsd_sigtramp_start
58 #define SIGTRAMP_END(pc) i386bsd_sigtramp_end
59 extern CORE_ADDR i386bsd_sigtramp_start
;
60 extern CORE_ADDR i386bsd_sigtramp_end
;
62 /* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
65 #define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
66 extern CORE_ADDR
i386bsd_frame_saved_pc (struct frame_info
*frame
);
69 /* Shared library support. */
71 /* Return non-zero if we are in a shared library trampoline code stub. */
73 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
74 (name && !strcmp(name, "_DYNAMIC"))
76 #endif /* tm-obsd.h */