| 1 |
1181 |
sfurman |
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
|
| 2 |
|
|
|
| 3 |
|
|
/* Dynamic architecture support for GDB, the GNU debugger.
|
| 4 |
|
|
Copyright 1998, 1999, 2000, 2001, 2002 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., 59 Temple Place - Suite 330,
|
| 21 |
|
|
Boston, MA 02111-1307, USA. */
|
| 22 |
|
|
|
| 23 |
|
|
/* This file was created with the aid of ``gdbarch.sh''.
|
| 24 |
|
|
|
| 25 |
|
|
The Bourne shell script ``gdbarch.sh'' creates the files
|
| 26 |
|
|
``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
|
| 27 |
|
|
against the existing ``gdbarch.[hc]''. Any differences found
|
| 28 |
|
|
being reported.
|
| 29 |
|
|
|
| 30 |
|
|
If editing this file, please also run gdbarch.sh and merge any
|
| 31 |
|
|
changes into that script. Conversely, when making sweeping changes
|
| 32 |
|
|
to this file, modifying gdbarch.sh and using its output may prove
|
| 33 |
|
|
easier. */
|
| 34 |
|
|
|
| 35 |
|
|
#ifndef GDBARCH_H
|
| 36 |
|
|
#define GDBARCH_H
|
| 37 |
|
|
|
| 38 |
|
|
#include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
|
| 39 |
|
|
#if !GDB_MULTI_ARCH
|
| 40 |
|
|
/* Pull in function declarations refered to, indirectly, via macros. */
|
| 41 |
|
|
#include "value.h" /* For default_coerce_float_to_double which is referenced by a macro. */
|
| 42 |
|
|
#include "inferior.h" /* For unsigned_address_to_pointer(). */
|
| 43 |
|
|
#endif
|
| 44 |
|
|
|
| 45 |
|
|
struct frame_info;
|
| 46 |
|
|
struct value;
|
| 47 |
|
|
struct objfile;
|
| 48 |
|
|
struct minimal_symbol;
|
| 49 |
|
|
struct regcache;
|
| 50 |
|
|
|
| 51 |
|
|
extern struct gdbarch *current_gdbarch;
|
| 52 |
|
|
|
| 53 |
|
|
|
| 54 |
|
|
/* If any of the following are defined, the target wasn't correctly
|
| 55 |
|
|
converted. */
|
| 56 |
|
|
|
| 57 |
|
|
#if GDB_MULTI_ARCH
|
| 58 |
|
|
#if defined (EXTRA_FRAME_INFO)
|
| 59 |
|
|
#error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info"
|
| 60 |
|
|
#endif
|
| 61 |
|
|
#endif
|
| 62 |
|
|
|
| 63 |
|
|
#if GDB_MULTI_ARCH
|
| 64 |
|
|
#if defined (FRAME_FIND_SAVED_REGS)
|
| 65 |
|
|
#error "FRAME_FIND_SAVED_REGS: replaced by FRAME_INIT_SAVED_REGS"
|
| 66 |
|
|
#endif
|
| 67 |
|
|
#endif
|
| 68 |
|
|
|
| 69 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
|
| 70 |
|
|
#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
|
| 71 |
|
|
#endif
|
| 72 |
|
|
|
| 73 |
|
|
|
| 74 |
|
|
/* The following are pre-initialized by GDBARCH. */
|
| 75 |
|
|
|
| 76 |
|
|
extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
|
| 77 |
|
|
/* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
|
| 78 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
|
| 79 |
|
|
#error "Non multi-arch definition of TARGET_ARCHITECTURE"
|
| 80 |
|
|
#endif
|
| 81 |
|
|
#if GDB_MULTI_ARCH
|
| 82 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
|
| 83 |
|
|
#define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
|
| 84 |
|
|
#endif
|
| 85 |
|
|
#endif
|
| 86 |
|
|
|
| 87 |
|
|
extern int gdbarch_byte_order (struct gdbarch *gdbarch);
|
| 88 |
|
|
/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
|
| 89 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
|
| 90 |
|
|
#error "Non multi-arch definition of TARGET_BYTE_ORDER"
|
| 91 |
|
|
#endif
|
| 92 |
|
|
#if GDB_MULTI_ARCH
|
| 93 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
|
| 94 |
|
|
#define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
|
| 95 |
|
|
#endif
|
| 96 |
|
|
#endif
|
| 97 |
|
|
|
| 98 |
|
|
|
| 99 |
|
|
/* The following are initialized by the target dependent code. */
|
| 100 |
|
|
|
| 101 |
|
|
/* Number of bits in a char or unsigned char for the target machine.
|
| 102 |
|
|
Just like CHAR_BIT in <limits.h> but describes the target machine.
|
| 103 |
|
|
v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
|
| 104 |
|
|
|
| 105 |
|
|
Number of bits in a short or unsigned short for the target machine. */
|
| 106 |
|
|
|
| 107 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 108 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT)
|
| 109 |
|
|
#define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT)
|
| 110 |
|
|
#endif
|
| 111 |
|
|
|
| 112 |
|
|
extern int gdbarch_short_bit (struct gdbarch *gdbarch);
|
| 113 |
|
|
extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
|
| 114 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
|
| 115 |
|
|
#error "Non multi-arch definition of TARGET_SHORT_BIT"
|
| 116 |
|
|
#endif
|
| 117 |
|
|
#if GDB_MULTI_ARCH
|
| 118 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
|
| 119 |
|
|
#define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
|
| 120 |
|
|
#endif
|
| 121 |
|
|
#endif
|
| 122 |
|
|
|
| 123 |
|
|
/* Number of bits in an int or unsigned int for the target machine. */
|
| 124 |
|
|
|
| 125 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 126 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT)
|
| 127 |
|
|
#define TARGET_INT_BIT (4*TARGET_CHAR_BIT)
|
| 128 |
|
|
#endif
|
| 129 |
|
|
|
| 130 |
|
|
extern int gdbarch_int_bit (struct gdbarch *gdbarch);
|
| 131 |
|
|
extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
|
| 132 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
|
| 133 |
|
|
#error "Non multi-arch definition of TARGET_INT_BIT"
|
| 134 |
|
|
#endif
|
| 135 |
|
|
#if GDB_MULTI_ARCH
|
| 136 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
|
| 137 |
|
|
#define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
|
| 138 |
|
|
#endif
|
| 139 |
|
|
#endif
|
| 140 |
|
|
|
| 141 |
|
|
/* Number of bits in a long or unsigned long for the target machine. */
|
| 142 |
|
|
|
| 143 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 144 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT)
|
| 145 |
|
|
#define TARGET_LONG_BIT (4*TARGET_CHAR_BIT)
|
| 146 |
|
|
#endif
|
| 147 |
|
|
|
| 148 |
|
|
extern int gdbarch_long_bit (struct gdbarch *gdbarch);
|
| 149 |
|
|
extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
|
| 150 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
|
| 151 |
|
|
#error "Non multi-arch definition of TARGET_LONG_BIT"
|
| 152 |
|
|
#endif
|
| 153 |
|
|
#if GDB_MULTI_ARCH
|
| 154 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
|
| 155 |
|
|
#define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
|
| 156 |
|
|
#endif
|
| 157 |
|
|
#endif
|
| 158 |
|
|
|
| 159 |
|
|
/* Number of bits in a long long or unsigned long long for the target
|
| 160 |
|
|
machine. */
|
| 161 |
|
|
|
| 162 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 163 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT)
|
| 164 |
|
|
#define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT)
|
| 165 |
|
|
#endif
|
| 166 |
|
|
|
| 167 |
|
|
extern int gdbarch_long_long_bit (struct gdbarch *gdbarch);
|
| 168 |
|
|
extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit);
|
| 169 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
|
| 170 |
|
|
#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
|
| 171 |
|
|
#endif
|
| 172 |
|
|
#if GDB_MULTI_ARCH
|
| 173 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
|
| 174 |
|
|
#define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
|
| 175 |
|
|
#endif
|
| 176 |
|
|
#endif
|
| 177 |
|
|
|
| 178 |
|
|
/* Number of bits in a float for the target machine. */
|
| 179 |
|
|
|
| 180 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 181 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT)
|
| 182 |
|
|
#define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT)
|
| 183 |
|
|
#endif
|
| 184 |
|
|
|
| 185 |
|
|
extern int gdbarch_float_bit (struct gdbarch *gdbarch);
|
| 186 |
|
|
extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
|
| 187 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
|
| 188 |
|
|
#error "Non multi-arch definition of TARGET_FLOAT_BIT"
|
| 189 |
|
|
#endif
|
| 190 |
|
|
#if GDB_MULTI_ARCH
|
| 191 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
|
| 192 |
|
|
#define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
|
| 193 |
|
|
#endif
|
| 194 |
|
|
#endif
|
| 195 |
|
|
|
| 196 |
|
|
/* Number of bits in a double for the target machine. */
|
| 197 |
|
|
|
| 198 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 199 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT)
|
| 200 |
|
|
#define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT)
|
| 201 |
|
|
#endif
|
| 202 |
|
|
|
| 203 |
|
|
extern int gdbarch_double_bit (struct gdbarch *gdbarch);
|
| 204 |
|
|
extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
|
| 205 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
|
| 206 |
|
|
#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
|
| 207 |
|
|
#endif
|
| 208 |
|
|
#if GDB_MULTI_ARCH
|
| 209 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
|
| 210 |
|
|
#define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
|
| 211 |
|
|
#endif
|
| 212 |
|
|
#endif
|
| 213 |
|
|
|
| 214 |
|
|
/* Number of bits in a long double for the target machine. */
|
| 215 |
|
|
|
| 216 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 217 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT)
|
| 218 |
|
|
#define TARGET_LONG_DOUBLE_BIT (8*TARGET_CHAR_BIT)
|
| 219 |
|
|
#endif
|
| 220 |
|
|
|
| 221 |
|
|
extern int gdbarch_long_double_bit (struct gdbarch *gdbarch);
|
| 222 |
|
|
extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit);
|
| 223 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
|
| 224 |
|
|
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
|
| 225 |
|
|
#endif
|
| 226 |
|
|
#if GDB_MULTI_ARCH
|
| 227 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
|
| 228 |
|
|
#define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
|
| 229 |
|
|
#endif
|
| 230 |
|
|
#endif
|
| 231 |
|
|
|
| 232 |
|
|
/* For most targets, a pointer on the target and its representation as an
|
| 233 |
|
|
address in GDB have the same size and "look the same". For such a
|
| 234 |
|
|
target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
|
| 235 |
|
|
/ addr_bit will be set from it.
|
| 236 |
|
|
|
| 237 |
|
|
If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
|
| 238 |
|
|
also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
|
| 239 |
|
|
|
| 240 |
|
|
ptr_bit is the size of a pointer on the target */
|
| 241 |
|
|
|
| 242 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 243 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT)
|
| 244 |
|
|
#define TARGET_PTR_BIT (TARGET_INT_BIT)
|
| 245 |
|
|
#endif
|
| 246 |
|
|
|
| 247 |
|
|
extern int gdbarch_ptr_bit (struct gdbarch *gdbarch);
|
| 248 |
|
|
extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
|
| 249 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
|
| 250 |
|
|
#error "Non multi-arch definition of TARGET_PTR_BIT"
|
| 251 |
|
|
#endif
|
| 252 |
|
|
#if GDB_MULTI_ARCH
|
| 253 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
|
| 254 |
|
|
#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
|
| 255 |
|
|
#endif
|
| 256 |
|
|
#endif
|
| 257 |
|
|
|
| 258 |
|
|
/* addr_bit is the size of a target address as represented in gdb */
|
| 259 |
|
|
|
| 260 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 261 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT)
|
| 262 |
|
|
#define TARGET_ADDR_BIT (TARGET_PTR_BIT)
|
| 263 |
|
|
#endif
|
| 264 |
|
|
|
| 265 |
|
|
extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
|
| 266 |
|
|
extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
|
| 267 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
|
| 268 |
|
|
#error "Non multi-arch definition of TARGET_ADDR_BIT"
|
| 269 |
|
|
#endif
|
| 270 |
|
|
#if GDB_MULTI_ARCH
|
| 271 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
|
| 272 |
|
|
#define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
|
| 273 |
|
|
#endif
|
| 274 |
|
|
#endif
|
| 275 |
|
|
|
| 276 |
|
|
/* Number of bits in a BFD_VMA for the target object file format. */
|
| 277 |
|
|
|
| 278 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 279 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT)
|
| 280 |
|
|
#define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address)
|
| 281 |
|
|
#endif
|
| 282 |
|
|
|
| 283 |
|
|
extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
|
| 284 |
|
|
extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
|
| 285 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
|
| 286 |
|
|
#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
|
| 287 |
|
|
#endif
|
| 288 |
|
|
#if GDB_MULTI_ARCH
|
| 289 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
|
| 290 |
|
|
#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
|
| 291 |
|
|
#endif
|
| 292 |
|
|
#endif
|
| 293 |
|
|
|
| 294 |
|
|
/* One if `char' acts like `signed char', zero if `unsigned char'. */
|
| 295 |
|
|
|
| 296 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 297 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED)
|
| 298 |
|
|
#define TARGET_CHAR_SIGNED (1)
|
| 299 |
|
|
#endif
|
| 300 |
|
|
|
| 301 |
|
|
extern int gdbarch_char_signed (struct gdbarch *gdbarch);
|
| 302 |
|
|
extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
|
| 303 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
|
| 304 |
|
|
#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
|
| 305 |
|
|
#endif
|
| 306 |
|
|
#if GDB_MULTI_ARCH
|
| 307 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED)
|
| 308 |
|
|
#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
|
| 309 |
|
|
#endif
|
| 310 |
|
|
#endif
|
| 311 |
|
|
|
| 312 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 313 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
|
| 314 |
|
|
#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid))
|
| 315 |
|
|
#endif
|
| 316 |
|
|
|
| 317 |
|
|
typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
|
| 318 |
|
|
extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid);
|
| 319 |
|
|
extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc);
|
| 320 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
|
| 321 |
|
|
#error "Non multi-arch definition of TARGET_READ_PC"
|
| 322 |
|
|
#endif
|
| 323 |
|
|
#if GDB_MULTI_ARCH
|
| 324 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
|
| 325 |
|
|
#define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
|
| 326 |
|
|
#endif
|
| 327 |
|
|
#endif
|
| 328 |
|
|
|
| 329 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 330 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
|
| 331 |
|
|
#define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid))
|
| 332 |
|
|
#endif
|
| 333 |
|
|
|
| 334 |
|
|
typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid);
|
| 335 |
|
|
extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid);
|
| 336 |
|
|
extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc);
|
| 337 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
|
| 338 |
|
|
#error "Non multi-arch definition of TARGET_WRITE_PC"
|
| 339 |
|
|
#endif
|
| 340 |
|
|
#if GDB_MULTI_ARCH
|
| 341 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
|
| 342 |
|
|
#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
|
| 343 |
|
|
#endif
|
| 344 |
|
|
#endif
|
| 345 |
|
|
|
| 346 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 347 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_FP)
|
| 348 |
|
|
#define TARGET_READ_FP() (generic_target_read_fp ())
|
| 349 |
|
|
#endif
|
| 350 |
|
|
|
| 351 |
|
|
typedef CORE_ADDR (gdbarch_read_fp_ftype) (void);
|
| 352 |
|
|
extern CORE_ADDR gdbarch_read_fp (struct gdbarch *gdbarch);
|
| 353 |
|
|
extern void set_gdbarch_read_fp (struct gdbarch *gdbarch, gdbarch_read_fp_ftype *read_fp);
|
| 354 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP)
|
| 355 |
|
|
#error "Non multi-arch definition of TARGET_READ_FP"
|
| 356 |
|
|
#endif
|
| 357 |
|
|
#if GDB_MULTI_ARCH
|
| 358 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP)
|
| 359 |
|
|
#define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch))
|
| 360 |
|
|
#endif
|
| 361 |
|
|
#endif
|
| 362 |
|
|
|
| 363 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 364 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
|
| 365 |
|
|
#define TARGET_READ_SP() (generic_target_read_sp ())
|
| 366 |
|
|
#endif
|
| 367 |
|
|
|
| 368 |
|
|
typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
|
| 369 |
|
|
extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
|
| 370 |
|
|
extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
|
| 371 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
|
| 372 |
|
|
#error "Non multi-arch definition of TARGET_READ_SP"
|
| 373 |
|
|
#endif
|
| 374 |
|
|
#if GDB_MULTI_ARCH
|
| 375 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
|
| 376 |
|
|
#define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
|
| 377 |
|
|
#endif
|
| 378 |
|
|
#endif
|
| 379 |
|
|
|
| 380 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 381 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_SP)
|
| 382 |
|
|
#define TARGET_WRITE_SP(val) (generic_target_write_sp (val))
|
| 383 |
|
|
#endif
|
| 384 |
|
|
|
| 385 |
|
|
typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val);
|
| 386 |
|
|
extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
|
| 387 |
|
|
extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp);
|
| 388 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
|
| 389 |
|
|
#error "Non multi-arch definition of TARGET_WRITE_SP"
|
| 390 |
|
|
#endif
|
| 391 |
|
|
#if GDB_MULTI_ARCH
|
| 392 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
|
| 393 |
|
|
#define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
|
| 394 |
|
|
#endif
|
| 395 |
|
|
#endif
|
| 396 |
|
|
|
| 397 |
|
|
/* Function for getting target's idea of a frame pointer. FIXME: GDB's
|
| 398 |
|
|
whole scheme for dealing with "frames" and "frame pointers" needs a
|
| 399 |
|
|
serious shakedown. */
|
| 400 |
|
|
|
| 401 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 402 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER)
|
| 403 |
|
|
#define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset))
|
| 404 |
|
|
#endif
|
| 405 |
|
|
|
| 406 |
|
|
typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
|
| 407 |
|
|
extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
|
| 408 |
|
|
extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
|
| 409 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
|
| 410 |
|
|
#error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
|
| 411 |
|
|
#endif
|
| 412 |
|
|
#if GDB_MULTI_ARCH
|
| 413 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_VIRTUAL_FRAME_POINTER)
|
| 414 |
|
|
#define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
|
| 415 |
|
|
#endif
|
| 416 |
|
|
#endif
|
| 417 |
|
|
|
| 418 |
|
|
extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
|
| 419 |
|
|
|
| 420 |
|
|
typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
|
| 421 |
|
|
extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
|
| 422 |
|
|
extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
|
| 423 |
|
|
|
| 424 |
|
|
extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
|
| 425 |
|
|
|
| 426 |
|
|
typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
|
| 427 |
|
|
extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
|
| 428 |
|
|
extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
|
| 429 |
|
|
|
| 430 |
|
|
extern int gdbarch_num_regs (struct gdbarch *gdbarch);
|
| 431 |
|
|
extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
|
| 432 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
|
| 433 |
|
|
#error "Non multi-arch definition of NUM_REGS"
|
| 434 |
|
|
#endif
|
| 435 |
|
|
#if GDB_MULTI_ARCH
|
| 436 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
|
| 437 |
|
|
#define NUM_REGS (gdbarch_num_regs (current_gdbarch))
|
| 438 |
|
|
#endif
|
| 439 |
|
|
#endif
|
| 440 |
|
|
|
| 441 |
|
|
/* This macro gives the number of pseudo-registers that live in the
|
| 442 |
|
|
register namespace but do not get fetched or stored on the target.
|
| 443 |
|
|
These pseudo-registers may be aliases for other registers,
|
| 444 |
|
|
combinations of other registers, or they may be computed by GDB. */
|
| 445 |
|
|
|
| 446 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 447 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
|
| 448 |
|
|
#define NUM_PSEUDO_REGS (0)
|
| 449 |
|
|
#endif
|
| 450 |
|
|
|
| 451 |
|
|
extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
|
| 452 |
|
|
extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
|
| 453 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
|
| 454 |
|
|
#error "Non multi-arch definition of NUM_PSEUDO_REGS"
|
| 455 |
|
|
#endif
|
| 456 |
|
|
#if GDB_MULTI_ARCH
|
| 457 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
|
| 458 |
|
|
#define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
|
| 459 |
|
|
#endif
|
| 460 |
|
|
#endif
|
| 461 |
|
|
|
| 462 |
|
|
/* GDB's standard (or well known) register numbers. These can map onto
|
| 463 |
|
|
a real register or a pseudo (computed) register or not be defined at
|
| 464 |
|
|
all (-1). */
|
| 465 |
|
|
|
| 466 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 467 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
|
| 468 |
|
|
#define SP_REGNUM (-1)
|
| 469 |
|
|
#endif
|
| 470 |
|
|
|
| 471 |
|
|
extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
|
| 472 |
|
|
extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
|
| 473 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
|
| 474 |
|
|
#error "Non multi-arch definition of SP_REGNUM"
|
| 475 |
|
|
#endif
|
| 476 |
|
|
#if GDB_MULTI_ARCH
|
| 477 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
|
| 478 |
|
|
#define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
|
| 479 |
|
|
#endif
|
| 480 |
|
|
#endif
|
| 481 |
|
|
|
| 482 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 483 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (FP_REGNUM)
|
| 484 |
|
|
#define FP_REGNUM (-1)
|
| 485 |
|
|
#endif
|
| 486 |
|
|
|
| 487 |
|
|
extern int gdbarch_fp_regnum (struct gdbarch *gdbarch);
|
| 488 |
|
|
extern void set_gdbarch_fp_regnum (struct gdbarch *gdbarch, int fp_regnum);
|
| 489 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM)
|
| 490 |
|
|
#error "Non multi-arch definition of FP_REGNUM"
|
| 491 |
|
|
#endif
|
| 492 |
|
|
#if GDB_MULTI_ARCH
|
| 493 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM)
|
| 494 |
|
|
#define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch))
|
| 495 |
|
|
#endif
|
| 496 |
|
|
#endif
|
| 497 |
|
|
|
| 498 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 499 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
|
| 500 |
|
|
#define PC_REGNUM (-1)
|
| 501 |
|
|
#endif
|
| 502 |
|
|
|
| 503 |
|
|
extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
|
| 504 |
|
|
extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
|
| 505 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
|
| 506 |
|
|
#error "Non multi-arch definition of PC_REGNUM"
|
| 507 |
|
|
#endif
|
| 508 |
|
|
#if GDB_MULTI_ARCH
|
| 509 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
|
| 510 |
|
|
#define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
|
| 511 |
|
|
#endif
|
| 512 |
|
|
#endif
|
| 513 |
|
|
|
| 514 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 515 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
|
| 516 |
|
|
#define PS_REGNUM (-1)
|
| 517 |
|
|
#endif
|
| 518 |
|
|
|
| 519 |
|
|
extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
|
| 520 |
|
|
extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
|
| 521 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
|
| 522 |
|
|
#error "Non multi-arch definition of PS_REGNUM"
|
| 523 |
|
|
#endif
|
| 524 |
|
|
#if GDB_MULTI_ARCH
|
| 525 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM)
|
| 526 |
|
|
#define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
|
| 527 |
|
|
#endif
|
| 528 |
|
|
#endif
|
| 529 |
|
|
|
| 530 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 531 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
|
| 532 |
|
|
#define FP0_REGNUM (-1)
|
| 533 |
|
|
#endif
|
| 534 |
|
|
|
| 535 |
|
|
extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
|
| 536 |
|
|
extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
|
| 537 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
|
| 538 |
|
|
#error "Non multi-arch definition of FP0_REGNUM"
|
| 539 |
|
|
#endif
|
| 540 |
|
|
#if GDB_MULTI_ARCH
|
| 541 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
|
| 542 |
|
|
#define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
|
| 543 |
|
|
#endif
|
| 544 |
|
|
#endif
|
| 545 |
|
|
|
| 546 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 547 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
|
| 548 |
|
|
#define NPC_REGNUM (-1)
|
| 549 |
|
|
#endif
|
| 550 |
|
|
|
| 551 |
|
|
extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
|
| 552 |
|
|
extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
|
| 553 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
|
| 554 |
|
|
#error "Non multi-arch definition of NPC_REGNUM"
|
| 555 |
|
|
#endif
|
| 556 |
|
|
#if GDB_MULTI_ARCH
|
| 557 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
|
| 558 |
|
|
#define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
|
| 559 |
|
|
#endif
|
| 560 |
|
|
#endif
|
| 561 |
|
|
|
| 562 |
|
|
/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
|
| 563 |
|
|
|
| 564 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 565 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
|
| 566 |
|
|
#define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
|
| 567 |
|
|
#endif
|
| 568 |
|
|
|
| 569 |
|
|
typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
|
| 570 |
|
|
extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
|
| 571 |
|
|
extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
|
| 572 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
|
| 573 |
|
|
#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
|
| 574 |
|
|
#endif
|
| 575 |
|
|
#if GDB_MULTI_ARCH
|
| 576 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
|
| 577 |
|
|
#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
|
| 578 |
|
|
#endif
|
| 579 |
|
|
#endif
|
| 580 |
|
|
|
| 581 |
|
|
/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
|
| 582 |
|
|
|
| 583 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 584 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
|
| 585 |
|
|
#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
|
| 586 |
|
|
#endif
|
| 587 |
|
|
|
| 588 |
|
|
typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
|
| 589 |
|
|
extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
|
| 590 |
|
|
extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
|
| 591 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
|
| 592 |
|
|
#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
|
| 593 |
|
|
#endif
|
| 594 |
|
|
#if GDB_MULTI_ARCH
|
| 595 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
|
| 596 |
|
|
#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
|
| 597 |
|
|
#endif
|
| 598 |
|
|
#endif
|
| 599 |
|
|
|
| 600 |
|
|
/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
|
| 601 |
|
|
|
| 602 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 603 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
|
| 604 |
|
|
#define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
|
| 605 |
|
|
#endif
|
| 606 |
|
|
|
| 607 |
|
|
typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
|
| 608 |
|
|
extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
|
| 609 |
|
|
extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
|
| 610 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
|
| 611 |
|
|
#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
|
| 612 |
|
|
#endif
|
| 613 |
|
|
#if GDB_MULTI_ARCH
|
| 614 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
|
| 615 |
|
|
#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
|
| 616 |
|
|
#endif
|
| 617 |
|
|
#endif
|
| 618 |
|
|
|
| 619 |
|
|
/* Convert from an sdb register number to an internal gdb register number.
|
| 620 |
|
|
This should be defined in tm.h, if REGISTER_NAMES is not set up
|
| 621 |
|
|
to map one to one onto the sdb register numbers. */
|
| 622 |
|
|
|
| 623 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 624 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
|
| 625 |
|
|
#define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
|
| 626 |
|
|
#endif
|
| 627 |
|
|
|
| 628 |
|
|
typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
|
| 629 |
|
|
extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
|
| 630 |
|
|
extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
|
| 631 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
|
| 632 |
|
|
#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
|
| 633 |
|
|
#endif
|
| 634 |
|
|
#if GDB_MULTI_ARCH
|
| 635 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
|
| 636 |
|
|
#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
|
| 637 |
|
|
#endif
|
| 638 |
|
|
#endif
|
| 639 |
|
|
|
| 640 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 641 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
|
| 642 |
|
|
#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
|
| 643 |
|
|
#endif
|
| 644 |
|
|
|
| 645 |
|
|
typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
|
| 646 |
|
|
extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
|
| 647 |
|
|
extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
|
| 648 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
|
| 649 |
|
|
#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
|
| 650 |
|
|
#endif
|
| 651 |
|
|
#if GDB_MULTI_ARCH
|
| 652 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
|
| 653 |
|
|
#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
|
| 654 |
|
|
#endif
|
| 655 |
|
|
#endif
|
| 656 |
|
|
|
| 657 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 658 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
|
| 659 |
|
|
#define REGISTER_NAME(regnr) (legacy_register_name (regnr))
|
| 660 |
|
|
#endif
|
| 661 |
|
|
|
| 662 |
|
|
typedef const char * (gdbarch_register_name_ftype) (int regnr);
|
| 663 |
|
|
extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
|
| 664 |
|
|
extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
|
| 665 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
|
| 666 |
|
|
#error "Non multi-arch definition of REGISTER_NAME"
|
| 667 |
|
|
#endif
|
| 668 |
|
|
#if GDB_MULTI_ARCH
|
| 669 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
|
| 670 |
|
|
#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
|
| 671 |
|
|
#endif
|
| 672 |
|
|
#endif
|
| 673 |
|
|
|
| 674 |
|
|
extern int gdbarch_register_size (struct gdbarch *gdbarch);
|
| 675 |
|
|
extern void set_gdbarch_register_size (struct gdbarch *gdbarch, int register_size);
|
| 676 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE)
|
| 677 |
|
|
#error "Non multi-arch definition of REGISTER_SIZE"
|
| 678 |
|
|
#endif
|
| 679 |
|
|
#if GDB_MULTI_ARCH
|
| 680 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIZE)
|
| 681 |
|
|
#define REGISTER_SIZE (gdbarch_register_size (current_gdbarch))
|
| 682 |
|
|
#endif
|
| 683 |
|
|
#endif
|
| 684 |
|
|
|
| 685 |
|
|
extern int gdbarch_register_bytes (struct gdbarch *gdbarch);
|
| 686 |
|
|
extern void set_gdbarch_register_bytes (struct gdbarch *gdbarch, int register_bytes);
|
| 687 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES)
|
| 688 |
|
|
#error "Non multi-arch definition of REGISTER_BYTES"
|
| 689 |
|
|
#endif
|
| 690 |
|
|
#if GDB_MULTI_ARCH
|
| 691 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES)
|
| 692 |
|
|
#define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch))
|
| 693 |
|
|
#endif
|
| 694 |
|
|
#endif
|
| 695 |
|
|
|
| 696 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 697 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
|
| 698 |
|
|
#define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
|
| 699 |
|
|
#endif
|
| 700 |
|
|
|
| 701 |
|
|
typedef int (gdbarch_register_byte_ftype) (int reg_nr);
|
| 702 |
|
|
extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
|
| 703 |
|
|
extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
|
| 704 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
|
| 705 |
|
|
#error "Non multi-arch definition of REGISTER_BYTE"
|
| 706 |
|
|
#endif
|
| 707 |
|
|
#if GDB_MULTI_ARCH
|
| 708 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
|
| 709 |
|
|
#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
|
| 710 |
|
|
#endif
|
| 711 |
|
|
#endif
|
| 712 |
|
|
|
| 713 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 714 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
|
| 715 |
|
|
#define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
|
| 716 |
|
|
#endif
|
| 717 |
|
|
|
| 718 |
|
|
typedef int (gdbarch_register_raw_size_ftype) (int reg_nr);
|
| 719 |
|
|
extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
|
| 720 |
|
|
extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size);
|
| 721 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
|
| 722 |
|
|
#error "Non multi-arch definition of REGISTER_RAW_SIZE"
|
| 723 |
|
|
#endif
|
| 724 |
|
|
#if GDB_MULTI_ARCH
|
| 725 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
|
| 726 |
|
|
#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
|
| 727 |
|
|
#endif
|
| 728 |
|
|
#endif
|
| 729 |
|
|
|
| 730 |
|
|
extern int gdbarch_max_register_raw_size (struct gdbarch *gdbarch);
|
| 731 |
|
|
extern void set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, int max_register_raw_size);
|
| 732 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE)
|
| 733 |
|
|
#error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE"
|
| 734 |
|
|
#endif
|
| 735 |
|
|
#if GDB_MULTI_ARCH
|
| 736 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE)
|
| 737 |
|
|
#define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch))
|
| 738 |
|
|
#endif
|
| 739 |
|
|
#endif
|
| 740 |
|
|
|
| 741 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 742 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
|
| 743 |
|
|
#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
|
| 744 |
|
|
#endif
|
| 745 |
|
|
|
| 746 |
|
|
typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr);
|
| 747 |
|
|
extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
|
| 748 |
|
|
extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size);
|
| 749 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
|
| 750 |
|
|
#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
|
| 751 |
|
|
#endif
|
| 752 |
|
|
#if GDB_MULTI_ARCH
|
| 753 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
|
| 754 |
|
|
#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
|
| 755 |
|
|
#endif
|
| 756 |
|
|
#endif
|
| 757 |
|
|
|
| 758 |
|
|
extern int gdbarch_max_register_virtual_size (struct gdbarch *gdbarch);
|
| 759 |
|
|
extern void set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, int max_register_virtual_size);
|
| 760 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE)
|
| 761 |
|
|
#error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE"
|
| 762 |
|
|
#endif
|
| 763 |
|
|
#if GDB_MULTI_ARCH
|
| 764 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE)
|
| 765 |
|
|
#define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch))
|
| 766 |
|
|
#endif
|
| 767 |
|
|
#endif
|
| 768 |
|
|
|
| 769 |
|
|
typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr);
|
| 770 |
|
|
extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
|
| 771 |
|
|
extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type);
|
| 772 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
|
| 773 |
|
|
#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
|
| 774 |
|
|
#endif
|
| 775 |
|
|
#if GDB_MULTI_ARCH
|
| 776 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
|
| 777 |
|
|
#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
|
| 778 |
|
|
#endif
|
| 779 |
|
|
#endif
|
| 780 |
|
|
|
| 781 |
|
|
#if defined (DO_REGISTERS_INFO)
|
| 782 |
|
|
/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */
|
| 783 |
|
|
#if !defined (DO_REGISTERS_INFO_P)
|
| 784 |
|
|
#define DO_REGISTERS_INFO_P() (1)
|
| 785 |
|
|
#endif
|
| 786 |
|
|
#endif
|
| 787 |
|
|
|
| 788 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 789 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO_P)
|
| 790 |
|
|
#define DO_REGISTERS_INFO_P() (0)
|
| 791 |
|
|
#endif
|
| 792 |
|
|
|
| 793 |
|
|
extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch);
|
| 794 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P)
|
| 795 |
|
|
#error "Non multi-arch definition of DO_REGISTERS_INFO"
|
| 796 |
|
|
#endif
|
| 797 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO_P)
|
| 798 |
|
|
#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch))
|
| 799 |
|
|
#endif
|
| 800 |
|
|
|
| 801 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 802 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO)
|
| 803 |
|
|
#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0)
|
| 804 |
|
|
#endif
|
| 805 |
|
|
|
| 806 |
|
|
typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
|
| 807 |
|
|
extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
|
| 808 |
|
|
extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
|
| 809 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO)
|
| 810 |
|
|
#error "Non multi-arch definition of DO_REGISTERS_INFO"
|
| 811 |
|
|
#endif
|
| 812 |
|
|
#if GDB_MULTI_ARCH
|
| 813 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO)
|
| 814 |
|
|
#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
|
| 815 |
|
|
#endif
|
| 816 |
|
|
#endif
|
| 817 |
|
|
|
| 818 |
|
|
typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
|
| 819 |
|
|
extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
|
| 820 |
|
|
extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
|
| 821 |
|
|
|
| 822 |
|
|
extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
|
| 823 |
|
|
|
| 824 |
|
|
typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
|
| 825 |
|
|
extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
|
| 826 |
|
|
extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
|
| 827 |
|
|
|
| 828 |
|
|
extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
|
| 829 |
|
|
|
| 830 |
|
|
typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
|
| 831 |
|
|
extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
|
| 832 |
|
|
extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
|
| 833 |
|
|
|
| 834 |
|
|
/* MAP a GDB RAW register number onto a simulator register number. See
|
| 835 |
|
|
also include/...-sim.h. */
|
| 836 |
|
|
|
| 837 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 838 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
|
| 839 |
|
|
#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
|
| 840 |
|
|
#endif
|
| 841 |
|
|
|
| 842 |
|
|
typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
|
| 843 |
|
|
extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
|
| 844 |
|
|
extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
|
| 845 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
|
| 846 |
|
|
#error "Non multi-arch definition of REGISTER_SIM_REGNO"
|
| 847 |
|
|
#endif
|
| 848 |
|
|
#if GDB_MULTI_ARCH
|
| 849 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
|
| 850 |
|
|
#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
|
| 851 |
|
|
#endif
|
| 852 |
|
|
#endif
|
| 853 |
|
|
|
| 854 |
|
|
#if defined (REGISTER_BYTES_OK)
|
| 855 |
|
|
/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
|
| 856 |
|
|
#if !defined (REGISTER_BYTES_OK_P)
|
| 857 |
|
|
#define REGISTER_BYTES_OK_P() (1)
|
| 858 |
|
|
#endif
|
| 859 |
|
|
#endif
|
| 860 |
|
|
|
| 861 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 862 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
|
| 863 |
|
|
#define REGISTER_BYTES_OK_P() (0)
|
| 864 |
|
|
#endif
|
| 865 |
|
|
|
| 866 |
|
|
extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
|
| 867 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
|
| 868 |
|
|
#error "Non multi-arch definition of REGISTER_BYTES_OK"
|
| 869 |
|
|
#endif
|
| 870 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
|
| 871 |
|
|
#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
|
| 872 |
|
|
#endif
|
| 873 |
|
|
|
| 874 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 875 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
|
| 876 |
|
|
#define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
|
| 877 |
|
|
#endif
|
| 878 |
|
|
|
| 879 |
|
|
typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
|
| 880 |
|
|
extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
|
| 881 |
|
|
extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
|
| 882 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
|
| 883 |
|
|
#error "Non multi-arch definition of REGISTER_BYTES_OK"
|
| 884 |
|
|
#endif
|
| 885 |
|
|
#if GDB_MULTI_ARCH
|
| 886 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
|
| 887 |
|
|
#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
|
| 888 |
|
|
#endif
|
| 889 |
|
|
#endif
|
| 890 |
|
|
|
| 891 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 892 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
|
| 893 |
|
|
#define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
|
| 894 |
|
|
#endif
|
| 895 |
|
|
|
| 896 |
|
|
typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
|
| 897 |
|
|
extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
|
| 898 |
|
|
extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
|
| 899 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
|
| 900 |
|
|
#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
|
| 901 |
|
|
#endif
|
| 902 |
|
|
#if GDB_MULTI_ARCH
|
| 903 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
|
| 904 |
|
|
#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
|
| 905 |
|
|
#endif
|
| 906 |
|
|
#endif
|
| 907 |
|
|
|
| 908 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 909 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
|
| 910 |
|
|
#define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
|
| 911 |
|
|
#endif
|
| 912 |
|
|
|
| 913 |
|
|
typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
|
| 914 |
|
|
extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
|
| 915 |
|
|
extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
|
| 916 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
|
| 917 |
|
|
#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
|
| 918 |
|
|
#endif
|
| 919 |
|
|
#if GDB_MULTI_ARCH
|
| 920 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
|
| 921 |
|
|
#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
|
| 922 |
|
|
#endif
|
| 923 |
|
|
#endif
|
| 924 |
|
|
|
| 925 |
|
|
/* setjmp/longjmp support. */
|
| 926 |
|
|
|
| 927 |
|
|
#if defined (GET_LONGJMP_TARGET)
|
| 928 |
|
|
/* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
|
| 929 |
|
|
#if !defined (GET_LONGJMP_TARGET_P)
|
| 930 |
|
|
#define GET_LONGJMP_TARGET_P() (1)
|
| 931 |
|
|
#endif
|
| 932 |
|
|
#endif
|
| 933 |
|
|
|
| 934 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 935 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
|
| 936 |
|
|
#define GET_LONGJMP_TARGET_P() (0)
|
| 937 |
|
|
#endif
|
| 938 |
|
|
|
| 939 |
|
|
extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
|
| 940 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
|
| 941 |
|
|
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
|
| 942 |
|
|
#endif
|
| 943 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
|
| 944 |
|
|
#define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
|
| 945 |
|
|
#endif
|
| 946 |
|
|
|
| 947 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 948 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
|
| 949 |
|
|
#define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
|
| 950 |
|
|
#endif
|
| 951 |
|
|
|
| 952 |
|
|
typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
|
| 953 |
|
|
extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
|
| 954 |
|
|
extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
|
| 955 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
|
| 956 |
|
|
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
|
| 957 |
|
|
#endif
|
| 958 |
|
|
#if GDB_MULTI_ARCH
|
| 959 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET)
|
| 960 |
|
|
#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
|
| 961 |
|
|
#endif
|
| 962 |
|
|
#endif
|
| 963 |
|
|
|
| 964 |
|
|
/* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
|
| 965 |
|
|
much better but at least they are vaguely consistent). The headers
|
| 966 |
|
|
and body contain convoluted #if/#else sequences for determine how
|
| 967 |
|
|
things should be compiled. Instead of trying to mimic that
|
| 968 |
|
|
behaviour here (and hence entrench it further) gdbarch simply
|
| 969 |
|
|
reqires that these methods be set up from the word go. This also
|
| 970 |
|
|
avoids any potential problems with moving beyond multi-arch partial. */
|
| 971 |
|
|
|
| 972 |
|
|
extern int gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch);
|
| 973 |
|
|
extern void set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, int use_generic_dummy_frames);
|
| 974 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (USE_GENERIC_DUMMY_FRAMES)
|
| 975 |
|
|
#error "Non multi-arch definition of USE_GENERIC_DUMMY_FRAMES"
|
| 976 |
|
|
#endif
|
| 977 |
|
|
#if GDB_MULTI_ARCH
|
| 978 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (USE_GENERIC_DUMMY_FRAMES)
|
| 979 |
|
|
#define USE_GENERIC_DUMMY_FRAMES (gdbarch_use_generic_dummy_frames (current_gdbarch))
|
| 980 |
|
|
#endif
|
| 981 |
|
|
#endif
|
| 982 |
|
|
|
| 983 |
|
|
extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
|
| 984 |
|
|
extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
|
| 985 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
|
| 986 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
|
| 987 |
|
|
#endif
|
| 988 |
|
|
#if GDB_MULTI_ARCH
|
| 989 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LOCATION)
|
| 990 |
|
|
#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
|
| 991 |
|
|
#endif
|
| 992 |
|
|
#endif
|
| 993 |
|
|
|
| 994 |
|
|
typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
|
| 995 |
|
|
extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
|
| 996 |
|
|
extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
|
| 997 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
|
| 998 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
|
| 999 |
|
|
#endif
|
| 1000 |
|
|
#if GDB_MULTI_ARCH
|
| 1001 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
|
| 1002 |
|
|
#define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
|
| 1003 |
|
|
#endif
|
| 1004 |
|
|
#endif
|
| 1005 |
|
|
|
| 1006 |
|
|
extern CORE_ADDR gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch);
|
| 1007 |
|
|
extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_start_offset);
|
| 1008 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET)
|
| 1009 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_START_OFFSET"
|
| 1010 |
|
|
#endif
|
| 1011 |
|
|
#if GDB_MULTI_ARCH
|
| 1012 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET)
|
| 1013 |
|
|
#define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch))
|
| 1014 |
|
|
#endif
|
| 1015 |
|
|
#endif
|
| 1016 |
|
|
|
| 1017 |
|
|
extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
|
| 1018 |
|
|
extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset);
|
| 1019 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET)
|
| 1020 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET"
|
| 1021 |
|
|
#endif
|
| 1022 |
|
|
#if GDB_MULTI_ARCH
|
| 1023 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
|
| 1024 |
|
|
#define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch))
|
| 1025 |
|
|
#endif
|
| 1026 |
|
|
#endif
|
| 1027 |
|
|
|
| 1028 |
|
|
extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch);
|
| 1029 |
|
|
extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p);
|
| 1030 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
|
| 1031 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P"
|
| 1032 |
|
|
#endif
|
| 1033 |
|
|
#if GDB_MULTI_ARCH
|
| 1034 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
|
| 1035 |
|
|
#define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch))
|
| 1036 |
|
|
#endif
|
| 1037 |
|
|
#endif
|
| 1038 |
|
|
|
| 1039 |
|
|
extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch);
|
| 1040 |
|
|
extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length);
|
| 1041 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH)
|
| 1042 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_LENGTH"
|
| 1043 |
|
|
#endif
|
| 1044 |
|
|
#if GDB_MULTI_ARCH
|
| 1045 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH)
|
| 1046 |
|
|
#define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch))
|
| 1047 |
|
|
#endif
|
| 1048 |
|
|
#endif
|
| 1049 |
|
|
|
| 1050 |
|
|
typedef int (gdbarch_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
|
| 1051 |
|
|
extern int gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
|
| 1052 |
|
|
extern void set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy);
|
| 1053 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_CALL_DUMMY)
|
| 1054 |
|
|
#error "Non multi-arch definition of PC_IN_CALL_DUMMY"
|
| 1055 |
|
|
#endif
|
| 1056 |
|
|
#if GDB_MULTI_ARCH
|
| 1057 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_CALL_DUMMY)
|
| 1058 |
|
|
#define PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
|
| 1059 |
|
|
#endif
|
| 1060 |
|
|
#endif
|
| 1061 |
|
|
|
| 1062 |
|
|
extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch);
|
| 1063 |
|
|
extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p);
|
| 1064 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
|
| 1065 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_P"
|
| 1066 |
|
|
#endif
|
| 1067 |
|
|
#if GDB_MULTI_ARCH
|
| 1068 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
|
| 1069 |
|
|
#define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
|
| 1070 |
|
|
#endif
|
| 1071 |
|
|
#endif
|
| 1072 |
|
|
|
| 1073 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 1074 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS)
|
| 1075 |
|
|
#define CALL_DUMMY_WORDS (legacy_call_dummy_words)
|
| 1076 |
|
|
#endif
|
| 1077 |
|
|
|
| 1078 |
|
|
extern LONGEST * gdbarch_call_dummy_words (struct gdbarch *gdbarch);
|
| 1079 |
|
|
extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * call_dummy_words);
|
| 1080 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
|
| 1081 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_WORDS"
|
| 1082 |
|
|
#endif
|
| 1083 |
|
|
#if GDB_MULTI_ARCH
|
| 1084 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
|
| 1085 |
|
|
#define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
|
| 1086 |
|
|
#endif
|
| 1087 |
|
|
#endif
|
| 1088 |
|
|
|
| 1089 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 1090 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS)
|
| 1091 |
|
|
#define SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
|
| 1092 |
|
|
#endif
|
| 1093 |
|
|
|
| 1094 |
|
|
extern int gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch);
|
| 1095 |
|
|
extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int sizeof_call_dummy_words);
|
| 1096 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
|
| 1097 |
|
|
#error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
|
| 1098 |
|
|
#endif
|
| 1099 |
|
|
#if GDB_MULTI_ARCH
|
| 1100 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
|
| 1101 |
|
|
#define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
|
| 1102 |
|
|
#endif
|
| 1103 |
|
|
#endif
|
| 1104 |
|
|
|
| 1105 |
|
|
extern int gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
|
| 1106 |
|
|
extern void set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, int call_dummy_stack_adjust_p);
|
| 1107 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST_P)
|
| 1108 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST_P"
|
| 1109 |
|
|
#endif
|
| 1110 |
|
|
#if GDB_MULTI_ARCH
|
| 1111 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST_P)
|
| 1112 |
|
|
#define CALL_DUMMY_STACK_ADJUST_P (gdbarch_call_dummy_stack_adjust_p (current_gdbarch))
|
| 1113 |
|
|
#endif
|
| 1114 |
|
|
#endif
|
| 1115 |
|
|
|
| 1116 |
|
|
extern int gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch);
|
| 1117 |
|
|
extern void set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, int call_dummy_stack_adjust);
|
| 1118 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST)
|
| 1119 |
|
|
#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST"
|
| 1120 |
|
|
#endif
|
| 1121 |
|
|
#if GDB_MULTI_ARCH
|
| 1122 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST)
|
| 1123 |
|
|
#define CALL_DUMMY_STACK_ADJUST (gdbarch_call_dummy_stack_adjust (current_gdbarch))
|
| 1124 |
|
|
#endif
|
| 1125 |
|
|
#endif
|
| 1126 |
|
|
|
| 1127 |
|
|
typedef void (gdbarch_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
|
| 1128 |
|
|
extern void gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
|
| 1129 |
|
|
extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy);
|
| 1130 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY)
|
| 1131 |
|
|
#error "Non multi-arch definition of FIX_CALL_DUMMY"
|
| 1132 |
|
|
#endif
|
| 1133 |
|
|
#if GDB_MULTI_ARCH
|
| 1134 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY)
|
| 1135 |
|
|
#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p))
|
| 1136 |
|
|
#endif
|
| 1137 |
|
|
#endif
|
| 1138 |
|
|
|
| 1139 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1140 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC_FIRST)
|
| 1141 |
|
|
#define INIT_FRAME_PC_FIRST(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
|
| 1142 |
|
|
#endif
|
| 1143 |
|
|
|
| 1144 |
|
|
typedef void (gdbarch_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
|
| 1145 |
|
|
extern void gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
|
| 1146 |
|
|
extern void set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_init_frame_pc_first_ftype *init_frame_pc_first);
|
| 1147 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC_FIRST)
|
| 1148 |
|
|
#error "Non multi-arch definition of INIT_FRAME_PC_FIRST"
|
| 1149 |
|
|
#endif
|
| 1150 |
|
|
#if GDB_MULTI_ARCH
|
| 1151 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC_FIRST)
|
| 1152 |
|
|
#define INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_init_frame_pc_first (current_gdbarch, fromleaf, prev))
|
| 1153 |
|
|
#endif
|
| 1154 |
|
|
#endif
|
| 1155 |
|
|
|
| 1156 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1157 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC)
|
| 1158 |
|
|
#define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_default (fromleaf, prev))
|
| 1159 |
|
|
#endif
|
| 1160 |
|
|
|
| 1161 |
|
|
typedef void (gdbarch_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
|
| 1162 |
|
|
extern void gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
|
| 1163 |
|
|
extern void set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, gdbarch_init_frame_pc_ftype *init_frame_pc);
|
| 1164 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC)
|
| 1165 |
|
|
#error "Non multi-arch definition of INIT_FRAME_PC"
|
| 1166 |
|
|
#endif
|
| 1167 |
|
|
#if GDB_MULTI_ARCH
|
| 1168 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC)
|
| 1169 |
|
|
#define INIT_FRAME_PC(fromleaf, prev) (gdbarch_init_frame_pc (current_gdbarch, fromleaf, prev))
|
| 1170 |
|
|
#endif
|
| 1171 |
|
|
#endif
|
| 1172 |
|
|
|
| 1173 |
|
|
extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
|
| 1174 |
|
|
extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
|
| 1175 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
|
| 1176 |
|
|
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
|
| 1177 |
|
|
#endif
|
| 1178 |
|
|
#if GDB_MULTI_ARCH
|
| 1179 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
|
| 1180 |
|
|
#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
|
| 1181 |
|
|
#endif
|
| 1182 |
|
|
#endif
|
| 1183 |
|
|
|
| 1184 |
|
|
extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
|
| 1185 |
|
|
extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
|
| 1186 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
|
| 1187 |
|
|
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
|
| 1188 |
|
|
#endif
|
| 1189 |
|
|
#if GDB_MULTI_ARCH
|
| 1190 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE)
|
| 1191 |
|
|
#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
|
| 1192 |
|
|
#endif
|
| 1193 |
|
|
#endif
|
| 1194 |
|
|
|
| 1195 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1196 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (COERCE_FLOAT_TO_DOUBLE)
|
| 1197 |
|
|
#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (default_coerce_float_to_double (formal, actual))
|
| 1198 |
|
|
#endif
|
| 1199 |
|
|
|
| 1200 |
|
|
typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual);
|
| 1201 |
|
|
extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual);
|
| 1202 |
|
|
extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double);
|
| 1203 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE)
|
| 1204 |
|
|
#error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE"
|
| 1205 |
|
|
#endif
|
| 1206 |
|
|
#if GDB_MULTI_ARCH
|
| 1207 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE)
|
| 1208 |
|
|
#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
|
| 1209 |
|
|
#endif
|
| 1210 |
|
|
#endif
|
| 1211 |
|
|
|
| 1212 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1213 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
|
| 1214 |
|
|
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval))
|
| 1215 |
|
|
#endif
|
| 1216 |
|
|
|
| 1217 |
|
|
typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
|
| 1218 |
|
|
extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
|
| 1219 |
|
|
extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
|
| 1220 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
|
| 1221 |
|
|
#error "Non multi-arch definition of GET_SAVED_REGISTER"
|
| 1222 |
|
|
#endif
|
| 1223 |
|
|
#if GDB_MULTI_ARCH
|
| 1224 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
|
| 1225 |
|
|
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
|
| 1226 |
|
|
#endif
|
| 1227 |
|
|
#endif
|
| 1228 |
|
|
|
| 1229 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1230 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
|
| 1231 |
|
|
#define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
|
| 1232 |
|
|
#endif
|
| 1233 |
|
|
|
| 1234 |
|
|
typedef int (gdbarch_register_convertible_ftype) (int nr);
|
| 1235 |
|
|
extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
|
| 1236 |
|
|
extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
|
| 1237 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
|
| 1238 |
|
|
#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
|
| 1239 |
|
|
#endif
|
| 1240 |
|
|
#if GDB_MULTI_ARCH
|
| 1241 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
|
| 1242 |
|
|
#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
|
| 1243 |
|
|
#endif
|
| 1244 |
|
|
#endif
|
| 1245 |
|
|
|
| 1246 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1247 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
|
| 1248 |
|
|
#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
|
| 1249 |
|
|
#endif
|
| 1250 |
|
|
|
| 1251 |
|
|
typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
|
| 1252 |
|
|
extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
|
| 1253 |
|
|
extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
|
| 1254 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
|
| 1255 |
|
|
#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
|
| 1256 |
|
|
#endif
|
| 1257 |
|
|
#if GDB_MULTI_ARCH
|
| 1258 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
|
| 1259 |
|
|
#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
|
| 1260 |
|
|
#endif
|
| 1261 |
|
|
#endif
|
| 1262 |
|
|
|
| 1263 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1264 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
|
| 1265 |
|
|
#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
|
| 1266 |
|
|
#endif
|
| 1267 |
|
|
|
| 1268 |
|
|
typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
|
| 1269 |
|
|
extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
|
| 1270 |
|
|
extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
|
| 1271 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
|
| 1272 |
|
|
#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
|
| 1273 |
|
|
#endif
|
| 1274 |
|
|
#if GDB_MULTI_ARCH
|
| 1275 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
|
| 1276 |
|
|
#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
|
| 1277 |
|
|
#endif
|
| 1278 |
|
|
#endif
|
| 1279 |
|
|
|
| 1280 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1281 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
|
| 1282 |
|
|
#define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum))
|
| 1283 |
|
|
#endif
|
| 1284 |
|
|
|
| 1285 |
|
|
typedef int (gdbarch_convert_register_p_ftype) (int regnum);
|
| 1286 |
|
|
extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum);
|
| 1287 |
|
|
extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
|
| 1288 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
|
| 1289 |
|
|
#error "Non multi-arch definition of CONVERT_REGISTER_P"
|
| 1290 |
|
|
#endif
|
| 1291 |
|
|
#if GDB_MULTI_ARCH
|
| 1292 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_REGISTER_P)
|
| 1293 |
|
|
#define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
|
| 1294 |
|
|
#endif
|
| 1295 |
|
|
#endif
|
| 1296 |
|
|
|
| 1297 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1298 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
|
| 1299 |
|
|
#define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to))
|
| 1300 |
|
|
#endif
|
| 1301 |
|
|
|
| 1302 |
|
|
typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to);
|
| 1303 |
|
|
extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
|
| 1304 |
|
|
extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
|
| 1305 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
|
| 1306 |
|
|
#error "Non multi-arch definition of REGISTER_TO_VALUE"
|
| 1307 |
|
|
#endif
|
| 1308 |
|
|
#if GDB_MULTI_ARCH
|
| 1309 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_TO_VALUE)
|
| 1310 |
|
|
#define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
|
| 1311 |
|
|
#endif
|
| 1312 |
|
|
#endif
|
| 1313 |
|
|
|
| 1314 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1315 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
|
| 1316 |
|
|
#define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to))
|
| 1317 |
|
|
#endif
|
| 1318 |
|
|
|
| 1319 |
|
|
typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to);
|
| 1320 |
|
|
extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
|
| 1321 |
|
|
extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
|
| 1322 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
|
| 1323 |
|
|
#error "Non multi-arch definition of VALUE_TO_REGISTER"
|
| 1324 |
|
|
#endif
|
| 1325 |
|
|
#if GDB_MULTI_ARCH
|
| 1326 |
|
|
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (VALUE_TO_REGISTER)
|
| 1327 |
|
|
#define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
|
| 1328 |
|
|
#endif
|
| 1329 |
|
|
#endif
|
| 1330 |
|
|
|
| 1331 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1332 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
|
| 1333 |
|
|
#define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
|
| 1334 |
|
|
#endif
|
| 1335 |
|
|
|
| 1336 |
|
|
typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf);
|
| 1337 |
|
|
extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
|
| 1338 |
|
|
extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
|
| 1339 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
|
| 1340 |
|
|
#error "Non multi-arch definition of POINTER_TO_ADDRESS"
|
| 1341 |
|
|
#endif
|
| 1342 |
|
|
#if GDB_MULTI_ARCH
|
| 1343 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
|
| 1344 |
|
|
#define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
|
| 1345 |
|
|
#endif
|
| 1346 |
|
|
#endif
|
| 1347 |
|
|
|
| 1348 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1349 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
|
| 1350 |
|
|
#define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
|
| 1351 |
|
|
#endif
|
| 1352 |
|
|
|
| 1353 |
|
|
typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
|
| 1354 |
|
|
extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
|
| 1355 |
|
|
extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
|
| 1356 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
|
| 1357 |
|
|
#error "Non multi-arch definition of ADDRESS_TO_POINTER"
|
| 1358 |
|
|
#endif
|
| 1359 |
|
|
#if GDB_MULTI_ARCH
|
| 1360 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
|
| 1361 |
|
|
#define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
|
| 1362 |
|
|
#endif
|
| 1363 |
|
|
#endif
|
| 1364 |
|
|
|
| 1365 |
|
|
#if defined (INTEGER_TO_ADDRESS)
|
| 1366 |
|
|
/* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
|
| 1367 |
|
|
#if !defined (INTEGER_TO_ADDRESS_P)
|
| 1368 |
|
|
#define INTEGER_TO_ADDRESS_P() (1)
|
| 1369 |
|
|
#endif
|
| 1370 |
|
|
#endif
|
| 1371 |
|
|
|
| 1372 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1373 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
|
| 1374 |
|
|
#define INTEGER_TO_ADDRESS_P() (0)
|
| 1375 |
|
|
#endif
|
| 1376 |
|
|
|
| 1377 |
|
|
extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
|
| 1378 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
|
| 1379 |
|
|
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
|
| 1380 |
|
|
#endif
|
| 1381 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
|
| 1382 |
|
|
#define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
|
| 1383 |
|
|
#endif
|
| 1384 |
|
|
|
| 1385 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1386 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
|
| 1387 |
|
|
#define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
|
| 1388 |
|
|
#endif
|
| 1389 |
|
|
|
| 1390 |
|
|
typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
|
| 1391 |
|
|
extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
|
| 1392 |
|
|
extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
|
| 1393 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
|
| 1394 |
|
|
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
|
| 1395 |
|
|
#endif
|
| 1396 |
|
|
#if GDB_MULTI_ARCH
|
| 1397 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS)
|
| 1398 |
|
|
#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
|
| 1399 |
|
|
#endif
|
| 1400 |
|
|
#endif
|
| 1401 |
|
|
|
| 1402 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1403 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
|
| 1404 |
|
|
#define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
|
| 1405 |
|
|
#endif
|
| 1406 |
|
|
|
| 1407 |
|
|
typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
|
| 1408 |
|
|
extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
|
| 1409 |
|
|
extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
|
| 1410 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
|
| 1411 |
|
|
#error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
|
| 1412 |
|
|
#endif
|
| 1413 |
|
|
#if GDB_MULTI_ARCH
|
| 1414 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
|
| 1415 |
|
|
#define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
|
| 1416 |
|
|
#endif
|
| 1417 |
|
|
#endif
|
| 1418 |
|
|
|
| 1419 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1420 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS)
|
| 1421 |
|
|
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr))
|
| 1422 |
|
|
#endif
|
| 1423 |
|
|
|
| 1424 |
|
|
typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
|
| 1425 |
|
|
extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
|
| 1426 |
|
|
extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments);
|
| 1427 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS)
|
| 1428 |
|
|
#error "Non multi-arch definition of PUSH_ARGUMENTS"
|
| 1429 |
|
|
#endif
|
| 1430 |
|
|
#if GDB_MULTI_ARCH
|
| 1431 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS)
|
| 1432 |
|
|
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
|
| 1433 |
|
|
#endif
|
| 1434 |
|
|
#endif
|
| 1435 |
|
|
|
| 1436 |
|
|
typedef void (gdbarch_push_dummy_frame_ftype) (void);
|
| 1437 |
|
|
extern void gdbarch_push_dummy_frame (struct gdbarch *gdbarch);
|
| 1438 |
|
|
extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_dummy_frame_ftype *push_dummy_frame);
|
| 1439 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME)
|
| 1440 |
|
|
#error "Non multi-arch definition of PUSH_DUMMY_FRAME"
|
| 1441 |
|
|
#endif
|
| 1442 |
|
|
#if GDB_MULTI_ARCH
|
| 1443 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME)
|
| 1444 |
|
|
#define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch))
|
| 1445 |
|
|
#endif
|
| 1446 |
|
|
#endif
|
| 1447 |
|
|
|
| 1448 |
|
|
#if defined (PUSH_RETURN_ADDRESS)
|
| 1449 |
|
|
/* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */
|
| 1450 |
|
|
#if !defined (PUSH_RETURN_ADDRESS_P)
|
| 1451 |
|
|
#define PUSH_RETURN_ADDRESS_P() (1)
|
| 1452 |
|
|
#endif
|
| 1453 |
|
|
#endif
|
| 1454 |
|
|
|
| 1455 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1456 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P)
|
| 1457 |
|
|
#define PUSH_RETURN_ADDRESS_P() (0)
|
| 1458 |
|
|
#endif
|
| 1459 |
|
|
|
| 1460 |
|
|
extern int gdbarch_push_return_address_p (struct gdbarch *gdbarch);
|
| 1461 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P)
|
| 1462 |
|
|
#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
|
| 1463 |
|
|
#endif
|
| 1464 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P)
|
| 1465 |
|
|
#define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch))
|
| 1466 |
|
|
#endif
|
| 1467 |
|
|
|
| 1468 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1469 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS)
|
| 1470 |
|
|
#define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0)
|
| 1471 |
|
|
#endif
|
| 1472 |
|
|
|
| 1473 |
|
|
typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
|
| 1474 |
|
|
extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
|
| 1475 |
|
|
extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address);
|
| 1476 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS)
|
| 1477 |
|
|
#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
|
| 1478 |
|
|
#endif
|
| 1479 |
|
|
#if GDB_MULTI_ARCH
|
| 1480 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS)
|
| 1481 |
|
|
#define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp))
|
| 1482 |
|
|
#endif
|
| 1483 |
|
|
#endif
|
| 1484 |
|
|
|
| 1485 |
|
|
typedef void (gdbarch_pop_frame_ftype) (void);
|
| 1486 |
|
|
extern void gdbarch_pop_frame (struct gdbarch *gdbarch);
|
| 1487 |
|
|
extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame);
|
| 1488 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME)
|
| 1489 |
|
|
#error "Non multi-arch definition of POP_FRAME"
|
| 1490 |
|
|
#endif
|
| 1491 |
|
|
#if GDB_MULTI_ARCH
|
| 1492 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME)
|
| 1493 |
|
|
#define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
|
| 1494 |
|
|
#endif
|
| 1495 |
|
|
#endif
|
| 1496 |
|
|
|
| 1497 |
|
|
typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
|
| 1498 |
|
|
extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
|
| 1499 |
|
|
extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return);
|
| 1500 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN)
|
| 1501 |
|
|
#error "Non multi-arch definition of STORE_STRUCT_RETURN"
|
| 1502 |
|
|
#endif
|
| 1503 |
|
|
#if GDB_MULTI_ARCH
|
| 1504 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN)
|
| 1505 |
|
|
#define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp))
|
| 1506 |
|
|
#endif
|
| 1507 |
|
|
#endif
|
| 1508 |
|
|
|
| 1509 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1510 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
|
| 1511 |
|
|
#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
|
| 1512 |
|
|
#endif
|
| 1513 |
|
|
|
| 1514 |
|
|
typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
|
| 1515 |
|
|
extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
|
| 1516 |
|
|
extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
|
| 1517 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
|
| 1518 |
|
|
#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
|
| 1519 |
|
|
#endif
|
| 1520 |
|
|
#if GDB_MULTI_ARCH
|
| 1521 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
|
| 1522 |
|
|
#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
|
| 1523 |
|
|
#endif
|
| 1524 |
|
|
#endif
|
| 1525 |
|
|
|
| 1526 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1527 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
|
| 1528 |
|
|
#define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
|
| 1529 |
|
|
#endif
|
| 1530 |
|
|
|
| 1531 |
|
|
typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
|
| 1532 |
|
|
extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
|
| 1533 |
|
|
extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
|
| 1534 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
|
| 1535 |
|
|
#error "Non multi-arch definition of STORE_RETURN_VALUE"
|
| 1536 |
|
|
#endif
|
| 1537 |
|
|
#if GDB_MULTI_ARCH
|
| 1538 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
|
| 1539 |
|
|
#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
|
| 1540 |
|
|
#endif
|
| 1541 |
|
|
#endif
|
| 1542 |
|
|
|
| 1543 |
|
|
typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
|
| 1544 |
|
|
extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
|
| 1545 |
|
|
extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
|
| 1546 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
|
| 1547 |
|
|
#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
|
| 1548 |
|
|
#endif
|
| 1549 |
|
|
#if GDB_MULTI_ARCH
|
| 1550 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
|
| 1551 |
|
|
#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
|
| 1552 |
|
|
#endif
|
| 1553 |
|
|
#endif
|
| 1554 |
|
|
|
| 1555 |
|
|
typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
|
| 1556 |
|
|
extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
|
| 1557 |
|
|
extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
|
| 1558 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
|
| 1559 |
|
|
#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
|
| 1560 |
|
|
#endif
|
| 1561 |
|
|
#if GDB_MULTI_ARCH
|
| 1562 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_RETURN_VALUE)
|
| 1563 |
|
|
#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
|
| 1564 |
|
|
#endif
|
| 1565 |
|
|
#endif
|
| 1566 |
|
|
|
| 1567 |
|
|
#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1568 |
|
|
/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
|
| 1569 |
|
|
#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1570 |
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
|
| 1571 |
|
|
#endif
|
| 1572 |
|
|
#endif
|
| 1573 |
|
|
|
| 1574 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1575 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1576 |
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
|
| 1577 |
|
|
#endif
|
| 1578 |
|
|
|
| 1579 |
|
|
extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
|
| 1580 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1581 |
|
|
#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
|
| 1582 |
|
|
#endif
|
| 1583 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1584 |
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
|
| 1585 |
|
|
#endif
|
| 1586 |
|
|
|
| 1587 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1588 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1589 |
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
|
| 1590 |
|
|
#endif
|
| 1591 |
|
|
|
| 1592 |
|
|
typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
|
| 1593 |
|
|
extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
|
| 1594 |
|
|
extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
|
| 1595 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1596 |
|
|
#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
|
| 1597 |
|
|
#endif
|
| 1598 |
|
|
#if GDB_MULTI_ARCH
|
| 1599 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1600 |
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
|
| 1601 |
|
|
#endif
|
| 1602 |
|
|
#endif
|
| 1603 |
|
|
|
| 1604 |
|
|
#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1605 |
|
|
/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
|
| 1606 |
|
|
#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1607 |
|
|
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
|
| 1608 |
|
|
#endif
|
| 1609 |
|
|
#endif
|
| 1610 |
|
|
|
| 1611 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1612 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1613 |
|
|
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
|
| 1614 |
|
|
#endif
|
| 1615 |
|
|
|
| 1616 |
|
|
extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
|
| 1617 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1618 |
|
|
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
|
| 1619 |
|
|
#endif
|
| 1620 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
|
| 1621 |
|
|
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
|
| 1622 |
|
|
#endif
|
| 1623 |
|
|
|
| 1624 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1625 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1626 |
|
|
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
|
| 1627 |
|
|
#endif
|
| 1628 |
|
|
|
| 1629 |
|
|
typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
|
| 1630 |
|
|
extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
|
| 1631 |
|
|
extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
|
| 1632 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1633 |
|
|
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
|
| 1634 |
|
|
#endif
|
| 1635 |
|
|
#if GDB_MULTI_ARCH
|
| 1636 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
|
| 1637 |
|
|
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
|
| 1638 |
|
|
#endif
|
| 1639 |
|
|
#endif
|
| 1640 |
|
|
|
| 1641 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1642 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
|
| 1643 |
|
|
#define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
|
| 1644 |
|
|
#endif
|
| 1645 |
|
|
|
| 1646 |
|
|
typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
|
| 1647 |
|
|
extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
|
| 1648 |
|
|
extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
|
| 1649 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
|
| 1650 |
|
|
#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
|
| 1651 |
|
|
#endif
|
| 1652 |
|
|
#if GDB_MULTI_ARCH
|
| 1653 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
|
| 1654 |
|
|
#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
|
| 1655 |
|
|
#endif
|
| 1656 |
|
|
#endif
|
| 1657 |
|
|
|
| 1658 |
|
|
typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame);
|
| 1659 |
|
|
extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
|
| 1660 |
|
|
extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs);
|
| 1661 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS)
|
| 1662 |
|
|
#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
|
| 1663 |
|
|
#endif
|
| 1664 |
|
|
#if GDB_MULTI_ARCH
|
| 1665 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS)
|
| 1666 |
|
|
#define FRAME_INIT_SAVED_REGS(frame) (gdbarch_frame_init_saved_regs (current_gdbarch, frame))
|
| 1667 |
|
|
#endif
|
| 1668 |
|
|
#endif
|
| 1669 |
|
|
|
| 1670 |
|
|
#if defined (INIT_EXTRA_FRAME_INFO)
|
| 1671 |
|
|
/* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */
|
| 1672 |
|
|
#if !defined (INIT_EXTRA_FRAME_INFO_P)
|
| 1673 |
|
|
#define INIT_EXTRA_FRAME_INFO_P() (1)
|
| 1674 |
|
|
#endif
|
| 1675 |
|
|
#endif
|
| 1676 |
|
|
|
| 1677 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1678 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P)
|
| 1679 |
|
|
#define INIT_EXTRA_FRAME_INFO_P() (0)
|
| 1680 |
|
|
#endif
|
| 1681 |
|
|
|
| 1682 |
|
|
extern int gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch);
|
| 1683 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P)
|
| 1684 |
|
|
#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
|
| 1685 |
|
|
#endif
|
| 1686 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P)
|
| 1687 |
|
|
#define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch))
|
| 1688 |
|
|
#endif
|
| 1689 |
|
|
|
| 1690 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1691 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO)
|
| 1692 |
|
|
#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0)
|
| 1693 |
|
|
#endif
|
| 1694 |
|
|
|
| 1695 |
|
|
typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
|
| 1696 |
|
|
extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
|
| 1697 |
|
|
extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info);
|
| 1698 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO)
|
| 1699 |
|
|
#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
|
| 1700 |
|
|
#endif
|
| 1701 |
|
|
#if GDB_MULTI_ARCH
|
| 1702 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO)
|
| 1703 |
|
|
#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_init_extra_frame_info (current_gdbarch, fromleaf, frame))
|
| 1704 |
|
|
#endif
|
| 1705 |
|
|
#endif
|
| 1706 |
|
|
|
| 1707 |
|
|
typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
|
| 1708 |
|
|
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
|
| 1709 |
|
|
extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
|
| 1710 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
|
| 1711 |
|
|
#error "Non multi-arch definition of SKIP_PROLOGUE"
|
| 1712 |
|
|
#endif
|
| 1713 |
|
|
#if GDB_MULTI_ARCH
|
| 1714 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
|
| 1715 |
|
|
#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
|
| 1716 |
|
|
#endif
|
| 1717 |
|
|
#endif
|
| 1718 |
|
|
|
| 1719 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1720 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
|
| 1721 |
|
|
#define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
|
| 1722 |
|
|
#endif
|
| 1723 |
|
|
|
| 1724 |
|
|
typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
|
| 1725 |
|
|
extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
|
| 1726 |
|
|
extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
|
| 1727 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
|
| 1728 |
|
|
#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
|
| 1729 |
|
|
#endif
|
| 1730 |
|
|
#if GDB_MULTI_ARCH
|
| 1731 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
|
| 1732 |
|
|
#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
|
| 1733 |
|
|
#endif
|
| 1734 |
|
|
#endif
|
| 1735 |
|
|
|
| 1736 |
|
|
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
|
| 1737 |
|
|
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
|
| 1738 |
|
|
extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
|
| 1739 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
|
| 1740 |
|
|
#error "Non multi-arch definition of INNER_THAN"
|
| 1741 |
|
|
#endif
|
| 1742 |
|
|
#if GDB_MULTI_ARCH
|
| 1743 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
|
| 1744 |
|
|
#define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
|
| 1745 |
|
|
#endif
|
| 1746 |
|
|
#endif
|
| 1747 |
|
|
|
| 1748 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1749 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (BREAKPOINT_FROM_PC)
|
| 1750 |
|
|
#define BREAKPOINT_FROM_PC(pcptr, lenptr) (legacy_breakpoint_from_pc (pcptr, lenptr))
|
| 1751 |
|
|
#endif
|
| 1752 |
|
|
|
| 1753 |
|
|
typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
|
| 1754 |
|
|
extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
|
| 1755 |
|
|
extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
|
| 1756 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
|
| 1757 |
|
|
#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
|
| 1758 |
|
|
#endif
|
| 1759 |
|
|
#if GDB_MULTI_ARCH
|
| 1760 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
|
| 1761 |
|
|
#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
|
| 1762 |
|
|
#endif
|
| 1763 |
|
|
#endif
|
| 1764 |
|
|
|
| 1765 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1766 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
|
| 1767 |
|
|
#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
|
| 1768 |
|
|
#endif
|
| 1769 |
|
|
|
| 1770 |
|
|
typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
|
| 1771 |
|
|
extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
|
| 1772 |
|
|
extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
|
| 1773 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
|
| 1774 |
|
|
#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
|
| 1775 |
|
|
#endif
|
| 1776 |
|
|
#if GDB_MULTI_ARCH
|
| 1777 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
|
| 1778 |
|
|
#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
|
| 1779 |
|
|
#endif
|
| 1780 |
|
|
#endif
|
| 1781 |
|
|
|
| 1782 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1783 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
|
| 1784 |
|
|
#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
|
| 1785 |
|
|
#endif
|
| 1786 |
|
|
|
| 1787 |
|
|
typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
|
| 1788 |
|
|
extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
|
| 1789 |
|
|
extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
|
| 1790 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
|
| 1791 |
|
|
#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
|
| 1792 |
|
|
#endif
|
| 1793 |
|
|
#if GDB_MULTI_ARCH
|
| 1794 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
|
| 1795 |
|
|
#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
|
| 1796 |
|
|
#endif
|
| 1797 |
|
|
#endif
|
| 1798 |
|
|
|
| 1799 |
|
|
extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
|
| 1800 |
|
|
extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
|
| 1801 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
|
| 1802 |
|
|
#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
|
| 1803 |
|
|
#endif
|
| 1804 |
|
|
#if GDB_MULTI_ARCH
|
| 1805 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
|
| 1806 |
|
|
#define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
|
| 1807 |
|
|
#endif
|
| 1808 |
|
|
#endif
|
| 1809 |
|
|
|
| 1810 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1811 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
|
| 1812 |
|
|
#define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
|
| 1813 |
|
|
#endif
|
| 1814 |
|
|
|
| 1815 |
|
|
typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
|
| 1816 |
|
|
extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
|
| 1817 |
|
|
extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
|
| 1818 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
|
| 1819 |
|
|
#error "Non multi-arch definition of PREPARE_TO_PROCEED"
|
| 1820 |
|
|
#endif
|
| 1821 |
|
|
#if GDB_MULTI_ARCH
|
| 1822 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
|
| 1823 |
|
|
#define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
|
| 1824 |
|
|
#endif
|
| 1825 |
|
|
#endif
|
| 1826 |
|
|
|
| 1827 |
|
|
extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
|
| 1828 |
|
|
extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
|
| 1829 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
|
| 1830 |
|
|
#error "Non multi-arch definition of FUNCTION_START_OFFSET"
|
| 1831 |
|
|
#endif
|
| 1832 |
|
|
#if GDB_MULTI_ARCH
|
| 1833 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
|
| 1834 |
|
|
#define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
|
| 1835 |
|
|
#endif
|
| 1836 |
|
|
#endif
|
| 1837 |
|
|
|
| 1838 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1839 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
|
| 1840 |
|
|
#define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (generic_remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len))
|
| 1841 |
|
|
#endif
|
| 1842 |
|
|
|
| 1843 |
|
|
typedef void (gdbarch_remote_translate_xfer_address_ftype) (CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
|
| 1844 |
|
|
extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
|
| 1845 |
|
|
extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
|
| 1846 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS)
|
| 1847 |
|
|
#error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS"
|
| 1848 |
|
|
#endif
|
| 1849 |
|
|
#if GDB_MULTI_ARCH
|
| 1850 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
|
| 1851 |
|
|
#define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (gdbarch_remote_translate_xfer_address (current_gdbarch, gdb_addr, gdb_len, rem_addr, rem_len))
|
| 1852 |
|
|
#endif
|
| 1853 |
|
|
#endif
|
| 1854 |
|
|
|
| 1855 |
|
|
extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
|
| 1856 |
|
|
extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
|
| 1857 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
|
| 1858 |
|
|
#error "Non multi-arch definition of FRAME_ARGS_SKIP"
|
| 1859 |
|
|
#endif
|
| 1860 |
|
|
#if GDB_MULTI_ARCH
|
| 1861 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
|
| 1862 |
|
|
#define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
|
| 1863 |
|
|
#endif
|
| 1864 |
|
|
#endif
|
| 1865 |
|
|
|
| 1866 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1867 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
|
| 1868 |
|
|
#define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
|
| 1869 |
|
|
#endif
|
| 1870 |
|
|
|
| 1871 |
|
|
typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
|
| 1872 |
|
|
extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
|
| 1873 |
|
|
extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
|
| 1874 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
|
| 1875 |
|
|
#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
|
| 1876 |
|
|
#endif
|
| 1877 |
|
|
#if GDB_MULTI_ARCH
|
| 1878 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
|
| 1879 |
|
|
#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
|
| 1880 |
|
|
#endif
|
| 1881 |
|
|
#endif
|
| 1882 |
|
|
|
| 1883 |
|
|
typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame);
|
| 1884 |
|
|
extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
|
| 1885 |
|
|
extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain);
|
| 1886 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN)
|
| 1887 |
|
|
#error "Non multi-arch definition of FRAME_CHAIN"
|
| 1888 |
|
|
#endif
|
| 1889 |
|
|
#if GDB_MULTI_ARCH
|
| 1890 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN)
|
| 1891 |
|
|
#define FRAME_CHAIN(frame) (gdbarch_frame_chain (current_gdbarch, frame))
|
| 1892 |
|
|
#endif
|
| 1893 |
|
|
#endif
|
| 1894 |
|
|
|
| 1895 |
|
|
/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for
|
| 1896 |
|
|
most targets. If FRAME_CHAIN_VALID returns zero it means that the
|
| 1897 |
|
|
given frame is the outermost one and has no caller.
|
| 1898 |
|
|
|
| 1899 |
|
|
XXXX - both default and alternate frame_chain_valid functions are
|
| 1900 |
|
|
deprecated. New code should use dummy frames and one of the generic
|
| 1901 |
|
|
functions. */
|
| 1902 |
|
|
|
| 1903 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 1904 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
|
| 1905 |
|
|
#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
|
| 1906 |
|
|
#endif
|
| 1907 |
|
|
|
| 1908 |
|
|
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
|
| 1909 |
|
|
extern int gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
|
| 1910 |
|
|
extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_frame_chain_valid_ftype *frame_chain_valid);
|
| 1911 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
|
| 1912 |
|
|
#error "Non multi-arch definition of FRAME_CHAIN_VALID"
|
| 1913 |
|
|
#endif
|
| 1914 |
|
|
#if GDB_MULTI_ARCH
|
| 1915 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
|
| 1916 |
|
|
#define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe))
|
| 1917 |
|
|
#endif
|
| 1918 |
|
|
#endif
|
| 1919 |
|
|
|
| 1920 |
|
|
typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi);
|
| 1921 |
|
|
extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
|
| 1922 |
|
|
extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc);
|
| 1923 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC)
|
| 1924 |
|
|
#error "Non multi-arch definition of FRAME_SAVED_PC"
|
| 1925 |
|
|
#endif
|
| 1926 |
|
|
#if GDB_MULTI_ARCH
|
| 1927 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC)
|
| 1928 |
|
|
#define FRAME_SAVED_PC(fi) (gdbarch_frame_saved_pc (current_gdbarch, fi))
|
| 1929 |
|
|
#endif
|
| 1930 |
|
|
#endif
|
| 1931 |
|
|
|
| 1932 |
|
|
typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
|
| 1933 |
|
|
extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
|
| 1934 |
|
|
extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
|
| 1935 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
|
| 1936 |
|
|
#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
|
| 1937 |
|
|
#endif
|
| 1938 |
|
|
#if GDB_MULTI_ARCH
|
| 1939 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
|
| 1940 |
|
|
#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
|
| 1941 |
|
|
#endif
|
| 1942 |
|
|
#endif
|
| 1943 |
|
|
|
| 1944 |
|
|
typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
|
| 1945 |
|
|
extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
|
| 1946 |
|
|
extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
|
| 1947 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
|
| 1948 |
|
|
#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
|
| 1949 |
|
|
#endif
|
| 1950 |
|
|
#if GDB_MULTI_ARCH
|
| 1951 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
|
| 1952 |
|
|
#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
|
| 1953 |
|
|
#endif
|
| 1954 |
|
|
#endif
|
| 1955 |
|
|
|
| 1956 |
|
|
typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype) (struct frame_info *frame);
|
| 1957 |
|
|
extern CORE_ADDR gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
|
| 1958 |
|
|
extern void set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_saved_pc_after_call_ftype *saved_pc_after_call);
|
| 1959 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL)
|
| 1960 |
|
|
#error "Non multi-arch definition of SAVED_PC_AFTER_CALL"
|
| 1961 |
|
|
#endif
|
| 1962 |
|
|
#if GDB_MULTI_ARCH
|
| 1963 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL)
|
| 1964 |
|
|
#define SAVED_PC_AFTER_CALL(frame) (gdbarch_saved_pc_after_call (current_gdbarch, frame))
|
| 1965 |
|
|
#endif
|
| 1966 |
|
|
#endif
|
| 1967 |
|
|
|
| 1968 |
|
|
typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
|
| 1969 |
|
|
extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
|
| 1970 |
|
|
extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
|
| 1971 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
|
| 1972 |
|
|
#error "Non multi-arch definition of FRAME_NUM_ARGS"
|
| 1973 |
|
|
#endif
|
| 1974 |
|
|
#if GDB_MULTI_ARCH
|
| 1975 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
|
| 1976 |
|
|
#define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
|
| 1977 |
|
|
#endif
|
| 1978 |
|
|
#endif
|
| 1979 |
|
|
|
| 1980 |
|
|
#if defined (STACK_ALIGN)
|
| 1981 |
|
|
/* Legacy for systems yet to multi-arch STACK_ALIGN */
|
| 1982 |
|
|
#if !defined (STACK_ALIGN_P)
|
| 1983 |
|
|
#define STACK_ALIGN_P() (1)
|
| 1984 |
|
|
#endif
|
| 1985 |
|
|
#endif
|
| 1986 |
|
|
|
| 1987 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 1988 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
|
| 1989 |
|
|
#define STACK_ALIGN_P() (0)
|
| 1990 |
|
|
#endif
|
| 1991 |
|
|
|
| 1992 |
|
|
extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
|
| 1993 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
|
| 1994 |
|
|
#error "Non multi-arch definition of STACK_ALIGN"
|
| 1995 |
|
|
#endif
|
| 1996 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
|
| 1997 |
|
|
#define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
|
| 1998 |
|
|
#endif
|
| 1999 |
|
|
|
| 2000 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2001 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
|
| 2002 |
|
|
#define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
|
| 2003 |
|
|
#endif
|
| 2004 |
|
|
|
| 2005 |
|
|
typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
|
| 2006 |
|
|
extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
|
| 2007 |
|
|
extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
|
| 2008 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
|
| 2009 |
|
|
#error "Non multi-arch definition of STACK_ALIGN"
|
| 2010 |
|
|
#endif
|
| 2011 |
|
|
#if GDB_MULTI_ARCH
|
| 2012 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
|
| 2013 |
|
|
#define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
|
| 2014 |
|
|
#endif
|
| 2015 |
|
|
#endif
|
| 2016 |
|
|
|
| 2017 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 2018 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
|
| 2019 |
|
|
#define EXTRA_STACK_ALIGNMENT_NEEDED (1)
|
| 2020 |
|
|
#endif
|
| 2021 |
|
|
|
| 2022 |
|
|
extern int gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch);
|
| 2023 |
|
|
extern void set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, int extra_stack_alignment_needed);
|
| 2024 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRA_STACK_ALIGNMENT_NEEDED)
|
| 2025 |
|
|
#error "Non multi-arch definition of EXTRA_STACK_ALIGNMENT_NEEDED"
|
| 2026 |
|
|
#endif
|
| 2027 |
|
|
#if GDB_MULTI_ARCH
|
| 2028 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
|
| 2029 |
|
|
#define EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_extra_stack_alignment_needed (current_gdbarch))
|
| 2030 |
|
|
#endif
|
| 2031 |
|
|
#endif
|
| 2032 |
|
|
|
| 2033 |
|
|
#if defined (REG_STRUCT_HAS_ADDR)
|
| 2034 |
|
|
/* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
|
| 2035 |
|
|
#if !defined (REG_STRUCT_HAS_ADDR_P)
|
| 2036 |
|
|
#define REG_STRUCT_HAS_ADDR_P() (1)
|
| 2037 |
|
|
#endif
|
| 2038 |
|
|
#endif
|
| 2039 |
|
|
|
| 2040 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 2041 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
|
| 2042 |
|
|
#define REG_STRUCT_HAS_ADDR_P() (0)
|
| 2043 |
|
|
#endif
|
| 2044 |
|
|
|
| 2045 |
|
|
extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
|
| 2046 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
|
| 2047 |
|
|
#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
|
| 2048 |
|
|
#endif
|
| 2049 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
|
| 2050 |
|
|
#define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
|
| 2051 |
|
|
#endif
|
| 2052 |
|
|
|
| 2053 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2054 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
|
| 2055 |
|
|
#define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
|
| 2056 |
|
|
#endif
|
| 2057 |
|
|
|
| 2058 |
|
|
typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
|
| 2059 |
|
|
extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
|
| 2060 |
|
|
extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
|
| 2061 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
|
| 2062 |
|
|
#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
|
| 2063 |
|
|
#endif
|
| 2064 |
|
|
#if GDB_MULTI_ARCH
|
| 2065 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
|
| 2066 |
|
|
#define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
|
| 2067 |
|
|
#endif
|
| 2068 |
|
|
#endif
|
| 2069 |
|
|
|
| 2070 |
|
|
#if defined (SAVE_DUMMY_FRAME_TOS)
|
| 2071 |
|
|
/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
|
| 2072 |
|
|
#if !defined (SAVE_DUMMY_FRAME_TOS_P)
|
| 2073 |
|
|
#define SAVE_DUMMY_FRAME_TOS_P() (1)
|
| 2074 |
|
|
#endif
|
| 2075 |
|
|
#endif
|
| 2076 |
|
|
|
| 2077 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 2078 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
|
| 2079 |
|
|
#define SAVE_DUMMY_FRAME_TOS_P() (0)
|
| 2080 |
|
|
#endif
|
| 2081 |
|
|
|
| 2082 |
|
|
extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
|
| 2083 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
|
| 2084 |
|
|
#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
|
| 2085 |
|
|
#endif
|
| 2086 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
|
| 2087 |
|
|
#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
|
| 2088 |
|
|
#endif
|
| 2089 |
|
|
|
| 2090 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2091 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
|
| 2092 |
|
|
#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
|
| 2093 |
|
|
#endif
|
| 2094 |
|
|
|
| 2095 |
|
|
typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
|
| 2096 |
|
|
extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
|
| 2097 |
|
|
extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
|
| 2098 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
|
| 2099 |
|
|
#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
|
| 2100 |
|
|
#endif
|
| 2101 |
|
|
#if GDB_MULTI_ARCH
|
| 2102 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
|
| 2103 |
|
|
#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
|
| 2104 |
|
|
#endif
|
| 2105 |
|
|
#endif
|
| 2106 |
|
|
|
| 2107 |
|
|
extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
|
| 2108 |
|
|
extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
|
| 2109 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
|
| 2110 |
|
|
#error "Non multi-arch definition of PARM_BOUNDARY"
|
| 2111 |
|
|
#endif
|
| 2112 |
|
|
#if GDB_MULTI_ARCH
|
| 2113 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
|
| 2114 |
|
|
#define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
|
| 2115 |
|
|
#endif
|
| 2116 |
|
|
#endif
|
| 2117 |
|
|
|
| 2118 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 2119 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
|
| 2120 |
|
|
#define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
|
| 2121 |
|
|
#endif
|
| 2122 |
|
|
|
| 2123 |
|
|
extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
|
| 2124 |
|
|
extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
|
| 2125 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
|
| 2126 |
|
|
#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
|
| 2127 |
|
|
#endif
|
| 2128 |
|
|
#if GDB_MULTI_ARCH
|
| 2129 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
|
| 2130 |
|
|
#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
|
| 2131 |
|
|
#endif
|
| 2132 |
|
|
#endif
|
| 2133 |
|
|
|
| 2134 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 2135 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
|
| 2136 |
|
|
#define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
|
| 2137 |
|
|
#endif
|
| 2138 |
|
|
|
| 2139 |
|
|
extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
|
| 2140 |
|
|
extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
|
| 2141 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
|
| 2142 |
|
|
#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
|
| 2143 |
|
|
#endif
|
| 2144 |
|
|
#if GDB_MULTI_ARCH
|
| 2145 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
|
| 2146 |
|
|
#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
|
| 2147 |
|
|
#endif
|
| 2148 |
|
|
#endif
|
| 2149 |
|
|
|
| 2150 |
|
|
/* Default (value) for non- multi-arch platforms. */
|
| 2151 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
|
| 2152 |
|
|
#define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
|
| 2153 |
|
|
#endif
|
| 2154 |
|
|
|
| 2155 |
|
|
extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
|
| 2156 |
|
|
extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
|
| 2157 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
|
| 2158 |
|
|
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
|
| 2159 |
|
|
#endif
|
| 2160 |
|
|
#if GDB_MULTI_ARCH
|
| 2161 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
|
| 2162 |
|
|
#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
|
| 2163 |
|
|
#endif
|
| 2164 |
|
|
#endif
|
| 2165 |
|
|
|
| 2166 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2167 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
|
| 2168 |
|
|
#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
|
| 2169 |
|
|
#endif
|
| 2170 |
|
|
|
| 2171 |
|
|
typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
|
| 2172 |
|
|
extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
|
| 2173 |
|
|
extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
|
| 2174 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
|
| 2175 |
|
|
#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
|
| 2176 |
|
|
#endif
|
| 2177 |
|
|
#if GDB_MULTI_ARCH
|
| 2178 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
|
| 2179 |
|
|
#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
|
| 2180 |
|
|
#endif
|
| 2181 |
|
|
#endif
|
| 2182 |
|
|
|
| 2183 |
|
|
/* On some machines there are bits in addresses which are not really
|
| 2184 |
|
|
part of the address, but are used by the kernel, the hardware, etc.
|
| 2185 |
|
|
for special purposes. ADDR_BITS_REMOVE takes out any such bits so
|
| 2186 |
|
|
we get a "real" address such as one would find in a symbol table.
|
| 2187 |
|
|
This is used only for addresses of instructions, and even then I'm
|
| 2188 |
|
|
not sure it's used in all contexts. It exists to deal with there
|
| 2189 |
|
|
being a few stray bits in the PC which would mislead us, not as some
|
| 2190 |
|
|
sort of generic thing to handle alignment or segmentation (it's
|
| 2191 |
|
|
possible it should be in TARGET_READ_PC instead). */
|
| 2192 |
|
|
|
| 2193 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2194 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
|
| 2195 |
|
|
#define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
|
| 2196 |
|
|
#endif
|
| 2197 |
|
|
|
| 2198 |
|
|
typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
|
| 2199 |
|
|
extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
|
| 2200 |
|
|
extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
|
| 2201 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
|
| 2202 |
|
|
#error "Non multi-arch definition of ADDR_BITS_REMOVE"
|
| 2203 |
|
|
#endif
|
| 2204 |
|
|
#if GDB_MULTI_ARCH
|
| 2205 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
|
| 2206 |
|
|
#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
|
| 2207 |
|
|
#endif
|
| 2208 |
|
|
#endif
|
| 2209 |
|
|
|
| 2210 |
|
|
/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
|
| 2211 |
|
|
ADDR_BITS_REMOVE. */
|
| 2212 |
|
|
|
| 2213 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2214 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
|
| 2215 |
|
|
#define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
|
| 2216 |
|
|
#endif
|
| 2217 |
|
|
|
| 2218 |
|
|
typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
|
| 2219 |
|
|
extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
|
| 2220 |
|
|
extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
|
| 2221 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
|
| 2222 |
|
|
#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
|
| 2223 |
|
|
#endif
|
| 2224 |
|
|
#if GDB_MULTI_ARCH
|
| 2225 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS)
|
| 2226 |
|
|
#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
|
| 2227 |
|
|
#endif
|
| 2228 |
|
|
#endif
|
| 2229 |
|
|
|
| 2230 |
|
|
/* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
|
| 2231 |
|
|
the target needs software single step. An ISA method to implement it.
|
| 2232 |
|
|
|
| 2233 |
|
|
FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
|
| 2234 |
|
|
using the breakpoint system instead of blatting memory directly (as with rs6000).
|
| 2235 |
|
|
|
| 2236 |
|
|
FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
|
| 2237 |
|
|
single step. If not, then implement single step using breakpoints. */
|
| 2238 |
|
|
|
| 2239 |
|
|
#if defined (SOFTWARE_SINGLE_STEP)
|
| 2240 |
|
|
/* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
|
| 2241 |
|
|
#if !defined (SOFTWARE_SINGLE_STEP_P)
|
| 2242 |
|
|
#define SOFTWARE_SINGLE_STEP_P() (1)
|
| 2243 |
|
|
#endif
|
| 2244 |
|
|
#endif
|
| 2245 |
|
|
|
| 2246 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 2247 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
|
| 2248 |
|
|
#define SOFTWARE_SINGLE_STEP_P() (0)
|
| 2249 |
|
|
#endif
|
| 2250 |
|
|
|
| 2251 |
|
|
extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
|
| 2252 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
|
| 2253 |
|
|
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
|
| 2254 |
|
|
#endif
|
| 2255 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
|
| 2256 |
|
|
#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
|
| 2257 |
|
|
#endif
|
| 2258 |
|
|
|
| 2259 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2260 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
|
| 2261 |
|
|
#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
|
| 2262 |
|
|
#endif
|
| 2263 |
|
|
|
| 2264 |
|
|
typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
|
| 2265 |
|
|
extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
|
| 2266 |
|
|
extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
|
| 2267 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
|
| 2268 |
|
|
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
|
| 2269 |
|
|
#endif
|
| 2270 |
|
|
#if GDB_MULTI_ARCH
|
| 2271 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
|
| 2272 |
|
|
#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
|
| 2273 |
|
|
#endif
|
| 2274 |
|
|
#endif
|
| 2275 |
|
|
|
| 2276 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2277 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
|
| 2278 |
|
|
#define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
|
| 2279 |
|
|
#endif
|
| 2280 |
|
|
|
| 2281 |
|
|
typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
|
| 2282 |
|
|
extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
|
| 2283 |
|
|
extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
|
| 2284 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
|
| 2285 |
|
|
#error "Non multi-arch definition of TARGET_PRINT_INSN"
|
| 2286 |
|
|
#endif
|
| 2287 |
|
|
#if GDB_MULTI_ARCH
|
| 2288 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN)
|
| 2289 |
|
|
#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
|
| 2290 |
|
|
#endif
|
| 2291 |
|
|
#endif
|
| 2292 |
|
|
|
| 2293 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2294 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
|
| 2295 |
|
|
#define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
|
| 2296 |
|
|
#endif
|
| 2297 |
|
|
|
| 2298 |
|
|
typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
|
| 2299 |
|
|
extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
|
| 2300 |
|
|
extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
|
| 2301 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
|
| 2302 |
|
|
#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
|
| 2303 |
|
|
#endif
|
| 2304 |
|
|
#if GDB_MULTI_ARCH
|
| 2305 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
|
| 2306 |
|
|
#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
|
| 2307 |
|
|
#endif
|
| 2308 |
|
|
#endif
|
| 2309 |
|
|
|
| 2310 |
|
|
/* For SVR4 shared libraries, each call goes through a small piece of
|
| 2311 |
|
|
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
|
| 2312 |
|
|
to nonzero if we are currently stopped in one of these. */
|
| 2313 |
|
|
|
| 2314 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2315 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
|
| 2316 |
|
|
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
|
| 2317 |
|
|
#endif
|
| 2318 |
|
|
|
| 2319 |
|
|
typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
|
| 2320 |
|
|
extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
|
| 2321 |
|
|
extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
|
| 2322 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
|
| 2323 |
|
|
#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
|
| 2324 |
|
|
#endif
|
| 2325 |
|
|
#if GDB_MULTI_ARCH
|
| 2326 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
|
| 2327 |
|
|
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
|
| 2328 |
|
|
#endif
|
| 2329 |
|
|
#endif
|
| 2330 |
|
|
|
| 2331 |
|
|
/* Some systems also have trampoline code for returning from shared libs. */
|
| 2332 |
|
|
|
| 2333 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2334 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
|
| 2335 |
|
|
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
|
| 2336 |
|
|
#endif
|
| 2337 |
|
|
|
| 2338 |
|
|
typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
|
| 2339 |
|
|
extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
|
| 2340 |
|
|
extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
|
| 2341 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
|
| 2342 |
|
|
#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
|
| 2343 |
|
|
#endif
|
| 2344 |
|
|
#if GDB_MULTI_ARCH
|
| 2345 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_RETURN_TRAMPOLINE)
|
| 2346 |
|
|
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
|
| 2347 |
|
|
#endif
|
| 2348 |
|
|
#endif
|
| 2349 |
|
|
|
| 2350 |
|
|
/* Sigtramp is a routine that the kernel calls (which then calls the
|
| 2351 |
|
|
signal handler). On most machines it is a library routine that is
|
| 2352 |
|
|
linked into the executable.
|
| 2353 |
|
|
|
| 2354 |
|
|
This macro, given a program counter value and the name of the
|
| 2355 |
|
|
function in which that PC resides (which can be null if the name is
|
| 2356 |
|
|
not known), returns nonzero if the PC and name show that we are in
|
| 2357 |
|
|
sigtramp.
|
| 2358 |
|
|
|
| 2359 |
|
|
On most machines just see if the name is sigtramp (and if we have
|
| 2360 |
|
|
no name, assume we are not in sigtramp).
|
| 2361 |
|
|
|
| 2362 |
|
|
FIXME: cagney/2002-04-21: The function find_pc_partial_function
|
| 2363 |
|
|
calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
|
| 2364 |
|
|
This means PC_IN_SIGTRAMP function can't be implemented by doing its
|
| 2365 |
|
|
own local NAME lookup.
|
| 2366 |
|
|
|
| 2367 |
|
|
FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
|
| 2368 |
|
|
Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
|
| 2369 |
|
|
does not. */
|
| 2370 |
|
|
|
| 2371 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2372 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
|
| 2373 |
|
|
#define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
|
| 2374 |
|
|
#endif
|
| 2375 |
|
|
|
| 2376 |
|
|
typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
|
| 2377 |
|
|
extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
|
| 2378 |
|
|
extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
|
| 2379 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
|
| 2380 |
|
|
#error "Non multi-arch definition of PC_IN_SIGTRAMP"
|
| 2381 |
|
|
#endif
|
| 2382 |
|
|
#if GDB_MULTI_ARCH
|
| 2383 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
|
| 2384 |
|
|
#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
|
| 2385 |
|
|
#endif
|
| 2386 |
|
|
#endif
|
| 2387 |
|
|
|
| 2388 |
|
|
/* A target might have problems with watchpoints as soon as the stack
|
| 2389 |
|
|
frame of the current function has been destroyed. This mostly happens
|
| 2390 |
|
|
as the first action in a funtion's epilogue. in_function_epilogue_p()
|
| 2391 |
|
|
is defined to return a non-zero value if either the given addr is one
|
| 2392 |
|
|
instruction after the stack destroying instruction up to the trailing
|
| 2393 |
|
|
return instruction or if we can figure out that the stack frame has
|
| 2394 |
|
|
already been invalidated regardless of the value of addr. Targets
|
| 2395 |
|
|
which don't suffer from that problem could just let this functionality
|
| 2396 |
|
|
untouched. */
|
| 2397 |
|
|
|
| 2398 |
|
|
typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
|
| 2399 |
|
|
extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
|
| 2400 |
|
|
extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
|
| 2401 |
|
|
|
| 2402 |
|
|
/* Given a vector of command-line arguments, return a newly allocated
|
| 2403 |
|
|
string which, when passed to the create_inferior function, will be
|
| 2404 |
|
|
parsed (on Unix systems, by the shell) to yield the same vector.
|
| 2405 |
|
|
This function should call error() if the argument vector is not
|
| 2406 |
|
|
representable for this target or if this target does not support
|
| 2407 |
|
|
command-line arguments.
|
| 2408 |
|
|
ARGC is the number of elements in the vector.
|
| 2409 |
|
|
ARGV is an array of strings, one per argument. */
|
| 2410 |
|
|
|
| 2411 |
|
|
typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
|
| 2412 |
|
|
extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
|
| 2413 |
|
|
extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
|
| 2414 |
|
|
|
| 2415 |
|
|
#if defined (DWARF2_BUILD_FRAME_INFO)
|
| 2416 |
|
|
/* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
|
| 2417 |
|
|
#if !defined (DWARF2_BUILD_FRAME_INFO_P)
|
| 2418 |
|
|
#define DWARF2_BUILD_FRAME_INFO_P() (1)
|
| 2419 |
|
|
#endif
|
| 2420 |
|
|
#endif
|
| 2421 |
|
|
|
| 2422 |
|
|
/* Default predicate for non- multi-arch targets. */
|
| 2423 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
|
| 2424 |
|
|
#define DWARF2_BUILD_FRAME_INFO_P() (0)
|
| 2425 |
|
|
#endif
|
| 2426 |
|
|
|
| 2427 |
|
|
extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
|
| 2428 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
|
| 2429 |
|
|
#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
|
| 2430 |
|
|
#endif
|
| 2431 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
|
| 2432 |
|
|
#define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
|
| 2433 |
|
|
#endif
|
| 2434 |
|
|
|
| 2435 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2436 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
|
| 2437 |
|
|
#define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
|
| 2438 |
|
|
#endif
|
| 2439 |
|
|
|
| 2440 |
|
|
typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
|
| 2441 |
|
|
extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
|
| 2442 |
|
|
extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
|
| 2443 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
|
| 2444 |
|
|
#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
|
| 2445 |
|
|
#endif
|
| 2446 |
|
|
#if GDB_MULTI_ARCH
|
| 2447 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO)
|
| 2448 |
|
|
#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
|
| 2449 |
|
|
#endif
|
| 2450 |
|
|
#endif
|
| 2451 |
|
|
|
| 2452 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2453 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
|
| 2454 |
|
|
#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
|
| 2455 |
|
|
#endif
|
| 2456 |
|
|
|
| 2457 |
|
|
typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
|
| 2458 |
|
|
extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
|
| 2459 |
|
|
extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
|
| 2460 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
|
| 2461 |
|
|
#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
|
| 2462 |
|
|
#endif
|
| 2463 |
|
|
#if GDB_MULTI_ARCH
|
| 2464 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ELF_MAKE_MSYMBOL_SPECIAL)
|
| 2465 |
|
|
#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
|
| 2466 |
|
|
#endif
|
| 2467 |
|
|
#endif
|
| 2468 |
|
|
|
| 2469 |
|
|
/* Default (function) for non- multi-arch platforms. */
|
| 2470 |
|
|
#if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
|
| 2471 |
|
|
#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
|
| 2472 |
|
|
#endif
|
| 2473 |
|
|
|
| 2474 |
|
|
typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
|
| 2475 |
|
|
extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
|
| 2476 |
|
|
extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
|
| 2477 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
|
| 2478 |
|
|
#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
|
| 2479 |
|
|
#endif
|
| 2480 |
|
|
#if GDB_MULTI_ARCH
|
| 2481 |
|
|
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COFF_MAKE_MSYMBOL_SPECIAL)
|
| 2482 |
|
|
#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
|
| 2483 |
|
|
#endif
|
| 2484 |
|
|
#endif
|
| 2485 |
|
|
|
| 2486 |
|
|
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
|
| 2487 |
|
|
|
| 2488 |
|
|
|
| 2489 |
|
|
/* Mechanism for co-ordinating the selection of a specific
|
| 2490 |
|
|
architecture.
|
| 2491 |
|
|
|
| 2492 |
|
|
GDB targets (*-tdep.c) can register an interest in a specific
|
| 2493 |
|
|
architecture. Other GDB components can register a need to maintain
|
| 2494 |
|
|
per-architecture data.
|
| 2495 |
|
|
|
| 2496 |
|
|
The mechanisms below ensures that there is only a loose connection
|
| 2497 |
|
|
between the set-architecture command and the various GDB
|
| 2498 |
|
|
components. Each component can independently register their need
|
| 2499 |
|
|
to maintain architecture specific data with gdbarch.
|
| 2500 |
|
|
|
| 2501 |
|
|
Pragmatics:
|
| 2502 |
|
|
|
| 2503 |
|
|
Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
|
| 2504 |
|
|
didn't scale.
|
| 2505 |
|
|
|
| 2506 |
|
|
The more traditional mega-struct containing architecture specific
|
| 2507 |
|
|
data for all the various GDB components was also considered. Since
|
| 2508 |
|
|
GDB is built from a variable number of (fairly independent)
|
| 2509 |
|
|
components it was determined that the global aproach was not
|
| 2510 |
|
|
applicable. */
|
| 2511 |
|
|
|
| 2512 |
|
|
|
| 2513 |
|
|
/* Register a new architectural family with GDB.
|
| 2514 |
|
|
|
| 2515 |
|
|
Register support for the specified ARCHITECTURE with GDB. When
|
| 2516 |
|
|
gdbarch determines that the specified architecture has been
|
| 2517 |
|
|
selected, the corresponding INIT function is called.
|
| 2518 |
|
|
|
| 2519 |
|
|
--
|
| 2520 |
|
|
|
| 2521 |
|
|
The INIT function takes two parameters: INFO which contains the
|
| 2522 |
|
|
information available to gdbarch about the (possibly new)
|
| 2523 |
|
|
architecture; ARCHES which is a list of the previously created
|
| 2524 |
|
|
``struct gdbarch'' for this architecture.
|
| 2525 |
|
|
|
| 2526 |
|
|
The INFO parameter is, as far as possible, be pre-initialized with
|
| 2527 |
|
|
information obtained from INFO.ABFD or the previously selected
|
| 2528 |
|
|
architecture.
|
| 2529 |
|
|
|
| 2530 |
|
|
The ARCHES parameter is a linked list (sorted most recently used)
|
| 2531 |
|
|
of all the previously created architures for this architecture
|
| 2532 |
|
|
family. The (possibly NULL) ARCHES->gdbarch can used to access
|
| 2533 |
|
|
values from the previously selected architecture for this
|
| 2534 |
|
|
architecture family. The global ``current_gdbarch'' shall not be
|
| 2535 |
|
|
used.
|
| 2536 |
|
|
|
| 2537 |
|
|
The INIT function shall return any of: NULL - indicating that it
|
| 2538 |
|
|
doesn't recognize the selected architecture; an existing ``struct
|
| 2539 |
|
|
gdbarch'' from the ARCHES list - indicating that the new
|
| 2540 |
|
|
architecture is just a synonym for an earlier architecture (see
|
| 2541 |
|
|
gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
|
| 2542 |
|
|
- that describes the selected architecture (see gdbarch_alloc()).
|
| 2543 |
|
|
|
| 2544 |
|
|
The DUMP_TDEP function shall print out all target specific values.
|
| 2545 |
|
|
Care should be taken to ensure that the function works in both the
|
| 2546 |
|
|
multi-arch and non- multi-arch cases. */
|
| 2547 |
|
|
|
| 2548 |
|
|
struct gdbarch_list
|
| 2549 |
|
|
{
|
| 2550 |
|
|
struct gdbarch *gdbarch;
|
| 2551 |
|
|
struct gdbarch_list *next;
|
| 2552 |
|
|
};
|
| 2553 |
|
|
|
| 2554 |
|
|
struct gdbarch_info
|
| 2555 |
|
|
{
|
| 2556 |
|
|
/* Use default: NULL (ZERO). */
|
| 2557 |
|
|
const struct bfd_arch_info *bfd_arch_info;
|
| 2558 |
|
|
|
| 2559 |
|
|
/* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
|
| 2560 |
|
|
int byte_order;
|
| 2561 |
|
|
|
| 2562 |
|
|
/* Use default: NULL (ZERO). */
|
| 2563 |
|
|
bfd *abfd;
|
| 2564 |
|
|
|
| 2565 |
|
|
/* Use default: NULL (ZERO). */
|
| 2566 |
|
|
struct gdbarch_tdep_info *tdep_info;
|
| 2567 |
|
|
};
|
| 2568 |
|
|
|
| 2569 |
|
|
typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
|
| 2570 |
|
|
typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
|
| 2571 |
|
|
|
| 2572 |
|
|
/* DEPRECATED - use gdbarch_register() */
|
| 2573 |
|
|
extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
|
| 2574 |
|
|
|
| 2575 |
|
|
extern void gdbarch_register (enum bfd_architecture architecture,
|
| 2576 |
|
|
gdbarch_init_ftype *,
|
| 2577 |
|
|
gdbarch_dump_tdep_ftype *);
|
| 2578 |
|
|
|
| 2579 |
|
|
|
| 2580 |
|
|
/* Return a freshly allocated, NULL terminated, array of the valid
|
| 2581 |
|
|
architecture names. Since architectures are registered during the
|
| 2582 |
|
|
_initialize phase this function only returns useful information
|
| 2583 |
|
|
once initialization has been completed. */
|
| 2584 |
|
|
|
| 2585 |
|
|
extern const char **gdbarch_printable_names (void);
|
| 2586 |
|
|
|
| 2587 |
|
|
|
| 2588 |
|
|
/* Helper function. Search the list of ARCHES for a GDBARCH that
|
| 2589 |
|
|
matches the information provided by INFO. */
|
| 2590 |
|
|
|
| 2591 |
|
|
extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
|
| 2592 |
|
|
|
| 2593 |
|
|
|
| 2594 |
|
|
/* Helper function. Create a preliminary ``struct gdbarch''. Perform
|
| 2595 |
|
|
basic initialization using values obtained from the INFO andTDEP
|
| 2596 |
|
|
parameters. set_gdbarch_*() functions are called to complete the
|
| 2597 |
|
|
initialization of the object. */
|
| 2598 |
|
|
|
| 2599 |
|
|
extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
|
| 2600 |
|
|
|
| 2601 |
|
|
|
| 2602 |
|
|
/* Helper function. Free a partially-constructed ``struct gdbarch''.
|
| 2603 |
|
|
It is assumed that the caller freeds the ``struct
|
| 2604 |
|
|
gdbarch_tdep''. */
|
| 2605 |
|
|
|
| 2606 |
|
|
extern void gdbarch_free (struct gdbarch *);
|
| 2607 |
|
|
|
| 2608 |
|
|
|
| 2609 |
|
|
/* Helper function. Force an update of the current architecture.
|
| 2610 |
|
|
|
| 2611 |
|
|
The actual architecture selected is determined by INFO, ``(gdb) set
|
| 2612 |
|
|
architecture'' et.al., the existing architecture and BFD's default
|
| 2613 |
|
|
architecture. INFO should be initialized to zero and then selected
|
| 2614 |
|
|
fields should be updated.
|
| 2615 |
|
|
|
| 2616 |
|
|
Returns non-zero if the update succeeds */
|
| 2617 |
|
|
|
| 2618 |
|
|
extern int gdbarch_update_p (struct gdbarch_info info);
|
| 2619 |
|
|
|
| 2620 |
|
|
|
| 2621 |
|
|
|
| 2622 |
|
|
/* Register per-architecture data-pointer.
|
| 2623 |
|
|
|
| 2624 |
|
|
Reserve space for a per-architecture data-pointer. An identifier
|
| 2625 |
|
|
for the reserved data-pointer is returned. That identifer should
|
| 2626 |
|
|
be saved in a local static variable.
|
| 2627 |
|
|
|
| 2628 |
|
|
The per-architecture data-pointer is either initialized explicitly
|
| 2629 |
|
|
(set_gdbarch_data()) or implicitly (by INIT() via a call to
|
| 2630 |
|
|
gdbarch_data()). FREE() is called to delete either an existing
|
| 2631 |
|
|
data-pointer overridden by set_gdbarch_data() or when the
|
| 2632 |
|
|
architecture object is being deleted.
|
| 2633 |
|
|
|
| 2634 |
|
|
When a previously created architecture is re-selected, the
|
| 2635 |
|
|
per-architecture data-pointer for that previous architecture is
|
| 2636 |
|
|
restored. INIT() is not re-called.
|
| 2637 |
|
|
|
| 2638 |
|
|
Multiple registrarants for any architecture are allowed (and
|
| 2639 |
|
|
strongly encouraged). */
|
| 2640 |
|
|
|
| 2641 |
|
|
struct gdbarch_data;
|
| 2642 |
|
|
|
| 2643 |
|
|
typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
|
| 2644 |
|
|
typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
|
| 2645 |
|
|
void *pointer);
|
| 2646 |
|
|
extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
|
| 2647 |
|
|
gdbarch_data_free_ftype *free);
|
| 2648 |
|
|
extern void set_gdbarch_data (struct gdbarch *gdbarch,
|
| 2649 |
|
|
struct gdbarch_data *data,
|
| 2650 |
|
|
void *pointer);
|
| 2651 |
|
|
|
| 2652 |
|
|
extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
|
| 2653 |
|
|
|
| 2654 |
|
|
|
| 2655 |
|
|
/* Register per-architecture memory region.
|
| 2656 |
|
|
|
| 2657 |
|
|
Provide a memory-region swap mechanism. Per-architecture memory
|
| 2658 |
|
|
region are created. These memory regions are swapped whenever the
|
| 2659 |
|
|
architecture is changed. For a new architecture, the memory region
|
| 2660 |
|
|
is initialized with zero (0) and the INIT function is called.
|
| 2661 |
|
|
|
| 2662 |
|
|
Memory regions are swapped / initialized in the order that they are
|
| 2663 |
|
|
registered. NULL DATA and/or INIT values can be specified.
|
| 2664 |
|
|
|
| 2665 |
|
|
New code should use register_gdbarch_data(). */
|
| 2666 |
|
|
|
| 2667 |
|
|
typedef void (gdbarch_swap_ftype) (void);
|
| 2668 |
|
|
extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
|
| 2669 |
|
|
#define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
|
| 2670 |
|
|
|
| 2671 |
|
|
|
| 2672 |
|
|
|
| 2673 |
|
|
/* The target-system-dependent byte order is dynamic */
|
| 2674 |
|
|
|
| 2675 |
|
|
extern int target_byte_order;
|
| 2676 |
|
|
#ifndef TARGET_BYTE_ORDER
|
| 2677 |
|
|
#define TARGET_BYTE_ORDER (target_byte_order + 0)
|
| 2678 |
|
|
#endif
|
| 2679 |
|
|
|
| 2680 |
|
|
extern int target_byte_order_auto;
|
| 2681 |
|
|
#ifndef TARGET_BYTE_ORDER_AUTO
|
| 2682 |
|
|
#define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
|
| 2683 |
|
|
#endif
|
| 2684 |
|
|
|
| 2685 |
|
|
|
| 2686 |
|
|
|
| 2687 |
|
|
/* The target-system-dependent BFD architecture is dynamic */
|
| 2688 |
|
|
|
| 2689 |
|
|
extern int target_architecture_auto;
|
| 2690 |
|
|
#ifndef TARGET_ARCHITECTURE_AUTO
|
| 2691 |
|
|
#define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
|
| 2692 |
|
|
#endif
|
| 2693 |
|
|
|
| 2694 |
|
|
extern const struct bfd_arch_info *target_architecture;
|
| 2695 |
|
|
#ifndef TARGET_ARCHITECTURE
|
| 2696 |
|
|
#define TARGET_ARCHITECTURE (target_architecture + 0)
|
| 2697 |
|
|
#endif
|
| 2698 |
|
|
|
| 2699 |
|
|
|
| 2700 |
|
|
/* The target-system-dependent disassembler is semi-dynamic */
|
| 2701 |
|
|
|
| 2702 |
|
|
extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
|
| 2703 |
|
|
unsigned int len, disassemble_info *info);
|
| 2704 |
|
|
|
| 2705 |
|
|
extern void dis_asm_memory_error (int status, bfd_vma memaddr,
|
| 2706 |
|
|
disassemble_info *info);
|
| 2707 |
|
|
|
| 2708 |
|
|
extern void dis_asm_print_address (bfd_vma addr,
|
| 2709 |
|
|
disassemble_info *info);
|
| 2710 |
|
|
|
| 2711 |
|
|
extern int (*tm_print_insn) (bfd_vma, disassemble_info*);
|
| 2712 |
|
|
extern disassemble_info tm_print_insn_info;
|
| 2713 |
|
|
#ifndef TARGET_PRINT_INSN_INFO
|
| 2714 |
|
|
#define TARGET_PRINT_INSN_INFO (&tm_print_insn_info)
|
| 2715 |
|
|
#endif
|
| 2716 |
|
|
|
| 2717 |
|
|
|
| 2718 |
|
|
|
| 2719 |
|
|
/* Set the dynamic target-system-dependent parameters (architecture,
|
| 2720 |
|
|
byte-order, ...) using information found in the BFD */
|
| 2721 |
|
|
|
| 2722 |
|
|
extern void set_gdbarch_from_file (bfd *);
|
| 2723 |
|
|
|
| 2724 |
|
|
|
| 2725 |
|
|
/* Initialize the current architecture to the "first" one we find on
|
| 2726 |
|
|
our list. */
|
| 2727 |
|
|
|
| 2728 |
|
|
extern void initialize_current_architecture (void);
|
| 2729 |
|
|
|
| 2730 |
|
|
/* For non-multiarched targets, do any initialization of the default
|
| 2731 |
|
|
gdbarch object necessary after the _initialize_MODULE functions
|
| 2732 |
|
|
have run. */
|
| 2733 |
|
|
extern void initialize_non_multiarch (void);
|
| 2734 |
|
|
|
| 2735 |
|
|
/* gdbarch trace variable */
|
| 2736 |
|
|
extern int gdbarch_debug;
|
| 2737 |
|
|
|
| 2738 |
|
|
extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);
|
| 2739 |
|
|
|
| 2740 |
|
|
#endif
|