Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Macro definitions for Power PC running embedded ABI. |
2 | Copyright 1995, 1996, 1997 Free Software Foundation, Inc. | |
3 | ||
c5aa993b | 4 | This file is part of GDB. |
c906108c | 5 | |
c5aa993b JM |
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. | |
c906108c | 10 | |
c5aa993b JM |
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. | |
c906108c | 15 | |
c5aa993b JM |
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. */ | |
c906108c SS |
20 | |
21 | #ifndef TM_PPC_EABI_H | |
22 | #define TM_PPC_EABI_H | |
23 | ||
24 | /* Use generic RS6000 definitions. */ | |
25 | #include "rs6000/tm-rs6000.h" | |
26 | /* except we want to allow single stepping */ | |
27 | #undef SOFTWARE_SINGLE_STEP_P | |
28 | #define SOFTWARE_SINGLE_STEP_P 0 | |
29 | ||
30 | #undef DEFAULT_LR_SAVE | |
31 | #define DEFAULT_LR_SAVE 4 /* eabi saves LR at 4 off of SP */ | |
32 | ||
33 | #define GDB_TARGET_POWERPC | |
34 | ||
35 | #undef PC_LOAD_SEGMENT | |
36 | #undef PROCESS_LINENUMBER_HOOK | |
37 | ||
38 | #undef TEXT_SEGMENT_BASE | |
39 | #define TEXT_SEGMENT_BASE 1 | |
40 | ||
41 | /* Say that we're using ELF, not XCOFF. */ | |
42 | #define ELF_OBJECT_FORMAT 1 | |
43 | ||
44 | #define TARGET_BYTE_ORDER_SELECTABLE_P 1 | |
45 | ||
46 | /* return true if a given `pc' value is in `call dummy' function. */ | |
47 | /* FIXME: This just checks for the end of the stack, which is broken | |
48 | for things like stepping through gcc nested function stubs. */ | |
49 | #undef PC_IN_CALL_DUMMY | |
c906108c SS |
50 | |
51 | /* generic dummy frame stuff */ | |
52 | ||
53 | ||
54 | ||
55 | /* target-specific dummy_frame stuff */ | |
56 | ||
c5aa993b | 57 | extern struct frame_info *rs6000_pop_frame PARAMS ((struct frame_info * frame)); |
c906108c SS |
58 | |
59 | extern CORE_ADDR ppc_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR)); | |
c906108c SS |
60 | |
61 | #undef PUSH_DUMMY_FRAME | |
62 | #define PUSH_DUMMY_FRAME generic_push_dummy_frame () | |
63 | ||
64 | #define PUSH_RETURN_ADDRESS(PC, SP) ppc_push_return_address (PC, SP) | |
65 | ||
66 | /* override the standard get_saved_register function with | |
67 | one that takes account of generic CALL_DUMMY frames */ | |
7a292a7a SS |
68 | #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \ |
69 | generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) | |
c906108c | 70 | |
7a292a7a | 71 | #define USE_GENERIC_DUMMY_FRAMES 1 |
c906108c SS |
72 | #define CALL_DUMMY_BREAKPOINT_OFFSET (0) |
73 | #define CALL_DUMMY_LOCATION AT_ENTRY_POINT | |
74 | #define CALL_DUMMY_ADDRESS() entry_point_address () | |
75 | #undef CALL_DUMMY_START_OFFSET | |
76 | #define CALL_DUMMY_START_OFFSET 0 | |
77 | ||
dfcd3bfb JM |
78 | /* The value of symbols of type N_SO and N_FUN maybe null when |
79 | it shouldn't be. */ | |
80 | #define SOFUN_ADDRESS_MAYBE_MISSING | |
c906108c SS |
81 | |
82 | #endif /* TM_PPC_EABI_H */ |