Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
b83266a0 | 4 | Copyright 1998-1999, Free Software Foundation, Inc. |
c906108c | 5 | |
96baa820 JM |
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. | |
c906108c | 12 | |
96baa820 JM |
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. | |
c906108c | 17 | |
96baa820 JM |
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. */ | |
adf40b2e | 22 | |
104c1213 JM |
23 | /* This file was created with the aid of ``gdbarch.sh''. |
24 | ||
25 | The bourn 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 makeing sweeping changes | |
32 | to this file, modifying gdbarch.sh and using its output may prove | |
33 | easier. */ | |
c906108c | 34 | |
c906108c SS |
35 | |
36 | #include "defs.h" | |
1ad03bde | 37 | #include "arch-utils.h" |
c906108c | 38 | |
0f71a2f6 JM |
39 | #if GDB_MULTI_ARCH |
40 | #include "gdbcmd.h" | |
adf40b2e | 41 | #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */ |
0f71a2f6 | 42 | #else |
7a292a7a SS |
43 | /* Just include everything in sight so that the every old definition |
44 | of macro is visible. */ | |
45 | #include "gdb_string.h" | |
46 | #include <ctype.h> | |
47 | #include "symtab.h" | |
48 | #include "frame.h" | |
49 | #include "inferior.h" | |
50 | #include "breakpoint.h" | |
03f2053f | 51 | #include "gdb_wait.h" |
7a292a7a SS |
52 | #include "gdbcore.h" |
53 | #include "gdbcmd.h" | |
54 | #include "target.h" | |
55 | #include "gdbthread.h" | |
56 | #include "annotate.h" | |
57 | #include "symfile.h" /* for overlay functions */ | |
0f71a2f6 | 58 | #endif |
7a292a7a | 59 | #include "symcat.h" |
c906108c | 60 | |
f0d4cc9e | 61 | #include "floatformat.h" |
c906108c | 62 | |
104c1213 JM |
63 | /* Static function declarations */ |
64 | ||
65 | static void verify_gdbarch (struct gdbarch *gdbarch); | |
66 | static void init_gdbarch_data (struct gdbarch *); | |
67 | static void init_gdbarch_swap (struct gdbarch *); | |
68 | static void swapout_gdbarch_swap (struct gdbarch *); | |
69 | static void swapin_gdbarch_swap (struct gdbarch *); | |
70 | ||
0f71a2f6 JM |
71 | /* Convenience macro for allocting typesafe memory. */ |
72 | ||
73 | #ifndef XMALLOC | |
74 | #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE)) | |
75 | #endif | |
76 | ||
77 | ||
78 | /* Non-zero if we want to trace architecture code. */ | |
79 | ||
80 | #ifndef GDBARCH_DEBUG | |
81 | #define GDBARCH_DEBUG 0 | |
82 | #endif | |
83 | int gdbarch_debug = GDBARCH_DEBUG; | |
84 | ||
85 | ||
86 | /* Maintain the struct gdbarch object */ | |
87 | ||
88 | struct gdbarch | |
adf40b2e JM |
89 | { |
90 | /* basic architectural information */ | |
91 | const struct bfd_arch_info * bfd_arch_info; | |
92 | int byte_order; | |
0f71a2f6 | 93 | |
adf40b2e JM |
94 | /* target specific vector. */ |
95 | struct gdbarch_tdep *tdep; | |
4b9b3959 | 96 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 97 | |
adf40b2e JM |
98 | /* per-architecture data-pointers */ |
99 | int nr_data; | |
100 | void **data; | |
0f71a2f6 | 101 | |
adf40b2e JM |
102 | /* per-architecture swap-regions */ |
103 | struct gdbarch_swap *swap; | |
0f71a2f6 | 104 | |
adf40b2e | 105 | /* Multi-arch values. |
0f71a2f6 | 106 | |
adf40b2e | 107 | When extending this structure you must: |
0f71a2f6 | 108 | |
adf40b2e | 109 | Add the field below. |
0f71a2f6 | 110 | |
adf40b2e JM |
111 | Declare set/get functions and define the corresponding |
112 | macro in gdbarch.h. | |
0f71a2f6 | 113 | |
adf40b2e JM |
114 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
115 | initialize the new field. | |
0f71a2f6 | 116 | |
adf40b2e JM |
117 | verify_gdbarch(): Confirm that the target updated the field |
118 | correctly. | |
0f71a2f6 | 119 | |
adf40b2e JM |
120 | gdbarch_dump(): Add a fprintf_unfiltered call to so that the new |
121 | field is dumped out | |
0f71a2f6 | 122 | |
c0e8c252 | 123 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 124 | variable (base values on the host's c-type system). |
0f71a2f6 | 125 | |
adf40b2e JM |
126 | get_gdbarch(): Implement the set/get functions (probably using |
127 | the macro's as shortcuts). | |
0f71a2f6 JM |
128 | |
129 | */ | |
130 | ||
c4093a6a | 131 | int bfd_vma_bit; |
adf40b2e JM |
132 | int ptr_bit; |
133 | int short_bit; | |
134 | int int_bit; | |
135 | int long_bit; | |
136 | int long_long_bit; | |
137 | int float_bit; | |
138 | int double_bit; | |
139 | int long_double_bit; | |
7355ddba | 140 | int ieee_float; |
adf40b2e JM |
141 | gdbarch_read_pc_ftype *read_pc; |
142 | gdbarch_write_pc_ftype *write_pc; | |
143 | gdbarch_read_fp_ftype *read_fp; | |
144 | gdbarch_write_fp_ftype *write_fp; | |
145 | gdbarch_read_sp_ftype *read_sp; | |
146 | gdbarch_write_sp_ftype *write_sp; | |
147 | int num_regs; | |
0aba1244 | 148 | int num_pseudo_regs; |
adf40b2e JM |
149 | int sp_regnum; |
150 | int fp_regnum; | |
151 | int pc_regnum; | |
60054393 | 152 | int fp0_regnum; |
03863182 AC |
153 | int npc_regnum; |
154 | int nnpc_regnum; | |
adf40b2e JM |
155 | gdbarch_register_name_ftype *register_name; |
156 | int register_size; | |
157 | int register_bytes; | |
158 | gdbarch_register_byte_ftype *register_byte; | |
159 | gdbarch_register_raw_size_ftype *register_raw_size; | |
160 | int max_register_raw_size; | |
161 | gdbarch_register_virtual_size_ftype *register_virtual_size; | |
162 | int max_register_virtual_size; | |
163 | gdbarch_register_virtual_type_ftype *register_virtual_type; | |
666e11c5 | 164 | gdbarch_do_registers_info_ftype *do_registers_info; |
7c7651b2 | 165 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
adf40b2e JM |
166 | int use_generic_dummy_frames; |
167 | int call_dummy_location; | |
168 | gdbarch_call_dummy_address_ftype *call_dummy_address; | |
169 | CORE_ADDR call_dummy_start_offset; | |
170 | CORE_ADDR call_dummy_breakpoint_offset; | |
171 | int call_dummy_breakpoint_offset_p; | |
172 | int call_dummy_length; | |
173 | gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy; | |
174 | int call_dummy_p; | |
175 | LONGEST * call_dummy_words; | |
176 | int sizeof_call_dummy_words; | |
177 | int call_dummy_stack_adjust_p; | |
178 | int call_dummy_stack_adjust; | |
179 | gdbarch_fix_call_dummy_ftype *fix_call_dummy; | |
180 | int believe_pcc_promotion; | |
181 | int believe_pcc_promotion_type; | |
b9a8e3bf | 182 | gdbarch_coerce_float_to_double_ftype *coerce_float_to_double; |
adf40b2e JM |
183 | gdbarch_get_saved_register_ftype *get_saved_register; |
184 | gdbarch_register_convertible_ftype *register_convertible; | |
185 | gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual; | |
186 | gdbarch_register_convert_to_raw_ftype *register_convert_to_raw; | |
7f1b2585 EZ |
187 | gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register; |
188 | gdbarch_store_pseudo_register_ftype *store_pseudo_register; | |
4478b372 JB |
189 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
190 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
71a9f22e | 191 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; |
adf40b2e JM |
192 | gdbarch_extract_return_value_ftype *extract_return_value; |
193 | gdbarch_push_arguments_ftype *push_arguments; | |
194 | gdbarch_push_dummy_frame_ftype *push_dummy_frame; | |
195 | gdbarch_push_return_address_ftype *push_return_address; | |
196 | gdbarch_pop_frame_ftype *pop_frame; | |
197 | gdbarch_d10v_make_daddr_ftype *d10v_make_daddr; | |
198 | gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr; | |
199 | gdbarch_d10v_daddr_p_ftype *d10v_daddr_p; | |
200 | gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p; | |
201 | gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw; | |
202 | gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw; | |
203 | gdbarch_store_struct_return_ftype *store_struct_return; | |
204 | gdbarch_store_return_value_ftype *store_return_value; | |
205 | gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; | |
206 | gdbarch_use_struct_convention_ftype *use_struct_convention; | |
207 | gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; | |
208 | gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; | |
209 | gdbarch_skip_prologue_ftype *skip_prologue; | |
dad41f9a | 210 | gdbarch_prologue_frameless_p_ftype *prologue_frameless_p; |
adf40b2e JM |
211 | gdbarch_inner_than_ftype *inner_than; |
212 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
917317f4 JM |
213 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
214 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e JM |
215 | CORE_ADDR decr_pc_after_break; |
216 | CORE_ADDR function_start_offset; | |
217 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; | |
218 | CORE_ADDR frame_args_skip; | |
219 | gdbarch_frameless_function_invocation_ftype *frameless_function_invocation; | |
220 | gdbarch_frame_chain_ftype *frame_chain; | |
221 | gdbarch_frame_chain_valid_ftype *frame_chain_valid; | |
222 | gdbarch_frame_saved_pc_ftype *frame_saved_pc; | |
223 | gdbarch_frame_args_address_ftype *frame_args_address; | |
224 | gdbarch_frame_locals_address_ftype *frame_locals_address; | |
225 | gdbarch_saved_pc_after_call_ftype *saved_pc_after_call; | |
226 | gdbarch_frame_num_args_ftype *frame_num_args; | |
2ada493a | 227 | gdbarch_stack_align_ftype *stack_align; |
d03e67c9 | 228 | gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; |
d1e3cf49 | 229 | gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; |
f0d4cc9e AC |
230 | const struct floatformat * float_format; |
231 | const struct floatformat * double_format; | |
232 | const struct floatformat * long_double_format; | |
adf40b2e | 233 | }; |
0f71a2f6 JM |
234 | |
235 | ||
236 | /* The default architecture uses host values (for want of a better | |
237 | choice). */ | |
238 | ||
239 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
240 | ||
4b9b3959 AC |
241 | struct gdbarch startup_gdbarch = |
242 | { | |
0f71a2f6 JM |
243 | /* basic architecture information */ |
244 | &bfd_default_arch_struct, | |
245 | BIG_ENDIAN, | |
4b9b3959 AC |
246 | /* target specific vector and its dump routine */ |
247 | NULL, NULL, | |
0f71a2f6 JM |
248 | /*per-architecture data-pointers and swap regions */ |
249 | 0, NULL, NULL, | |
250 | /* Multi-arch values */ | |
adf40b2e | 251 | 8 * sizeof (void*), |
c4093a6a | 252 | 8 * sizeof (void*), |
0f71a2f6 JM |
253 | 8 * sizeof (short), |
254 | 8 * sizeof (int), | |
255 | 8 * sizeof (long), | |
256 | 8 * sizeof (LONGEST), | |
257 | 8 * sizeof (float), | |
258 | 8 * sizeof (double), | |
259 | 8 * sizeof (long double), | |
260 | 0, | |
261 | 0, | |
262 | 0, | |
263 | 0, | |
264 | 0, | |
265 | 0, | |
266 | 0, | |
267 | 0, | |
268 | 0, | |
269 | 0, | |
270 | 0, | |
271 | 0, | |
272 | 0, | |
273 | 0, | |
274 | 0, | |
275 | 0, | |
276 | 0, | |
277 | 0, | |
278 | 0, | |
279 | 0, | |
280 | 0, | |
281 | 0, | |
282 | 0, | |
283 | 0, | |
284 | 0, | |
285 | 0, | |
286 | 0, | |
287 | 0, | |
288 | 0, | |
289 | 0, | |
290 | 0, | |
291 | 0, | |
292 | 0, | |
293 | 0, | |
294 | 0, | |
b9a8e3bf | 295 | 0, |
7355ddba | 296 | 0, |
03863182 AC |
297 | 0, |
298 | 0, | |
60054393 | 299 | 0, |
0aba1244 | 300 | 0, |
666e11c5 | 301 | 0, |
7c7651b2 | 302 | 0, |
0f71a2f6 JM |
303 | generic_get_saved_register, |
304 | 0, | |
305 | 0, | |
306 | 0, | |
307 | 0, | |
308 | 0, | |
309 | 0, | |
310 | 0, | |
311 | 0, | |
312 | 0, | |
313 | 0, | |
314 | 0, | |
315 | 0, | |
316 | 0, | |
317 | 0, | |
318 | 0, | |
319 | 0, | |
320 | 0, | |
321 | 0, | |
322 | 0, | |
323 | 0, | |
324 | 0, | |
325 | 0, | |
326 | 0, | |
327 | 0, | |
328 | 0, | |
329 | 0, | |
330 | 0, | |
331 | 0, | |
332 | 0, | |
333 | 0, | |
334 | 0, | |
335 | 0, | |
336 | 0, | |
337 | 0, | |
338 | 0, | |
917317f4 JM |
339 | 0, |
340 | 0, | |
4478b372 JB |
341 | 0, |
342 | 0, | |
71a9f22e | 343 | 0, |
2ada493a | 344 | 0, |
d03e67c9 | 345 | 0, |
dad41f9a | 346 | 0, |
d1e3cf49 | 347 | 0, |
f0d4cc9e AC |
348 | 0, |
349 | 0, | |
350 | 0, | |
7f1b2585 EZ |
351 | 0, |
352 | 0, | |
c0e8c252 | 353 | /* startup_gdbarch() */ |
0f71a2f6 | 354 | }; |
4b9b3959 | 355 | |
c0e8c252 | 356 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
0f71a2f6 JM |
357 | |
358 | ||
359 | /* Create a new ``struct gdbarch'' based in information provided by | |
360 | ``struct gdbarch_info''. */ | |
361 | ||
362 | struct gdbarch * | |
104c1213 JM |
363 | gdbarch_alloc (const struct gdbarch_info *info, |
364 | struct gdbarch_tdep *tdep) | |
0f71a2f6 JM |
365 | { |
366 | struct gdbarch *gdbarch = XMALLOC (struct gdbarch); | |
367 | memset (gdbarch, 0, sizeof (*gdbarch)); | |
368 | ||
369 | gdbarch->tdep = tdep; | |
370 | ||
371 | gdbarch->bfd_arch_info = info->bfd_arch_info; | |
372 | gdbarch->byte_order = info->byte_order; | |
373 | ||
374 | /* Force the explicit initialization of these. */ | |
c4093a6a | 375 | gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; |
0f71a2f6 JM |
376 | gdbarch->num_regs = -1; |
377 | gdbarch->sp_regnum = -1; | |
378 | gdbarch->fp_regnum = -1; | |
379 | gdbarch->pc_regnum = -1; | |
60054393 | 380 | gdbarch->fp0_regnum = -1; |
03863182 AC |
381 | gdbarch->npc_regnum = -1; |
382 | gdbarch->nnpc_regnum = -1; | |
c0e8c252 | 383 | gdbarch->register_name = legacy_register_name; |
0f71a2f6 JM |
384 | gdbarch->register_size = -1; |
385 | gdbarch->register_bytes = -1; | |
386 | gdbarch->max_register_raw_size = -1; | |
387 | gdbarch->max_register_virtual_size = -1; | |
666e11c5 | 388 | gdbarch->do_registers_info = do_registers_info; |
7c7651b2 | 389 | gdbarch->register_sim_regno = default_register_sim_regno; |
0f71a2f6 JM |
390 | gdbarch->use_generic_dummy_frames = -1; |
391 | gdbarch->call_dummy_start_offset = -1; | |
392 | gdbarch->call_dummy_breakpoint_offset = -1; | |
393 | gdbarch->call_dummy_breakpoint_offset_p = -1; | |
394 | gdbarch->call_dummy_length = -1; | |
395 | gdbarch->call_dummy_p = -1; | |
c0e8c252 AC |
396 | gdbarch->call_dummy_words = legacy_call_dummy_words; |
397 | gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; | |
0f71a2f6 | 398 | gdbarch->call_dummy_stack_adjust_p = -1; |
b9a8e3bf | 399 | gdbarch->coerce_float_to_double = default_coerce_float_to_double; |
c0e8c252 | 400 | gdbarch->register_convertible = generic_register_convertible_not; |
ac2e2ef7 AC |
401 | gdbarch->pointer_to_address = unsigned_pointer_to_address; |
402 | gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
71a9f22e | 403 | gdbarch->return_value_on_stack = generic_return_value_on_stack_not; |
dad41f9a | 404 | gdbarch->prologue_frameless_p = generic_prologue_frameless_p; |
c0e8c252 | 405 | gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc; |
917317f4 JM |
406 | gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
407 | gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
0f71a2f6 JM |
408 | gdbarch->decr_pc_after_break = -1; |
409 | gdbarch->function_start_offset = -1; | |
c0e8c252 | 410 | gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; |
0f71a2f6 | 411 | gdbarch->frame_args_skip = -1; |
c0e8c252 | 412 | gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not; |
0f71a2f6 JM |
413 | /* gdbarch_alloc() */ |
414 | ||
415 | return gdbarch; | |
416 | } | |
417 | ||
418 | ||
058f20d5 JB |
419 | /* Free a gdbarch struct. This should never happen in normal |
420 | operation --- once you've created a gdbarch, you keep it around. | |
421 | However, if an architecture's init function encounters an error | |
422 | building the structure, it may need to clean up a partially | |
423 | constructed gdbarch. */ | |
4b9b3959 | 424 | |
058f20d5 JB |
425 | void |
426 | gdbarch_free (struct gdbarch *arch) | |
427 | { | |
428 | /* At the moment, this is trivial. */ | |
429 | free (arch); | |
430 | } | |
431 | ||
432 | ||
0f71a2f6 JM |
433 | /* Ensure that all values in a GDBARCH are reasonable. */ |
434 | ||
0f71a2f6 | 435 | static void |
104c1213 | 436 | verify_gdbarch (struct gdbarch *gdbarch) |
0f71a2f6 JM |
437 | { |
438 | /* Only perform sanity checks on a multi-arch target. */ | |
6166d547 | 439 | if (!GDB_MULTI_ARCH) |
0f71a2f6 JM |
440 | return; |
441 | /* fundamental */ | |
442 | if (gdbarch->byte_order == 0) | |
96baa820 | 443 | internal_error ("verify_gdbarch: byte-order unset"); |
0f71a2f6 | 444 | if (gdbarch->bfd_arch_info == NULL) |
96baa820 | 445 | internal_error ("verify_gdbarch: bfd_arch_info unset"); |
0f71a2f6 | 446 | /* Check those that need to be defined for the given multi-arch level. */ |
c0e8c252 | 447 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
0f71a2f6 JM |
448 | if ((GDB_MULTI_ARCH >= 1) |
449 | && (gdbarch->ptr_bit == 0)) | |
96baa820 | 450 | internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid"); |
0f71a2f6 JM |
451 | if ((GDB_MULTI_ARCH >= 1) |
452 | && (gdbarch->short_bit == 0)) | |
96baa820 | 453 | internal_error ("gdbarch: verify_gdbarch: short_bit invalid"); |
0f71a2f6 JM |
454 | if ((GDB_MULTI_ARCH >= 1) |
455 | && (gdbarch->int_bit == 0)) | |
96baa820 | 456 | internal_error ("gdbarch: verify_gdbarch: int_bit invalid"); |
0f71a2f6 JM |
457 | if ((GDB_MULTI_ARCH >= 1) |
458 | && (gdbarch->long_bit == 0)) | |
96baa820 | 459 | internal_error ("gdbarch: verify_gdbarch: long_bit invalid"); |
0f71a2f6 JM |
460 | if ((GDB_MULTI_ARCH >= 1) |
461 | && (gdbarch->long_long_bit == 0)) | |
96baa820 | 462 | internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid"); |
0f71a2f6 JM |
463 | if ((GDB_MULTI_ARCH >= 1) |
464 | && (gdbarch->float_bit == 0)) | |
96baa820 | 465 | internal_error ("gdbarch: verify_gdbarch: float_bit invalid"); |
0f71a2f6 JM |
466 | if ((GDB_MULTI_ARCH >= 1) |
467 | && (gdbarch->double_bit == 0)) | |
96baa820 | 468 | internal_error ("gdbarch: verify_gdbarch: double_bit invalid"); |
0f71a2f6 JM |
469 | if ((GDB_MULTI_ARCH >= 1) |
470 | && (gdbarch->long_double_bit == 0)) | |
96baa820 | 471 | internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid"); |
7355ddba | 472 | /* Skip verify of ieee_float, invalid_p == 0 */ |
0f71a2f6 JM |
473 | if ((GDB_MULTI_ARCH >= 1) |
474 | && (gdbarch->read_pc == 0)) | |
96baa820 | 475 | internal_error ("gdbarch: verify_gdbarch: read_pc invalid"); |
0f71a2f6 JM |
476 | if ((GDB_MULTI_ARCH >= 1) |
477 | && (gdbarch->write_pc == 0)) | |
96baa820 | 478 | internal_error ("gdbarch: verify_gdbarch: write_pc invalid"); |
0f71a2f6 JM |
479 | if ((GDB_MULTI_ARCH >= 1) |
480 | && (gdbarch->read_fp == 0)) | |
96baa820 | 481 | internal_error ("gdbarch: verify_gdbarch: read_fp invalid"); |
0f71a2f6 JM |
482 | if ((GDB_MULTI_ARCH >= 1) |
483 | && (gdbarch->write_fp == 0)) | |
96baa820 | 484 | internal_error ("gdbarch: verify_gdbarch: write_fp invalid"); |
0f71a2f6 JM |
485 | if ((GDB_MULTI_ARCH >= 1) |
486 | && (gdbarch->read_sp == 0)) | |
96baa820 | 487 | internal_error ("gdbarch: verify_gdbarch: read_sp invalid"); |
0f71a2f6 JM |
488 | if ((GDB_MULTI_ARCH >= 1) |
489 | && (gdbarch->write_sp == 0)) | |
96baa820 | 490 | internal_error ("gdbarch: verify_gdbarch: write_sp invalid"); |
0f71a2f6 JM |
491 | if ((GDB_MULTI_ARCH >= 2) |
492 | && (gdbarch->num_regs == -1)) | |
96baa820 | 493 | internal_error ("gdbarch: verify_gdbarch: num_regs invalid"); |
0aba1244 | 494 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
0f71a2f6 JM |
495 | if ((GDB_MULTI_ARCH >= 2) |
496 | && (gdbarch->sp_regnum == -1)) | |
96baa820 | 497 | internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid"); |
0f71a2f6 JM |
498 | if ((GDB_MULTI_ARCH >= 2) |
499 | && (gdbarch->fp_regnum == -1)) | |
96baa820 | 500 | internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid"); |
0f71a2f6 JM |
501 | if ((GDB_MULTI_ARCH >= 2) |
502 | && (gdbarch->pc_regnum == -1)) | |
96baa820 | 503 | internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid"); |
60054393 | 504 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
03863182 AC |
505 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
506 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ | |
c0e8c252 | 507 | /* Skip verify of register_name, invalid_p == 0 */ |
0f71a2f6 JM |
508 | if ((GDB_MULTI_ARCH >= 2) |
509 | && (gdbarch->register_size == -1)) | |
96baa820 | 510 | internal_error ("gdbarch: verify_gdbarch: register_size invalid"); |
0f71a2f6 JM |
511 | if ((GDB_MULTI_ARCH >= 2) |
512 | && (gdbarch->register_bytes == -1)) | |
96baa820 | 513 | internal_error ("gdbarch: verify_gdbarch: register_bytes invalid"); |
0f71a2f6 JM |
514 | if ((GDB_MULTI_ARCH >= 2) |
515 | && (gdbarch->register_byte == 0)) | |
96baa820 | 516 | internal_error ("gdbarch: verify_gdbarch: register_byte invalid"); |
0f71a2f6 JM |
517 | if ((GDB_MULTI_ARCH >= 2) |
518 | && (gdbarch->register_raw_size == 0)) | |
96baa820 | 519 | internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid"); |
0f71a2f6 JM |
520 | if ((GDB_MULTI_ARCH >= 2) |
521 | && (gdbarch->max_register_raw_size == -1)) | |
96baa820 | 522 | internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid"); |
0f71a2f6 JM |
523 | if ((GDB_MULTI_ARCH >= 2) |
524 | && (gdbarch->register_virtual_size == 0)) | |
96baa820 | 525 | internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid"); |
0f71a2f6 JM |
526 | if ((GDB_MULTI_ARCH >= 2) |
527 | && (gdbarch->max_register_virtual_size == -1)) | |
96baa820 | 528 | internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid"); |
0f71a2f6 JM |
529 | if ((GDB_MULTI_ARCH >= 2) |
530 | && (gdbarch->register_virtual_type == 0)) | |
96baa820 | 531 | internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid"); |
666e11c5 | 532 | /* Skip verify of do_registers_info, invalid_p == 0 */ |
7c7651b2 | 533 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
0f71a2f6 JM |
534 | if ((GDB_MULTI_ARCH >= 1) |
535 | && (gdbarch->use_generic_dummy_frames == -1)) | |
96baa820 | 536 | internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid"); |
0f71a2f6 JM |
537 | if ((GDB_MULTI_ARCH >= 2) |
538 | && (gdbarch->call_dummy_location == 0)) | |
96baa820 | 539 | internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid"); |
0f71a2f6 JM |
540 | if ((GDB_MULTI_ARCH >= 2) |
541 | && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) | |
96baa820 | 542 | internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid"); |
0f71a2f6 JM |
543 | if ((GDB_MULTI_ARCH >= 2) |
544 | && (gdbarch->call_dummy_start_offset == -1)) | |
96baa820 | 545 | internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid"); |
0f71a2f6 JM |
546 | if ((GDB_MULTI_ARCH >= 2) |
547 | && (gdbarch->call_dummy_breakpoint_offset == -1)) | |
96baa820 | 548 | internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid"); |
0f71a2f6 JM |
549 | if ((GDB_MULTI_ARCH >= 1) |
550 | && (gdbarch->call_dummy_breakpoint_offset_p == -1)) | |
96baa820 | 551 | internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid"); |
0f71a2f6 JM |
552 | if ((GDB_MULTI_ARCH >= 2) |
553 | && (gdbarch->call_dummy_length == -1)) | |
96baa820 | 554 | internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid"); |
0f71a2f6 JM |
555 | if ((GDB_MULTI_ARCH >= 2) |
556 | && (gdbarch->pc_in_call_dummy == 0)) | |
96baa820 | 557 | internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid"); |
0f71a2f6 JM |
558 | if ((GDB_MULTI_ARCH >= 1) |
559 | && (gdbarch->call_dummy_p == -1)) | |
96baa820 | 560 | internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid"); |
c0e8c252 AC |
561 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
562 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ | |
0f71a2f6 JM |
563 | if ((GDB_MULTI_ARCH >= 1) |
564 | && (gdbarch->call_dummy_stack_adjust_p == -1)) | |
96baa820 | 565 | internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid"); |
0f71a2f6 JM |
566 | if ((GDB_MULTI_ARCH >= 2) |
567 | && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)) | |
96baa820 | 568 | internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid"); |
0f71a2f6 JM |
569 | if ((GDB_MULTI_ARCH >= 2) |
570 | && (gdbarch->fix_call_dummy == 0)) | |
96baa820 | 571 | internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid"); |
c0e8c252 | 572 | /* Skip verify of coerce_float_to_double, invalid_p == 0 */ |
0f71a2f6 JM |
573 | if ((GDB_MULTI_ARCH >= 1) |
574 | && (gdbarch->get_saved_register == 0)) | |
96baa820 | 575 | internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid"); |
c0e8c252 AC |
576 | /* Skip verify of register_convertible, invalid_p == 0 */ |
577 | /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ | |
578 | /* Skip verify of register_convert_to_raw, invalid_p == 0 */ | |
7f1b2585 EZ |
579 | /* Skip verify of fetch_pseudo_register, invalid_p == 0 */ |
580 | /* Skip verify of store_pseudo_register, invalid_p == 0 */ | |
4478b372 JB |
581 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
582 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
71a9f22e | 583 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ |
0f71a2f6 JM |
584 | if ((GDB_MULTI_ARCH >= 2) |
585 | && (gdbarch->extract_return_value == 0)) | |
96baa820 | 586 | internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid"); |
0f71a2f6 JM |
587 | if ((GDB_MULTI_ARCH >= 1) |
588 | && (gdbarch->push_arguments == 0)) | |
96baa820 | 589 | internal_error ("gdbarch: verify_gdbarch: push_arguments invalid"); |
0f71a2f6 JM |
590 | if ((GDB_MULTI_ARCH >= 2) |
591 | && (gdbarch->push_dummy_frame == 0)) | |
96baa820 | 592 | internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid"); |
0f71a2f6 JM |
593 | if ((GDB_MULTI_ARCH >= 1) |
594 | && (gdbarch->push_return_address == 0)) | |
96baa820 | 595 | internal_error ("gdbarch: verify_gdbarch: push_return_address invalid"); |
0f71a2f6 JM |
596 | if ((GDB_MULTI_ARCH >= 2) |
597 | && (gdbarch->pop_frame == 0)) | |
96baa820 | 598 | internal_error ("gdbarch: verify_gdbarch: pop_frame invalid"); |
c0e8c252 AC |
599 | /* Skip verify of d10v_make_daddr, invalid_p == 0 */ |
600 | /* Skip verify of d10v_make_iaddr, invalid_p == 0 */ | |
06b8da7d MS |
601 | /* Skip verify of d10v_daddr_p, invalid_p == 0 */ |
602 | /* Skip verify of d10v_iaddr_p, invalid_p == 0 */ | |
603 | /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */ | |
604 | /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */ | |
0f71a2f6 JM |
605 | if ((GDB_MULTI_ARCH >= 2) |
606 | && (gdbarch->store_struct_return == 0)) | |
96baa820 | 607 | internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid"); |
0f71a2f6 JM |
608 | if ((GDB_MULTI_ARCH >= 2) |
609 | && (gdbarch->store_return_value == 0)) | |
96baa820 | 610 | internal_error ("gdbarch: verify_gdbarch: store_return_value invalid"); |
0f71a2f6 JM |
611 | if ((GDB_MULTI_ARCH >= 2) |
612 | && (gdbarch->extract_struct_value_address == 0)) | |
96baa820 | 613 | internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid"); |
0f71a2f6 JM |
614 | if ((GDB_MULTI_ARCH >= 2) |
615 | && (gdbarch->use_struct_convention == 0)) | |
96baa820 | 616 | internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid"); |
0f71a2f6 JM |
617 | if ((GDB_MULTI_ARCH >= 2) |
618 | && (gdbarch->frame_init_saved_regs == 0)) | |
96baa820 | 619 | internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid"); |
0f71a2f6 JM |
620 | if ((GDB_MULTI_ARCH >= 2) |
621 | && (gdbarch->init_extra_frame_info == 0)) | |
96baa820 | 622 | internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid"); |
0f71a2f6 JM |
623 | if ((GDB_MULTI_ARCH >= 2) |
624 | && (gdbarch->skip_prologue == 0)) | |
96baa820 | 625 | internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid"); |
dad41f9a | 626 | /* Skip verify of prologue_frameless_p, invalid_p == 0 */ |
0f71a2f6 JM |
627 | if ((GDB_MULTI_ARCH >= 2) |
628 | && (gdbarch->inner_than == 0)) | |
96baa820 | 629 | internal_error ("gdbarch: verify_gdbarch: inner_than invalid"); |
c0e8c252 AC |
630 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
631 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ | |
632 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
0f71a2f6 JM |
633 | if ((GDB_MULTI_ARCH >= 2) |
634 | && (gdbarch->decr_pc_after_break == -1)) | |
96baa820 | 635 | internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid"); |
0f71a2f6 JM |
636 | if ((GDB_MULTI_ARCH >= 2) |
637 | && (gdbarch->function_start_offset == -1)) | |
96baa820 | 638 | internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid"); |
c0e8c252 | 639 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
0f71a2f6 JM |
640 | if ((GDB_MULTI_ARCH >= 2) |
641 | && (gdbarch->frame_args_skip == -1)) | |
96baa820 | 642 | internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid"); |
c0e8c252 | 643 | /* Skip verify of frameless_function_invocation, invalid_p == 0 */ |
0f71a2f6 JM |
644 | if ((GDB_MULTI_ARCH >= 2) |
645 | && (gdbarch->frame_chain == 0)) | |
96baa820 | 646 | internal_error ("gdbarch: verify_gdbarch: frame_chain invalid"); |
0f71a2f6 JM |
647 | if ((GDB_MULTI_ARCH >= 1) |
648 | && (gdbarch->frame_chain_valid == 0)) | |
96baa820 | 649 | internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid"); |
0f71a2f6 JM |
650 | if ((GDB_MULTI_ARCH >= 2) |
651 | && (gdbarch->frame_saved_pc == 0)) | |
96baa820 | 652 | internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid"); |
0f71a2f6 JM |
653 | if ((GDB_MULTI_ARCH >= 2) |
654 | && (gdbarch->frame_args_address == 0)) | |
96baa820 | 655 | internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid"); |
0f71a2f6 JM |
656 | if ((GDB_MULTI_ARCH >= 2) |
657 | && (gdbarch->frame_locals_address == 0)) | |
96baa820 | 658 | internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid"); |
0f71a2f6 JM |
659 | if ((GDB_MULTI_ARCH >= 2) |
660 | && (gdbarch->saved_pc_after_call == 0)) | |
96baa820 | 661 | internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid"); |
0f71a2f6 JM |
662 | if ((GDB_MULTI_ARCH >= 2) |
663 | && (gdbarch->frame_num_args == 0)) | |
96baa820 | 664 | internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid"); |
2ada493a | 665 | /* Skip verify of stack_align, has predicate */ |
d03e67c9 | 666 | /* Skip verify of reg_struct_has_addr, has predicate */ |
d1e3cf49 | 667 | /* Skip verify of save_dummy_frame_tos, has predicate */ |
f0d4cc9e AC |
668 | if (gdbarch->float_format == 0) |
669 | gdbarch->float_format = default_float_format (gdbarch); | |
670 | if (gdbarch->double_format == 0) | |
671 | gdbarch->double_format = default_double_format (gdbarch); | |
672 | if (gdbarch->long_double_format == 0) | |
673 | gdbarch->long_double_format = &floatformat_unknown; | |
0f71a2f6 JM |
674 | } |
675 | ||
676 | ||
677 | /* Print out the details of the current architecture. */ | |
678 | ||
4b9b3959 AC |
679 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
680 | just happens to match the global variable ``current_gdbarch''. That | |
681 | way macros refering to that variable get the local and not the global | |
682 | version - ulgh. Once everything is parameterised with gdbarch, this | |
683 | will go away. */ | |
684 | ||
0f71a2f6 | 685 | void |
4b9b3959 | 686 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
0f71a2f6 | 687 | { |
4b9b3959 AC |
688 | fprintf_unfiltered (file, |
689 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", | |
690 | GDB_MULTI_ARCH); | |
691 | #ifdef TARGET_ARCHITECTURE | |
692 | fprintf_unfiltered (file, | |
693 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", | |
694 | XSTRING (TARGET_ARCHITECTURE)); | |
695 | #endif | |
696 | #ifdef TARGET_BYTE_ORDER | |
697 | fprintf_unfiltered (file, | |
698 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", | |
699 | XSTRING (TARGET_BYTE_ORDER)); | |
700 | #endif | |
701 | #ifdef TARGET_BFD_VMA_BIT | |
702 | fprintf_unfiltered (file, | |
703 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", | |
704 | XSTRING (TARGET_BFD_VMA_BIT)); | |
705 | #endif | |
706 | #ifdef TARGET_PTR_BIT | |
707 | fprintf_unfiltered (file, | |
708 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", | |
709 | XSTRING (TARGET_PTR_BIT)); | |
710 | #endif | |
711 | #ifdef TARGET_SHORT_BIT | |
712 | fprintf_unfiltered (file, | |
713 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", | |
714 | XSTRING (TARGET_SHORT_BIT)); | |
715 | #endif | |
716 | #ifdef TARGET_INT_BIT | |
717 | fprintf_unfiltered (file, | |
718 | "gdbarch_dump: TARGET_INT_BIT # %s\n", | |
719 | XSTRING (TARGET_INT_BIT)); | |
720 | #endif | |
721 | #ifdef TARGET_LONG_BIT | |
722 | fprintf_unfiltered (file, | |
723 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", | |
724 | XSTRING (TARGET_LONG_BIT)); | |
725 | #endif | |
726 | #ifdef TARGET_LONG_LONG_BIT | |
727 | fprintf_unfiltered (file, | |
728 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", | |
729 | XSTRING (TARGET_LONG_LONG_BIT)); | |
730 | #endif | |
731 | #ifdef TARGET_FLOAT_BIT | |
732 | fprintf_unfiltered (file, | |
733 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", | |
734 | XSTRING (TARGET_FLOAT_BIT)); | |
735 | #endif | |
736 | #ifdef TARGET_DOUBLE_BIT | |
737 | fprintf_unfiltered (file, | |
738 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", | |
739 | XSTRING (TARGET_DOUBLE_BIT)); | |
740 | #endif | |
741 | #ifdef TARGET_LONG_DOUBLE_BIT | |
742 | fprintf_unfiltered (file, | |
743 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", | |
744 | XSTRING (TARGET_LONG_DOUBLE_BIT)); | |
745 | #endif | |
746 | #ifdef IEEE_FLOAT | |
747 | fprintf_unfiltered (file, | |
748 | "gdbarch_dump: IEEE_FLOAT # %s\n", | |
749 | XSTRING (IEEE_FLOAT)); | |
750 | #endif | |
751 | #ifdef TARGET_READ_PC | |
752 | fprintf_unfiltered (file, | |
753 | "gdbarch_dump: %s # %s\n", | |
754 | "TARGET_READ_PC(pid)", | |
755 | XSTRING (TARGET_READ_PC (pid))); | |
756 | #endif | |
63e69063 AC |
757 | #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH |
758 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
759 | fprintf_unfiltered (file, |
760 | "gdbarch_dump: %s # %s\n", | |
761 | "TARGET_WRITE_PC(val, pid)", | |
762 | XSTRING (TARGET_WRITE_PC (val, pid))); | |
763 | #endif | |
764 | #ifdef TARGET_READ_FP | |
765 | fprintf_unfiltered (file, | |
766 | "gdbarch_dump: %s # %s\n", | |
767 | "TARGET_READ_FP()", | |
768 | XSTRING (TARGET_READ_FP ())); | |
769 | #endif | |
63e69063 AC |
770 | #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH |
771 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
772 | fprintf_unfiltered (file, |
773 | "gdbarch_dump: %s # %s\n", | |
774 | "TARGET_WRITE_FP(val)", | |
775 | XSTRING (TARGET_WRITE_FP (val))); | |
776 | #endif | |
777 | #ifdef TARGET_READ_SP | |
778 | fprintf_unfiltered (file, | |
779 | "gdbarch_dump: %s # %s\n", | |
780 | "TARGET_READ_SP()", | |
781 | XSTRING (TARGET_READ_SP ())); | |
782 | #endif | |
63e69063 AC |
783 | #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH |
784 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
785 | fprintf_unfiltered (file, |
786 | "gdbarch_dump: %s # %s\n", | |
787 | "TARGET_WRITE_SP(val)", | |
788 | XSTRING (TARGET_WRITE_SP (val))); | |
789 | #endif | |
790 | #ifdef NUM_REGS | |
791 | fprintf_unfiltered (file, | |
792 | "gdbarch_dump: NUM_REGS # %s\n", | |
793 | XSTRING (NUM_REGS)); | |
794 | #endif | |
0aba1244 EZ |
795 | #ifdef NUM_PSEUDO_REGS |
796 | fprintf_unfiltered (file, | |
797 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", | |
798 | XSTRING (NUM_PSEUDO_REGS)); | |
799 | #endif | |
4b9b3959 AC |
800 | #ifdef SP_REGNUM |
801 | fprintf_unfiltered (file, | |
802 | "gdbarch_dump: SP_REGNUM # %s\n", | |
803 | XSTRING (SP_REGNUM)); | |
804 | #endif | |
805 | #ifdef FP_REGNUM | |
806 | fprintf_unfiltered (file, | |
807 | "gdbarch_dump: FP_REGNUM # %s\n", | |
808 | XSTRING (FP_REGNUM)); | |
809 | #endif | |
810 | #ifdef PC_REGNUM | |
811 | fprintf_unfiltered (file, | |
812 | "gdbarch_dump: PC_REGNUM # %s\n", | |
813 | XSTRING (PC_REGNUM)); | |
814 | #endif | |
815 | #ifdef FP0_REGNUM | |
816 | fprintf_unfiltered (file, | |
817 | "gdbarch_dump: FP0_REGNUM # %s\n", | |
818 | XSTRING (FP0_REGNUM)); | |
819 | #endif | |
820 | #ifdef NPC_REGNUM | |
821 | fprintf_unfiltered (file, | |
822 | "gdbarch_dump: NPC_REGNUM # %s\n", | |
823 | XSTRING (NPC_REGNUM)); | |
824 | #endif | |
825 | #ifdef NNPC_REGNUM | |
826 | fprintf_unfiltered (file, | |
827 | "gdbarch_dump: NNPC_REGNUM # %s\n", | |
828 | XSTRING (NNPC_REGNUM)); | |
829 | #endif | |
830 | #ifdef REGISTER_NAME | |
831 | fprintf_unfiltered (file, | |
832 | "gdbarch_dump: %s # %s\n", | |
833 | "REGISTER_NAME(regnr)", | |
834 | XSTRING (REGISTER_NAME (regnr))); | |
835 | #endif | |
836 | #ifdef REGISTER_SIZE | |
837 | fprintf_unfiltered (file, | |
838 | "gdbarch_dump: REGISTER_SIZE # %s\n", | |
839 | XSTRING (REGISTER_SIZE)); | |
840 | #endif | |
841 | #ifdef REGISTER_BYTES | |
842 | fprintf_unfiltered (file, | |
843 | "gdbarch_dump: REGISTER_BYTES # %s\n", | |
844 | XSTRING (REGISTER_BYTES)); | |
845 | #endif | |
846 | #ifdef REGISTER_BYTE | |
847 | fprintf_unfiltered (file, | |
848 | "gdbarch_dump: %s # %s\n", | |
849 | "REGISTER_BYTE(reg_nr)", | |
850 | XSTRING (REGISTER_BYTE (reg_nr))); | |
851 | #endif | |
852 | #ifdef REGISTER_RAW_SIZE | |
853 | fprintf_unfiltered (file, | |
854 | "gdbarch_dump: %s # %s\n", | |
855 | "REGISTER_RAW_SIZE(reg_nr)", | |
856 | XSTRING (REGISTER_RAW_SIZE (reg_nr))); | |
857 | #endif | |
858 | #ifdef MAX_REGISTER_RAW_SIZE | |
859 | fprintf_unfiltered (file, | |
860 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n", | |
861 | XSTRING (MAX_REGISTER_RAW_SIZE)); | |
862 | #endif | |
863 | #ifdef REGISTER_VIRTUAL_SIZE | |
864 | fprintf_unfiltered (file, | |
865 | "gdbarch_dump: %s # %s\n", | |
866 | "REGISTER_VIRTUAL_SIZE(reg_nr)", | |
867 | XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr))); | |
868 | #endif | |
869 | #ifdef MAX_REGISTER_VIRTUAL_SIZE | |
870 | fprintf_unfiltered (file, | |
871 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n", | |
872 | XSTRING (MAX_REGISTER_VIRTUAL_SIZE)); | |
873 | #endif | |
874 | #ifdef REGISTER_VIRTUAL_TYPE | |
875 | fprintf_unfiltered (file, | |
876 | "gdbarch_dump: %s # %s\n", | |
877 | "REGISTER_VIRTUAL_TYPE(reg_nr)", | |
878 | XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr))); | |
879 | #endif | |
666e11c5 EZ |
880 | #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH |
881 | /* Macro might contain `[{}]' when not multi-arch */ | |
882 | fprintf_unfiltered (file, | |
883 | "gdbarch_dump: %s # %s\n", | |
884 | "DO_REGISTERS_INFO(reg_nr, fpregs)", | |
885 | XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs))); | |
886 | #endif | |
7c7651b2 AC |
887 | #ifdef REGISTER_SIM_REGNO |
888 | fprintf_unfiltered (file, | |
889 | "gdbarch_dump: %s # %s\n", | |
890 | "REGISTER_SIM_REGNO(reg_nr)", | |
891 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); | |
892 | #endif | |
4b9b3959 AC |
893 | #ifdef USE_GENERIC_DUMMY_FRAMES |
894 | fprintf_unfiltered (file, | |
895 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n", | |
896 | XSTRING (USE_GENERIC_DUMMY_FRAMES)); | |
897 | #endif | |
898 | #ifdef CALL_DUMMY_LOCATION | |
899 | fprintf_unfiltered (file, | |
900 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", | |
901 | XSTRING (CALL_DUMMY_LOCATION)); | |
902 | #endif | |
903 | #ifdef CALL_DUMMY_ADDRESS | |
904 | fprintf_unfiltered (file, | |
905 | "gdbarch_dump: %s # %s\n", | |
906 | "CALL_DUMMY_ADDRESS()", | |
907 | XSTRING (CALL_DUMMY_ADDRESS ())); | |
908 | #endif | |
909 | #ifdef CALL_DUMMY_START_OFFSET | |
910 | fprintf_unfiltered (file, | |
911 | "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", | |
912 | XSTRING (CALL_DUMMY_START_OFFSET)); | |
913 | #endif | |
914 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET | |
915 | fprintf_unfiltered (file, | |
916 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", | |
917 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); | |
918 | #endif | |
919 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P | |
920 | fprintf_unfiltered (file, | |
921 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", | |
922 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); | |
923 | #endif | |
924 | #ifdef CALL_DUMMY_LENGTH | |
925 | fprintf_unfiltered (file, | |
926 | "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", | |
927 | XSTRING (CALL_DUMMY_LENGTH)); | |
928 | #endif | |
929 | #ifdef PC_IN_CALL_DUMMY | |
930 | fprintf_unfiltered (file, | |
931 | "gdbarch_dump: %s # %s\n", | |
932 | "PC_IN_CALL_DUMMY(pc, sp, frame_address)", | |
933 | XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address))); | |
934 | #endif | |
935 | #ifdef CALL_DUMMY_P | |
936 | fprintf_unfiltered (file, | |
937 | "gdbarch_dump: CALL_DUMMY_P # %s\n", | |
938 | XSTRING (CALL_DUMMY_P)); | |
939 | #endif | |
940 | #ifdef CALL_DUMMY_WORDS | |
941 | fprintf_unfiltered (file, | |
942 | "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", | |
943 | XSTRING (CALL_DUMMY_WORDS)); | |
944 | #endif | |
945 | #ifdef SIZEOF_CALL_DUMMY_WORDS | |
946 | fprintf_unfiltered (file, | |
947 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", | |
948 | XSTRING (SIZEOF_CALL_DUMMY_WORDS)); | |
949 | #endif | |
950 | #ifdef CALL_DUMMY_STACK_ADJUST_P | |
951 | fprintf_unfiltered (file, | |
952 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n", | |
953 | XSTRING (CALL_DUMMY_STACK_ADJUST_P)); | |
954 | #endif | |
955 | #ifdef CALL_DUMMY_STACK_ADJUST | |
956 | fprintf_unfiltered (file, | |
957 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n", | |
958 | XSTRING (CALL_DUMMY_STACK_ADJUST)); | |
959 | #endif | |
63e69063 AC |
960 | #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH |
961 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
962 | fprintf_unfiltered (file, |
963 | "gdbarch_dump: %s # %s\n", | |
964 | "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", | |
965 | XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); | |
966 | #endif | |
967 | #ifdef BELIEVE_PCC_PROMOTION | |
968 | fprintf_unfiltered (file, | |
969 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", | |
970 | XSTRING (BELIEVE_PCC_PROMOTION)); | |
971 | #endif | |
972 | #ifdef BELIEVE_PCC_PROMOTION_TYPE | |
973 | fprintf_unfiltered (file, | |
974 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", | |
975 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); | |
976 | #endif | |
977 | #ifdef COERCE_FLOAT_TO_DOUBLE | |
978 | fprintf_unfiltered (file, | |
979 | "gdbarch_dump: %s # %s\n", | |
980 | "COERCE_FLOAT_TO_DOUBLE(formal, actual)", | |
981 | XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual))); | |
982 | #endif | |
63e69063 AC |
983 | #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH |
984 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
985 | fprintf_unfiltered (file, |
986 | "gdbarch_dump: %s # %s\n", | |
987 | "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", | |
988 | XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); | |
989 | #endif | |
990 | #ifdef REGISTER_CONVERTIBLE | |
991 | fprintf_unfiltered (file, | |
992 | "gdbarch_dump: %s # %s\n", | |
993 | "REGISTER_CONVERTIBLE(nr)", | |
994 | XSTRING (REGISTER_CONVERTIBLE (nr))); | |
995 | #endif | |
63e69063 AC |
996 | #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH |
997 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
998 | fprintf_unfiltered (file, |
999 | "gdbarch_dump: %s # %s\n", | |
1000 | "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", | |
1001 | XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); | |
1002 | #endif | |
63e69063 AC |
1003 | #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH |
1004 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1005 | fprintf_unfiltered (file, |
1006 | "gdbarch_dump: %s # %s\n", | |
1007 | "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", | |
1008 | XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); | |
1009 | #endif | |
7f1b2585 EZ |
1010 | #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH |
1011 | /* Macro might contain `[{}]' when not multi-arch */ | |
1012 | fprintf_unfiltered (file, | |
1013 | "gdbarch_dump: %s # %s\n", | |
1014 | "FETCH_PSEUDO_REGISTER(regnum)", | |
1015 | XSTRING (FETCH_PSEUDO_REGISTER (regnum))); | |
1016 | #endif | |
1017 | #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH | |
1018 | /* Macro might contain `[{}]' when not multi-arch */ | |
1019 | fprintf_unfiltered (file, | |
1020 | "gdbarch_dump: %s # %s\n", | |
1021 | "STORE_PSEUDO_REGISTER(regnum)", | |
1022 | XSTRING (STORE_PSEUDO_REGISTER (regnum))); | |
1023 | #endif | |
4b9b3959 AC |
1024 | #ifdef POINTER_TO_ADDRESS |
1025 | fprintf_unfiltered (file, | |
1026 | "gdbarch_dump: %s # %s\n", | |
1027 | "POINTER_TO_ADDRESS(type, buf)", | |
1028 | XSTRING (POINTER_TO_ADDRESS (type, buf))); | |
1029 | #endif | |
63e69063 AC |
1030 | #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH |
1031 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1032 | fprintf_unfiltered (file, |
1033 | "gdbarch_dump: %s # %s\n", | |
1034 | "ADDRESS_TO_POINTER(type, buf, addr)", | |
1035 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); | |
1036 | #endif | |
1037 | #ifdef RETURN_VALUE_ON_STACK | |
1038 | fprintf_unfiltered (file, | |
1039 | "gdbarch_dump: %s # %s\n", | |
1040 | "RETURN_VALUE_ON_STACK(type)", | |
1041 | XSTRING (RETURN_VALUE_ON_STACK (type))); | |
1042 | #endif | |
63e69063 AC |
1043 | #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH |
1044 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1045 | fprintf_unfiltered (file, |
1046 | "gdbarch_dump: %s # %s\n", | |
1047 | "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", | |
1048 | XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); | |
1049 | #endif | |
1050 | #ifdef PUSH_ARGUMENTS | |
1051 | fprintf_unfiltered (file, | |
1052 | "gdbarch_dump: %s # %s\n", | |
1053 | "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", | |
1054 | XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); | |
1055 | #endif | |
63e69063 AC |
1056 | #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH |
1057 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1058 | fprintf_unfiltered (file, |
1059 | "gdbarch_dump: %s # %s\n", | |
1060 | "PUSH_DUMMY_FRAME(-)", | |
1061 | XSTRING (PUSH_DUMMY_FRAME (-))); | |
1062 | #endif | |
1063 | #ifdef PUSH_RETURN_ADDRESS | |
1064 | fprintf_unfiltered (file, | |
1065 | "gdbarch_dump: %s # %s\n", | |
1066 | "PUSH_RETURN_ADDRESS(pc, sp)", | |
1067 | XSTRING (PUSH_RETURN_ADDRESS (pc, sp))); | |
1068 | #endif | |
63e69063 AC |
1069 | #if defined (POP_FRAME) && GDB_MULTI_ARCH |
1070 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1071 | fprintf_unfiltered (file, |
1072 | "gdbarch_dump: %s # %s\n", | |
1073 | "POP_FRAME(-)", | |
1074 | XSTRING (POP_FRAME (-))); | |
1075 | #endif | |
1076 | #ifdef D10V_MAKE_DADDR | |
1077 | fprintf_unfiltered (file, | |
1078 | "gdbarch_dump: %s # %s\n", | |
1079 | "D10V_MAKE_DADDR(x)", | |
1080 | XSTRING (D10V_MAKE_DADDR (x))); | |
1081 | #endif | |
1082 | #ifdef D10V_MAKE_IADDR | |
1083 | fprintf_unfiltered (file, | |
1084 | "gdbarch_dump: %s # %s\n", | |
1085 | "D10V_MAKE_IADDR(x)", | |
1086 | XSTRING (D10V_MAKE_IADDR (x))); | |
1087 | #endif | |
1088 | #ifdef D10V_DADDR_P | |
1089 | fprintf_unfiltered (file, | |
1090 | "gdbarch_dump: %s # %s\n", | |
1091 | "D10V_DADDR_P(x)", | |
1092 | XSTRING (D10V_DADDR_P (x))); | |
1093 | #endif | |
1094 | #ifdef D10V_IADDR_P | |
1095 | fprintf_unfiltered (file, | |
1096 | "gdbarch_dump: %s # %s\n", | |
1097 | "D10V_IADDR_P(x)", | |
1098 | XSTRING (D10V_IADDR_P (x))); | |
1099 | #endif | |
1100 | #ifdef D10V_CONVERT_DADDR_TO_RAW | |
1101 | fprintf_unfiltered (file, | |
1102 | "gdbarch_dump: %s # %s\n", | |
1103 | "D10V_CONVERT_DADDR_TO_RAW(x)", | |
1104 | XSTRING (D10V_CONVERT_DADDR_TO_RAW (x))); | |
1105 | #endif | |
1106 | #ifdef D10V_CONVERT_IADDR_TO_RAW | |
1107 | fprintf_unfiltered (file, | |
1108 | "gdbarch_dump: %s # %s\n", | |
1109 | "D10V_CONVERT_IADDR_TO_RAW(x)", | |
1110 | XSTRING (D10V_CONVERT_IADDR_TO_RAW (x))); | |
1111 | #endif | |
63e69063 AC |
1112 | #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH |
1113 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1114 | fprintf_unfiltered (file, |
1115 | "gdbarch_dump: %s # %s\n", | |
1116 | "STORE_STRUCT_RETURN(addr, sp)", | |
1117 | XSTRING (STORE_STRUCT_RETURN (addr, sp))); | |
1118 | #endif | |
63e69063 AC |
1119 | #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH |
1120 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1121 | fprintf_unfiltered (file, |
1122 | "gdbarch_dump: %s # %s\n", | |
1123 | "STORE_RETURN_VALUE(type, valbuf)", | |
1124 | XSTRING (STORE_RETURN_VALUE (type, valbuf))); | |
1125 | #endif | |
1126 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS | |
1127 | fprintf_unfiltered (file, | |
1128 | "gdbarch_dump: %s # %s\n", | |
1129 | "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", | |
1130 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); | |
1131 | #endif | |
1132 | #ifdef USE_STRUCT_CONVENTION | |
1133 | fprintf_unfiltered (file, | |
1134 | "gdbarch_dump: %s # %s\n", | |
1135 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", | |
1136 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); | |
1137 | #endif | |
63e69063 AC |
1138 | #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH |
1139 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1140 | fprintf_unfiltered (file, |
1141 | "gdbarch_dump: %s # %s\n", | |
1142 | "FRAME_INIT_SAVED_REGS(frame)", | |
1143 | XSTRING (FRAME_INIT_SAVED_REGS (frame))); | |
1144 | #endif | |
63e69063 AC |
1145 | #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH |
1146 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1147 | fprintf_unfiltered (file, |
1148 | "gdbarch_dump: %s # %s\n", | |
1149 | "INIT_EXTRA_FRAME_INFO(fromleaf, frame)", | |
1150 | XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame))); | |
1151 | #endif | |
1152 | #ifdef SKIP_PROLOGUE | |
1153 | fprintf_unfiltered (file, | |
1154 | "gdbarch_dump: %s # %s\n", | |
1155 | "SKIP_PROLOGUE(ip)", | |
1156 | XSTRING (SKIP_PROLOGUE (ip))); | |
1157 | #endif | |
1158 | #ifdef PROLOGUE_FRAMELESS_P | |
1159 | fprintf_unfiltered (file, | |
1160 | "gdbarch_dump: %s # %s\n", | |
1161 | "PROLOGUE_FRAMELESS_P(ip)", | |
1162 | XSTRING (PROLOGUE_FRAMELESS_P (ip))); | |
1163 | #endif | |
1164 | #ifdef INNER_THAN | |
1165 | fprintf_unfiltered (file, | |
1166 | "gdbarch_dump: %s # %s\n", | |
1167 | "INNER_THAN(lhs, rhs)", | |
1168 | XSTRING (INNER_THAN (lhs, rhs))); | |
1169 | #endif | |
1170 | #ifdef BREAKPOINT_FROM_PC | |
1171 | fprintf_unfiltered (file, | |
1172 | "gdbarch_dump: %s # %s\n", | |
1173 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", | |
1174 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); | |
1175 | #endif | |
1176 | #ifdef MEMORY_INSERT_BREAKPOINT | |
1177 | fprintf_unfiltered (file, | |
1178 | "gdbarch_dump: %s # %s\n", | |
1179 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", | |
1180 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); | |
1181 | #endif | |
1182 | #ifdef MEMORY_REMOVE_BREAKPOINT | |
1183 | fprintf_unfiltered (file, | |
1184 | "gdbarch_dump: %s # %s\n", | |
1185 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", | |
1186 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); | |
1187 | #endif | |
1188 | #ifdef DECR_PC_AFTER_BREAK | |
1189 | fprintf_unfiltered (file, | |
1190 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", | |
1191 | XSTRING (DECR_PC_AFTER_BREAK)); | |
1192 | #endif | |
1193 | #ifdef FUNCTION_START_OFFSET | |
1194 | fprintf_unfiltered (file, | |
1195 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", | |
1196 | XSTRING (FUNCTION_START_OFFSET)); | |
1197 | #endif | |
63e69063 AC |
1198 | #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH |
1199 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1200 | fprintf_unfiltered (file, |
1201 | "gdbarch_dump: %s # %s\n", | |
1202 | "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)", | |
1203 | XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len))); | |
1204 | #endif | |
1205 | #ifdef FRAME_ARGS_SKIP | |
1206 | fprintf_unfiltered (file, | |
1207 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", | |
1208 | XSTRING (FRAME_ARGS_SKIP)); | |
1209 | #endif | |
1210 | #ifdef FRAMELESS_FUNCTION_INVOCATION | |
1211 | fprintf_unfiltered (file, | |
1212 | "gdbarch_dump: %s # %s\n", | |
1213 | "FRAMELESS_FUNCTION_INVOCATION(fi)", | |
1214 | XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi))); | |
1215 | #endif | |
1216 | #ifdef FRAME_CHAIN | |
1217 | fprintf_unfiltered (file, | |
1218 | "gdbarch_dump: %s # %s\n", | |
1219 | "FRAME_CHAIN(frame)", | |
1220 | XSTRING (FRAME_CHAIN (frame))); | |
1221 | #endif | |
1222 | #ifdef FRAME_CHAIN_VALID | |
1223 | fprintf_unfiltered (file, | |
1224 | "gdbarch_dump: %s # %s\n", | |
1225 | "FRAME_CHAIN_VALID(chain, thisframe)", | |
1226 | XSTRING (FRAME_CHAIN_VALID (chain, thisframe))); | |
1227 | #endif | |
1228 | #ifdef FRAME_SAVED_PC | |
1229 | fprintf_unfiltered (file, | |
1230 | "gdbarch_dump: %s # %s\n", | |
1231 | "FRAME_SAVED_PC(fi)", | |
1232 | XSTRING (FRAME_SAVED_PC (fi))); | |
1233 | #endif | |
1234 | #ifdef FRAME_ARGS_ADDRESS | |
1235 | fprintf_unfiltered (file, | |
1236 | "gdbarch_dump: %s # %s\n", | |
1237 | "FRAME_ARGS_ADDRESS(fi)", | |
1238 | XSTRING (FRAME_ARGS_ADDRESS (fi))); | |
1239 | #endif | |
1240 | #ifdef FRAME_LOCALS_ADDRESS | |
1241 | fprintf_unfiltered (file, | |
1242 | "gdbarch_dump: %s # %s\n", | |
1243 | "FRAME_LOCALS_ADDRESS(fi)", | |
1244 | XSTRING (FRAME_LOCALS_ADDRESS (fi))); | |
1245 | #endif | |
1246 | #ifdef SAVED_PC_AFTER_CALL | |
1247 | fprintf_unfiltered (file, | |
1248 | "gdbarch_dump: %s # %s\n", | |
1249 | "SAVED_PC_AFTER_CALL(frame)", | |
1250 | XSTRING (SAVED_PC_AFTER_CALL (frame))); | |
1251 | #endif | |
1252 | #ifdef FRAME_NUM_ARGS | |
1253 | fprintf_unfiltered (file, | |
1254 | "gdbarch_dump: %s # %s\n", | |
1255 | "FRAME_NUM_ARGS(frame)", | |
1256 | XSTRING (FRAME_NUM_ARGS (frame))); | |
1257 | #endif | |
1258 | #ifdef STACK_ALIGN | |
1259 | fprintf_unfiltered (file, | |
1260 | "gdbarch_dump: %s # %s\n", | |
1261 | "STACK_ALIGN(sp)", | |
1262 | XSTRING (STACK_ALIGN (sp))); | |
1263 | #endif | |
1264 | #ifdef REG_STRUCT_HAS_ADDR | |
1265 | fprintf_unfiltered (file, | |
1266 | "gdbarch_dump: %s # %s\n", | |
1267 | "REG_STRUCT_HAS_ADDR(gcc_p, type)", | |
1268 | XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type))); | |
1269 | #endif | |
63e69063 AC |
1270 | #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH |
1271 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1272 | fprintf_unfiltered (file, |
1273 | "gdbarch_dump: %s # %s\n", | |
1274 | "SAVE_DUMMY_FRAME_TOS(sp)", | |
1275 | XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); | |
1276 | #endif | |
1277 | #ifdef TARGET_FLOAT_FORMAT | |
1278 | fprintf_unfiltered (file, | |
1279 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", | |
1280 | XSTRING (TARGET_FLOAT_FORMAT)); | |
1281 | #endif | |
1282 | #ifdef TARGET_DOUBLE_FORMAT | |
1283 | fprintf_unfiltered (file, | |
1284 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", | |
1285 | XSTRING (TARGET_DOUBLE_FORMAT)); | |
1286 | #endif | |
1287 | #ifdef TARGET_LONG_DOUBLE_FORMAT | |
1288 | fprintf_unfiltered (file, | |
1289 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", | |
1290 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); | |
1291 | #endif | |
381323f4 | 1292 | #ifdef TARGET_ARCHITECTURE |
0f71a2f6 | 1293 | if (TARGET_ARCHITECTURE != NULL) |
4b9b3959 AC |
1294 | fprintf_unfiltered (file, |
1295 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", | |
adf40b2e | 1296 | TARGET_ARCHITECTURE->printable_name); |
381323f4 AC |
1297 | #endif |
1298 | #ifdef TARGET_BYTE_ORDER | |
4b9b3959 AC |
1299 | fprintf_unfiltered (file, |
1300 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", | |
adf40b2e | 1301 | (long) TARGET_BYTE_ORDER); |
381323f4 AC |
1302 | #endif |
1303 | #ifdef TARGET_BFD_VMA_BIT | |
4b9b3959 AC |
1304 | fprintf_unfiltered (file, |
1305 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n", | |
c4093a6a | 1306 | (long) TARGET_BFD_VMA_BIT); |
381323f4 AC |
1307 | #endif |
1308 | #ifdef TARGET_PTR_BIT | |
4b9b3959 AC |
1309 | fprintf_unfiltered (file, |
1310 | "gdbarch_dump: TARGET_PTR_BIT = %ld\n", | |
adf40b2e | 1311 | (long) TARGET_PTR_BIT); |
381323f4 AC |
1312 | #endif |
1313 | #ifdef TARGET_SHORT_BIT | |
4b9b3959 AC |
1314 | fprintf_unfiltered (file, |
1315 | "gdbarch_dump: TARGET_SHORT_BIT = %ld\n", | |
adf40b2e | 1316 | (long) TARGET_SHORT_BIT); |
381323f4 AC |
1317 | #endif |
1318 | #ifdef TARGET_INT_BIT | |
4b9b3959 AC |
1319 | fprintf_unfiltered (file, |
1320 | "gdbarch_dump: TARGET_INT_BIT = %ld\n", | |
adf40b2e | 1321 | (long) TARGET_INT_BIT); |
381323f4 AC |
1322 | #endif |
1323 | #ifdef TARGET_LONG_BIT | |
4b9b3959 AC |
1324 | fprintf_unfiltered (file, |
1325 | "gdbarch_dump: TARGET_LONG_BIT = %ld\n", | |
adf40b2e | 1326 | (long) TARGET_LONG_BIT); |
381323f4 AC |
1327 | #endif |
1328 | #ifdef TARGET_LONG_LONG_BIT | |
4b9b3959 AC |
1329 | fprintf_unfiltered (file, |
1330 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n", | |
adf40b2e | 1331 | (long) TARGET_LONG_LONG_BIT); |
381323f4 AC |
1332 | #endif |
1333 | #ifdef TARGET_FLOAT_BIT | |
4b9b3959 AC |
1334 | fprintf_unfiltered (file, |
1335 | "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n", | |
adf40b2e | 1336 | (long) TARGET_FLOAT_BIT); |
381323f4 AC |
1337 | #endif |
1338 | #ifdef TARGET_DOUBLE_BIT | |
4b9b3959 AC |
1339 | fprintf_unfiltered (file, |
1340 | "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n", | |
adf40b2e | 1341 | (long) TARGET_DOUBLE_BIT); |
381323f4 AC |
1342 | #endif |
1343 | #ifdef TARGET_LONG_DOUBLE_BIT | |
4b9b3959 AC |
1344 | fprintf_unfiltered (file, |
1345 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n", | |
adf40b2e | 1346 | (long) TARGET_LONG_DOUBLE_BIT); |
381323f4 AC |
1347 | #endif |
1348 | #ifdef IEEE_FLOAT | |
4b9b3959 AC |
1349 | fprintf_unfiltered (file, |
1350 | "gdbarch_dump: IEEE_FLOAT = %ld\n", | |
7355ddba | 1351 | (long) IEEE_FLOAT); |
381323f4 AC |
1352 | #endif |
1353 | #ifdef TARGET_READ_PC | |
4b9b3959 AC |
1354 | if (GDB_MULTI_ARCH) |
1355 | fprintf_unfiltered (file, | |
1356 | "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n", | |
1357 | (long) current_gdbarch->read_pc | |
1358 | /*TARGET_READ_PC ()*/); | |
381323f4 AC |
1359 | #endif |
1360 | #ifdef TARGET_WRITE_PC | |
4b9b3959 AC |
1361 | if (GDB_MULTI_ARCH) |
1362 | fprintf_unfiltered (file, | |
1363 | "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n", | |
1364 | (long) current_gdbarch->write_pc | |
1365 | /*TARGET_WRITE_PC ()*/); | |
381323f4 AC |
1366 | #endif |
1367 | #ifdef TARGET_READ_FP | |
4b9b3959 AC |
1368 | if (GDB_MULTI_ARCH) |
1369 | fprintf_unfiltered (file, | |
1370 | "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n", | |
1371 | (long) current_gdbarch->read_fp | |
1372 | /*TARGET_READ_FP ()*/); | |
381323f4 AC |
1373 | #endif |
1374 | #ifdef TARGET_WRITE_FP | |
4b9b3959 AC |
1375 | if (GDB_MULTI_ARCH) |
1376 | fprintf_unfiltered (file, | |
1377 | "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n", | |
1378 | (long) current_gdbarch->write_fp | |
1379 | /*TARGET_WRITE_FP ()*/); | |
381323f4 AC |
1380 | #endif |
1381 | #ifdef TARGET_READ_SP | |
4b9b3959 AC |
1382 | if (GDB_MULTI_ARCH) |
1383 | fprintf_unfiltered (file, | |
1384 | "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n", | |
1385 | (long) current_gdbarch->read_sp | |
1386 | /*TARGET_READ_SP ()*/); | |
381323f4 AC |
1387 | #endif |
1388 | #ifdef TARGET_WRITE_SP | |
4b9b3959 AC |
1389 | if (GDB_MULTI_ARCH) |
1390 | fprintf_unfiltered (file, | |
1391 | "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n", | |
1392 | (long) current_gdbarch->write_sp | |
1393 | /*TARGET_WRITE_SP ()*/); | |
381323f4 AC |
1394 | #endif |
1395 | #ifdef NUM_REGS | |
4b9b3959 AC |
1396 | fprintf_unfiltered (file, |
1397 | "gdbarch_dump: NUM_REGS = %ld\n", | |
adf40b2e | 1398 | (long) NUM_REGS); |
381323f4 | 1399 | #endif |
0aba1244 EZ |
1400 | #ifdef NUM_PSEUDO_REGS |
1401 | fprintf_unfiltered (file, | |
1402 | "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n", | |
1403 | (long) NUM_PSEUDO_REGS); | |
1404 | #endif | |
381323f4 | 1405 | #ifdef SP_REGNUM |
4b9b3959 AC |
1406 | fprintf_unfiltered (file, |
1407 | "gdbarch_dump: SP_REGNUM = %ld\n", | |
adf40b2e | 1408 | (long) SP_REGNUM); |
381323f4 AC |
1409 | #endif |
1410 | #ifdef FP_REGNUM | |
4b9b3959 AC |
1411 | fprintf_unfiltered (file, |
1412 | "gdbarch_dump: FP_REGNUM = %ld\n", | |
adf40b2e | 1413 | (long) FP_REGNUM); |
381323f4 AC |
1414 | #endif |
1415 | #ifdef PC_REGNUM | |
4b9b3959 AC |
1416 | fprintf_unfiltered (file, |
1417 | "gdbarch_dump: PC_REGNUM = %ld\n", | |
adf40b2e | 1418 | (long) PC_REGNUM); |
381323f4 AC |
1419 | #endif |
1420 | #ifdef FP0_REGNUM | |
4b9b3959 AC |
1421 | fprintf_unfiltered (file, |
1422 | "gdbarch_dump: FP0_REGNUM = %ld\n", | |
60054393 | 1423 | (long) FP0_REGNUM); |
381323f4 AC |
1424 | #endif |
1425 | #ifdef NPC_REGNUM | |
4b9b3959 AC |
1426 | fprintf_unfiltered (file, |
1427 | "gdbarch_dump: NPC_REGNUM = %ld\n", | |
03863182 | 1428 | (long) NPC_REGNUM); |
381323f4 AC |
1429 | #endif |
1430 | #ifdef NNPC_REGNUM | |
4b9b3959 AC |
1431 | fprintf_unfiltered (file, |
1432 | "gdbarch_dump: NNPC_REGNUM = %ld\n", | |
03863182 | 1433 | (long) NNPC_REGNUM); |
381323f4 AC |
1434 | #endif |
1435 | #ifdef REGISTER_NAME | |
4b9b3959 AC |
1436 | if (GDB_MULTI_ARCH) |
1437 | fprintf_unfiltered (file, | |
1438 | "gdbarch_dump: REGISTER_NAME = 0x%08lx\n", | |
1439 | (long) current_gdbarch->register_name | |
1440 | /*REGISTER_NAME ()*/); | |
381323f4 AC |
1441 | #endif |
1442 | #ifdef REGISTER_SIZE | |
4b9b3959 AC |
1443 | fprintf_unfiltered (file, |
1444 | "gdbarch_dump: REGISTER_SIZE = %ld\n", | |
adf40b2e | 1445 | (long) REGISTER_SIZE); |
381323f4 AC |
1446 | #endif |
1447 | #ifdef REGISTER_BYTES | |
4b9b3959 AC |
1448 | fprintf_unfiltered (file, |
1449 | "gdbarch_dump: REGISTER_BYTES = %ld\n", | |
adf40b2e | 1450 | (long) REGISTER_BYTES); |
381323f4 AC |
1451 | #endif |
1452 | #ifdef REGISTER_BYTE | |
4b9b3959 AC |
1453 | if (GDB_MULTI_ARCH) |
1454 | fprintf_unfiltered (file, | |
1455 | "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n", | |
1456 | (long) current_gdbarch->register_byte | |
1457 | /*REGISTER_BYTE ()*/); | |
381323f4 AC |
1458 | #endif |
1459 | #ifdef REGISTER_RAW_SIZE | |
4b9b3959 AC |
1460 | if (GDB_MULTI_ARCH) |
1461 | fprintf_unfiltered (file, | |
1462 | "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n", | |
1463 | (long) current_gdbarch->register_raw_size | |
1464 | /*REGISTER_RAW_SIZE ()*/); | |
381323f4 AC |
1465 | #endif |
1466 | #ifdef MAX_REGISTER_RAW_SIZE | |
4b9b3959 AC |
1467 | fprintf_unfiltered (file, |
1468 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n", | |
adf40b2e | 1469 | (long) MAX_REGISTER_RAW_SIZE); |
381323f4 AC |
1470 | #endif |
1471 | #ifdef REGISTER_VIRTUAL_SIZE | |
4b9b3959 AC |
1472 | if (GDB_MULTI_ARCH) |
1473 | fprintf_unfiltered (file, | |
1474 | "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n", | |
1475 | (long) current_gdbarch->register_virtual_size | |
1476 | /*REGISTER_VIRTUAL_SIZE ()*/); | |
381323f4 AC |
1477 | #endif |
1478 | #ifdef MAX_REGISTER_VIRTUAL_SIZE | |
4b9b3959 AC |
1479 | fprintf_unfiltered (file, |
1480 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n", | |
adf40b2e | 1481 | (long) MAX_REGISTER_VIRTUAL_SIZE); |
381323f4 AC |
1482 | #endif |
1483 | #ifdef REGISTER_VIRTUAL_TYPE | |
4b9b3959 AC |
1484 | if (GDB_MULTI_ARCH) |
1485 | fprintf_unfiltered (file, | |
1486 | "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n", | |
1487 | (long) current_gdbarch->register_virtual_type | |
1488 | /*REGISTER_VIRTUAL_TYPE ()*/); | |
381323f4 | 1489 | #endif |
666e11c5 EZ |
1490 | #ifdef DO_REGISTERS_INFO |
1491 | if (GDB_MULTI_ARCH) | |
1492 | fprintf_unfiltered (file, | |
1493 | "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n", | |
1494 | (long) current_gdbarch->do_registers_info | |
1495 | /*DO_REGISTERS_INFO ()*/); | |
1496 | #endif | |
7c7651b2 AC |
1497 | #ifdef REGISTER_SIM_REGNO |
1498 | if (GDB_MULTI_ARCH) | |
1499 | fprintf_unfiltered (file, | |
1500 | "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n", | |
1501 | (long) current_gdbarch->register_sim_regno | |
1502 | /*REGISTER_SIM_REGNO ()*/); | |
1503 | #endif | |
381323f4 | 1504 | #ifdef USE_GENERIC_DUMMY_FRAMES |
4b9b3959 AC |
1505 | fprintf_unfiltered (file, |
1506 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n", | |
adf40b2e | 1507 | (long) USE_GENERIC_DUMMY_FRAMES); |
381323f4 AC |
1508 | #endif |
1509 | #ifdef CALL_DUMMY_LOCATION | |
4b9b3959 AC |
1510 | fprintf_unfiltered (file, |
1511 | "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n", | |
adf40b2e | 1512 | (long) CALL_DUMMY_LOCATION); |
381323f4 AC |
1513 | #endif |
1514 | #ifdef CALL_DUMMY_ADDRESS | |
4b9b3959 AC |
1515 | if (GDB_MULTI_ARCH) |
1516 | fprintf_unfiltered (file, | |
1517 | "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n", | |
1518 | (long) current_gdbarch->call_dummy_address | |
1519 | /*CALL_DUMMY_ADDRESS ()*/); | |
381323f4 AC |
1520 | #endif |
1521 | #ifdef CALL_DUMMY_START_OFFSET | |
4b9b3959 AC |
1522 | fprintf_unfiltered (file, |
1523 | "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n", | |
adf40b2e | 1524 | (long) CALL_DUMMY_START_OFFSET); |
381323f4 AC |
1525 | #endif |
1526 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET | |
4b9b3959 AC |
1527 | fprintf_unfiltered (file, |
1528 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", | |
adf40b2e | 1529 | (long) CALL_DUMMY_BREAKPOINT_OFFSET); |
381323f4 AC |
1530 | #endif |
1531 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P | |
4b9b3959 AC |
1532 | fprintf_unfiltered (file, |
1533 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n", | |
adf40b2e | 1534 | (long) CALL_DUMMY_BREAKPOINT_OFFSET_P); |
381323f4 AC |
1535 | #endif |
1536 | #ifdef CALL_DUMMY_LENGTH | |
0f71a2f6 | 1537 | if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END) |
4b9b3959 AC |
1538 | fprintf_unfiltered (file, |
1539 | "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n", | |
adf40b2e | 1540 | (long) CALL_DUMMY_LENGTH); |
381323f4 AC |
1541 | #endif |
1542 | #ifdef PC_IN_CALL_DUMMY | |
4b9b3959 AC |
1543 | if (GDB_MULTI_ARCH) |
1544 | fprintf_unfiltered (file, | |
1545 | "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n", | |
1546 | (long) current_gdbarch->pc_in_call_dummy | |
1547 | /*PC_IN_CALL_DUMMY ()*/); | |
381323f4 AC |
1548 | #endif |
1549 | #ifdef CALL_DUMMY_P | |
4b9b3959 AC |
1550 | fprintf_unfiltered (file, |
1551 | "gdbarch_dump: CALL_DUMMY_P = %ld\n", | |
adf40b2e | 1552 | (long) CALL_DUMMY_P); |
381323f4 AC |
1553 | #endif |
1554 | #ifdef CALL_DUMMY_WORDS | |
4b9b3959 AC |
1555 | fprintf_unfiltered (file, |
1556 | "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", | |
adf40b2e | 1557 | (long) CALL_DUMMY_WORDS); |
381323f4 AC |
1558 | #endif |
1559 | #ifdef SIZEOF_CALL_DUMMY_WORDS | |
4b9b3959 AC |
1560 | fprintf_unfiltered (file, |
1561 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n", | |
adf40b2e | 1562 | (long) SIZEOF_CALL_DUMMY_WORDS); |
381323f4 AC |
1563 | #endif |
1564 | #ifdef CALL_DUMMY_STACK_ADJUST_P | |
4b9b3959 AC |
1565 | fprintf_unfiltered (file, |
1566 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n", | |
adf40b2e | 1567 | (long) CALL_DUMMY_STACK_ADJUST_P); |
381323f4 AC |
1568 | #endif |
1569 | #ifdef CALL_DUMMY_STACK_ADJUST | |
0f71a2f6 | 1570 | if (CALL_DUMMY_STACK_ADJUST_P) |
4b9b3959 AC |
1571 | fprintf_unfiltered (file, |
1572 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n", | |
adf40b2e | 1573 | (long) CALL_DUMMY_STACK_ADJUST); |
381323f4 AC |
1574 | #endif |
1575 | #ifdef FIX_CALL_DUMMY | |
4b9b3959 AC |
1576 | if (GDB_MULTI_ARCH) |
1577 | fprintf_unfiltered (file, | |
1578 | "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n", | |
1579 | (long) current_gdbarch->fix_call_dummy | |
1580 | /*FIX_CALL_DUMMY ()*/); | |
381323f4 | 1581 | #endif |
0f71a2f6 | 1582 | #ifdef BELIEVE_PCC_PROMOTION |
4b9b3959 AC |
1583 | fprintf_unfiltered (file, |
1584 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n", | |
adf40b2e | 1585 | (long) BELIEVE_PCC_PROMOTION); |
0f71a2f6 JM |
1586 | #endif |
1587 | #ifdef BELIEVE_PCC_PROMOTION_TYPE | |
4b9b3959 AC |
1588 | fprintf_unfiltered (file, |
1589 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n", | |
adf40b2e | 1590 | (long) BELIEVE_PCC_PROMOTION_TYPE); |
0f71a2f6 | 1591 | #endif |
381323f4 | 1592 | #ifdef COERCE_FLOAT_TO_DOUBLE |
4b9b3959 AC |
1593 | if (GDB_MULTI_ARCH) |
1594 | fprintf_unfiltered (file, | |
1595 | "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n", | |
1596 | (long) current_gdbarch->coerce_float_to_double | |
1597 | /*COERCE_FLOAT_TO_DOUBLE ()*/); | |
381323f4 AC |
1598 | #endif |
1599 | #ifdef GET_SAVED_REGISTER | |
4b9b3959 AC |
1600 | if (GDB_MULTI_ARCH) |
1601 | fprintf_unfiltered (file, | |
1602 | "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n", | |
1603 | (long) current_gdbarch->get_saved_register | |
1604 | /*GET_SAVED_REGISTER ()*/); | |
381323f4 AC |
1605 | #endif |
1606 | #ifdef REGISTER_CONVERTIBLE | |
4b9b3959 AC |
1607 | if (GDB_MULTI_ARCH) |
1608 | fprintf_unfiltered (file, | |
1609 | "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n", | |
1610 | (long) current_gdbarch->register_convertible | |
1611 | /*REGISTER_CONVERTIBLE ()*/); | |
381323f4 AC |
1612 | #endif |
1613 | #ifdef REGISTER_CONVERT_TO_VIRTUAL | |
4b9b3959 AC |
1614 | if (GDB_MULTI_ARCH) |
1615 | fprintf_unfiltered (file, | |
1616 | "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n", | |
1617 | (long) current_gdbarch->register_convert_to_virtual | |
1618 | /*REGISTER_CONVERT_TO_VIRTUAL ()*/); | |
381323f4 AC |
1619 | #endif |
1620 | #ifdef REGISTER_CONVERT_TO_RAW | |
4b9b3959 AC |
1621 | if (GDB_MULTI_ARCH) |
1622 | fprintf_unfiltered (file, | |
1623 | "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n", | |
1624 | (long) current_gdbarch->register_convert_to_raw | |
1625 | /*REGISTER_CONVERT_TO_RAW ()*/); | |
381323f4 | 1626 | #endif |
7f1b2585 EZ |
1627 | #ifdef FETCH_PSEUDO_REGISTER |
1628 | if (GDB_MULTI_ARCH) | |
1629 | fprintf_unfiltered (file, | |
1630 | "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n", | |
1631 | (long) current_gdbarch->fetch_pseudo_register | |
1632 | /*FETCH_PSEUDO_REGISTER ()*/); | |
1633 | #endif | |
1634 | #ifdef STORE_PSEUDO_REGISTER | |
1635 | if (GDB_MULTI_ARCH) | |
1636 | fprintf_unfiltered (file, | |
1637 | "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n", | |
1638 | (long) current_gdbarch->store_pseudo_register | |
1639 | /*STORE_PSEUDO_REGISTER ()*/); | |
1640 | #endif | |
381323f4 | 1641 | #ifdef POINTER_TO_ADDRESS |
4b9b3959 AC |
1642 | if (GDB_MULTI_ARCH) |
1643 | fprintf_unfiltered (file, | |
1644 | "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n", | |
1645 | (long) current_gdbarch->pointer_to_address | |
1646 | /*POINTER_TO_ADDRESS ()*/); | |
381323f4 AC |
1647 | #endif |
1648 | #ifdef ADDRESS_TO_POINTER | |
4b9b3959 AC |
1649 | if (GDB_MULTI_ARCH) |
1650 | fprintf_unfiltered (file, | |
1651 | "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n", | |
1652 | (long) current_gdbarch->address_to_pointer | |
1653 | /*ADDRESS_TO_POINTER ()*/); | |
381323f4 AC |
1654 | #endif |
1655 | #ifdef RETURN_VALUE_ON_STACK | |
4b9b3959 AC |
1656 | if (GDB_MULTI_ARCH) |
1657 | fprintf_unfiltered (file, | |
1658 | "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n", | |
1659 | (long) current_gdbarch->return_value_on_stack | |
1660 | /*RETURN_VALUE_ON_STACK ()*/); | |
381323f4 AC |
1661 | #endif |
1662 | #ifdef EXTRACT_RETURN_VALUE | |
4b9b3959 AC |
1663 | if (GDB_MULTI_ARCH) |
1664 | fprintf_unfiltered (file, | |
1665 | "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n", | |
1666 | (long) current_gdbarch->extract_return_value | |
1667 | /*EXTRACT_RETURN_VALUE ()*/); | |
381323f4 AC |
1668 | #endif |
1669 | #ifdef PUSH_ARGUMENTS | |
4b9b3959 AC |
1670 | if (GDB_MULTI_ARCH) |
1671 | fprintf_unfiltered (file, | |
1672 | "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n", | |
1673 | (long) current_gdbarch->push_arguments | |
1674 | /*PUSH_ARGUMENTS ()*/); | |
381323f4 AC |
1675 | #endif |
1676 | #ifdef PUSH_DUMMY_FRAME | |
4b9b3959 AC |
1677 | if (GDB_MULTI_ARCH) |
1678 | fprintf_unfiltered (file, | |
1679 | "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n", | |
1680 | (long) current_gdbarch->push_dummy_frame | |
1681 | /*PUSH_DUMMY_FRAME ()*/); | |
381323f4 AC |
1682 | #endif |
1683 | #ifdef PUSH_RETURN_ADDRESS | |
4b9b3959 AC |
1684 | if (GDB_MULTI_ARCH) |
1685 | fprintf_unfiltered (file, | |
1686 | "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n", | |
1687 | (long) current_gdbarch->push_return_address | |
1688 | /*PUSH_RETURN_ADDRESS ()*/); | |
381323f4 AC |
1689 | #endif |
1690 | #ifdef POP_FRAME | |
4b9b3959 AC |
1691 | if (GDB_MULTI_ARCH) |
1692 | fprintf_unfiltered (file, | |
1693 | "gdbarch_dump: POP_FRAME = 0x%08lx\n", | |
1694 | (long) current_gdbarch->pop_frame | |
1695 | /*POP_FRAME ()*/); | |
381323f4 AC |
1696 | #endif |
1697 | #ifdef D10V_MAKE_DADDR | |
4b9b3959 AC |
1698 | if (GDB_MULTI_ARCH) |
1699 | fprintf_unfiltered (file, | |
1700 | "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n", | |
1701 | (long) current_gdbarch->d10v_make_daddr | |
1702 | /*D10V_MAKE_DADDR ()*/); | |
381323f4 AC |
1703 | #endif |
1704 | #ifdef D10V_MAKE_IADDR | |
4b9b3959 AC |
1705 | if (GDB_MULTI_ARCH) |
1706 | fprintf_unfiltered (file, | |
1707 | "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n", | |
1708 | (long) current_gdbarch->d10v_make_iaddr | |
1709 | /*D10V_MAKE_IADDR ()*/); | |
381323f4 AC |
1710 | #endif |
1711 | #ifdef D10V_DADDR_P | |
4b9b3959 AC |
1712 | if (GDB_MULTI_ARCH) |
1713 | fprintf_unfiltered (file, | |
1714 | "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n", | |
1715 | (long) current_gdbarch->d10v_daddr_p | |
1716 | /*D10V_DADDR_P ()*/); | |
381323f4 AC |
1717 | #endif |
1718 | #ifdef D10V_IADDR_P | |
4b9b3959 AC |
1719 | if (GDB_MULTI_ARCH) |
1720 | fprintf_unfiltered (file, | |
1721 | "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n", | |
1722 | (long) current_gdbarch->d10v_iaddr_p | |
1723 | /*D10V_IADDR_P ()*/); | |
381323f4 AC |
1724 | #endif |
1725 | #ifdef D10V_CONVERT_DADDR_TO_RAW | |
4b9b3959 AC |
1726 | if (GDB_MULTI_ARCH) |
1727 | fprintf_unfiltered (file, | |
1728 | "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n", | |
1729 | (long) current_gdbarch->d10v_convert_daddr_to_raw | |
1730 | /*D10V_CONVERT_DADDR_TO_RAW ()*/); | |
381323f4 AC |
1731 | #endif |
1732 | #ifdef D10V_CONVERT_IADDR_TO_RAW | |
4b9b3959 AC |
1733 | if (GDB_MULTI_ARCH) |
1734 | fprintf_unfiltered (file, | |
1735 | "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n", | |
1736 | (long) current_gdbarch->d10v_convert_iaddr_to_raw | |
1737 | /*D10V_CONVERT_IADDR_TO_RAW ()*/); | |
381323f4 AC |
1738 | #endif |
1739 | #ifdef STORE_STRUCT_RETURN | |
4b9b3959 AC |
1740 | if (GDB_MULTI_ARCH) |
1741 | fprintf_unfiltered (file, | |
1742 | "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n", | |
1743 | (long) current_gdbarch->store_struct_return | |
1744 | /*STORE_STRUCT_RETURN ()*/); | |
381323f4 AC |
1745 | #endif |
1746 | #ifdef STORE_RETURN_VALUE | |
4b9b3959 AC |
1747 | if (GDB_MULTI_ARCH) |
1748 | fprintf_unfiltered (file, | |
1749 | "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n", | |
1750 | (long) current_gdbarch->store_return_value | |
1751 | /*STORE_RETURN_VALUE ()*/); | |
381323f4 AC |
1752 | #endif |
1753 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS | |
4b9b3959 AC |
1754 | if (GDB_MULTI_ARCH) |
1755 | fprintf_unfiltered (file, | |
1756 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", | |
1757 | (long) current_gdbarch->extract_struct_value_address | |
1758 | /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
381323f4 AC |
1759 | #endif |
1760 | #ifdef USE_STRUCT_CONVENTION | |
4b9b3959 AC |
1761 | if (GDB_MULTI_ARCH) |
1762 | fprintf_unfiltered (file, | |
1763 | "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n", | |
1764 | (long) current_gdbarch->use_struct_convention | |
1765 | /*USE_STRUCT_CONVENTION ()*/); | |
381323f4 AC |
1766 | #endif |
1767 | #ifdef FRAME_INIT_SAVED_REGS | |
4b9b3959 AC |
1768 | if (GDB_MULTI_ARCH) |
1769 | fprintf_unfiltered (file, | |
1770 | "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n", | |
1771 | (long) current_gdbarch->frame_init_saved_regs | |
1772 | /*FRAME_INIT_SAVED_REGS ()*/); | |
381323f4 AC |
1773 | #endif |
1774 | #ifdef INIT_EXTRA_FRAME_INFO | |
4b9b3959 AC |
1775 | if (GDB_MULTI_ARCH) |
1776 | fprintf_unfiltered (file, | |
1777 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n", | |
1778 | (long) current_gdbarch->init_extra_frame_info | |
1779 | /*INIT_EXTRA_FRAME_INFO ()*/); | |
381323f4 AC |
1780 | #endif |
1781 | #ifdef SKIP_PROLOGUE | |
4b9b3959 AC |
1782 | if (GDB_MULTI_ARCH) |
1783 | fprintf_unfiltered (file, | |
1784 | "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n", | |
1785 | (long) current_gdbarch->skip_prologue | |
1786 | /*SKIP_PROLOGUE ()*/); | |
381323f4 AC |
1787 | #endif |
1788 | #ifdef PROLOGUE_FRAMELESS_P | |
4b9b3959 AC |
1789 | if (GDB_MULTI_ARCH) |
1790 | fprintf_unfiltered (file, | |
1791 | "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n", | |
1792 | (long) current_gdbarch->prologue_frameless_p | |
1793 | /*PROLOGUE_FRAMELESS_P ()*/); | |
381323f4 AC |
1794 | #endif |
1795 | #ifdef INNER_THAN | |
4b9b3959 AC |
1796 | if (GDB_MULTI_ARCH) |
1797 | fprintf_unfiltered (file, | |
1798 | "gdbarch_dump: INNER_THAN = 0x%08lx\n", | |
1799 | (long) current_gdbarch->inner_than | |
1800 | /*INNER_THAN ()*/); | |
381323f4 AC |
1801 | #endif |
1802 | #ifdef BREAKPOINT_FROM_PC | |
4b9b3959 AC |
1803 | if (GDB_MULTI_ARCH) |
1804 | fprintf_unfiltered (file, | |
1805 | "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n", | |
1806 | (long) current_gdbarch->breakpoint_from_pc | |
1807 | /*BREAKPOINT_FROM_PC ()*/); | |
381323f4 AC |
1808 | #endif |
1809 | #ifdef MEMORY_INSERT_BREAKPOINT | |
4b9b3959 AC |
1810 | if (GDB_MULTI_ARCH) |
1811 | fprintf_unfiltered (file, | |
1812 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n", | |
1813 | (long) current_gdbarch->memory_insert_breakpoint | |
1814 | /*MEMORY_INSERT_BREAKPOINT ()*/); | |
381323f4 AC |
1815 | #endif |
1816 | #ifdef MEMORY_REMOVE_BREAKPOINT | |
4b9b3959 AC |
1817 | if (GDB_MULTI_ARCH) |
1818 | fprintf_unfiltered (file, | |
1819 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n", | |
1820 | (long) current_gdbarch->memory_remove_breakpoint | |
1821 | /*MEMORY_REMOVE_BREAKPOINT ()*/); | |
381323f4 AC |
1822 | #endif |
1823 | #ifdef DECR_PC_AFTER_BREAK | |
4b9b3959 AC |
1824 | fprintf_unfiltered (file, |
1825 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", | |
adf40b2e | 1826 | (long) DECR_PC_AFTER_BREAK); |
381323f4 AC |
1827 | #endif |
1828 | #ifdef FUNCTION_START_OFFSET | |
4b9b3959 AC |
1829 | fprintf_unfiltered (file, |
1830 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", | |
adf40b2e | 1831 | (long) FUNCTION_START_OFFSET); |
381323f4 AC |
1832 | #endif |
1833 | #ifdef REMOTE_TRANSLATE_XFER_ADDRESS | |
4b9b3959 AC |
1834 | if (GDB_MULTI_ARCH) |
1835 | fprintf_unfiltered (file, | |
1836 | "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n", | |
1837 | (long) current_gdbarch->remote_translate_xfer_address | |
1838 | /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/); | |
381323f4 AC |
1839 | #endif |
1840 | #ifdef FRAME_ARGS_SKIP | |
4b9b3959 AC |
1841 | fprintf_unfiltered (file, |
1842 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", | |
adf40b2e | 1843 | (long) FRAME_ARGS_SKIP); |
381323f4 AC |
1844 | #endif |
1845 | #ifdef FRAMELESS_FUNCTION_INVOCATION | |
4b9b3959 AC |
1846 | if (GDB_MULTI_ARCH) |
1847 | fprintf_unfiltered (file, | |
1848 | "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n", | |
1849 | (long) current_gdbarch->frameless_function_invocation | |
1850 | /*FRAMELESS_FUNCTION_INVOCATION ()*/); | |
381323f4 AC |
1851 | #endif |
1852 | #ifdef FRAME_CHAIN | |
4b9b3959 AC |
1853 | if (GDB_MULTI_ARCH) |
1854 | fprintf_unfiltered (file, | |
1855 | "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n", | |
1856 | (long) current_gdbarch->frame_chain | |
1857 | /*FRAME_CHAIN ()*/); | |
381323f4 AC |
1858 | #endif |
1859 | #ifdef FRAME_CHAIN_VALID | |
4b9b3959 AC |
1860 | if (GDB_MULTI_ARCH) |
1861 | fprintf_unfiltered (file, | |
1862 | "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n", | |
1863 | (long) current_gdbarch->frame_chain_valid | |
1864 | /*FRAME_CHAIN_VALID ()*/); | |
381323f4 AC |
1865 | #endif |
1866 | #ifdef FRAME_SAVED_PC | |
4b9b3959 AC |
1867 | if (GDB_MULTI_ARCH) |
1868 | fprintf_unfiltered (file, | |
1869 | "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n", | |
1870 | (long) current_gdbarch->frame_saved_pc | |
1871 | /*FRAME_SAVED_PC ()*/); | |
381323f4 AC |
1872 | #endif |
1873 | #ifdef FRAME_ARGS_ADDRESS | |
4b9b3959 AC |
1874 | if (GDB_MULTI_ARCH) |
1875 | fprintf_unfiltered (file, | |
1876 | "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n", | |
1877 | (long) current_gdbarch->frame_args_address | |
1878 | /*FRAME_ARGS_ADDRESS ()*/); | |
381323f4 AC |
1879 | #endif |
1880 | #ifdef FRAME_LOCALS_ADDRESS | |
4b9b3959 AC |
1881 | if (GDB_MULTI_ARCH) |
1882 | fprintf_unfiltered (file, | |
1883 | "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n", | |
1884 | (long) current_gdbarch->frame_locals_address | |
1885 | /*FRAME_LOCALS_ADDRESS ()*/); | |
381323f4 AC |
1886 | #endif |
1887 | #ifdef SAVED_PC_AFTER_CALL | |
4b9b3959 AC |
1888 | if (GDB_MULTI_ARCH) |
1889 | fprintf_unfiltered (file, | |
1890 | "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n", | |
1891 | (long) current_gdbarch->saved_pc_after_call | |
1892 | /*SAVED_PC_AFTER_CALL ()*/); | |
381323f4 AC |
1893 | #endif |
1894 | #ifdef FRAME_NUM_ARGS | |
4b9b3959 AC |
1895 | if (GDB_MULTI_ARCH) |
1896 | fprintf_unfiltered (file, | |
1897 | "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n", | |
1898 | (long) current_gdbarch->frame_num_args | |
1899 | /*FRAME_NUM_ARGS ()*/); | |
381323f4 AC |
1900 | #endif |
1901 | #ifdef STACK_ALIGN | |
4b9b3959 AC |
1902 | if (GDB_MULTI_ARCH) |
1903 | fprintf_unfiltered (file, | |
1904 | "gdbarch_dump: STACK_ALIGN = 0x%08lx\n", | |
1905 | (long) current_gdbarch->stack_align | |
1906 | /*STACK_ALIGN ()*/); | |
381323f4 AC |
1907 | #endif |
1908 | #ifdef REG_STRUCT_HAS_ADDR | |
4b9b3959 AC |
1909 | if (GDB_MULTI_ARCH) |
1910 | fprintf_unfiltered (file, | |
1911 | "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n", | |
1912 | (long) current_gdbarch->reg_struct_has_addr | |
1913 | /*REG_STRUCT_HAS_ADDR ()*/); | |
d1e3cf49 AC |
1914 | #endif |
1915 | #ifdef SAVE_DUMMY_FRAME_TOS | |
4b9b3959 AC |
1916 | if (GDB_MULTI_ARCH) |
1917 | fprintf_unfiltered (file, | |
1918 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n", | |
1919 | (long) current_gdbarch->save_dummy_frame_tos | |
1920 | /*SAVE_DUMMY_FRAME_TOS ()*/); | |
f0d4cc9e AC |
1921 | #endif |
1922 | #ifdef TARGET_FLOAT_FORMAT | |
4b9b3959 AC |
1923 | fprintf_unfiltered (file, |
1924 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n", | |
f0d4cc9e AC |
1925 | (long) TARGET_FLOAT_FORMAT); |
1926 | #endif | |
1927 | #ifdef TARGET_DOUBLE_FORMAT | |
4b9b3959 AC |
1928 | fprintf_unfiltered (file, |
1929 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n", | |
f0d4cc9e AC |
1930 | (long) TARGET_DOUBLE_FORMAT); |
1931 | #endif | |
1932 | #ifdef TARGET_LONG_DOUBLE_FORMAT | |
4b9b3959 AC |
1933 | fprintf_unfiltered (file, |
1934 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n", | |
f0d4cc9e | 1935 | (long) TARGET_LONG_DOUBLE_FORMAT); |
381323f4 | 1936 | #endif |
4b9b3959 AC |
1937 | if (current_gdbarch->dump_tdep != NULL) |
1938 | current_gdbarch->dump_tdep (current_gdbarch, file); | |
0f71a2f6 JM |
1939 | } |
1940 | ||
1941 | struct gdbarch_tdep * | |
104c1213 | 1942 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1943 | { |
1944 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
1945 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
1946 | return gdbarch->tdep; | |
1947 | } | |
1948 | ||
1949 | ||
1950 | const struct bfd_arch_info * | |
104c1213 | 1951 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1952 | { |
1953 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
1954 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
1955 | return gdbarch->bfd_arch_info; | |
1956 | } | |
1957 | ||
1958 | int | |
104c1213 | 1959 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1960 | { |
1961 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
1962 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
1963 | return gdbarch->byte_order; | |
1964 | } | |
1965 | ||
c4093a6a JM |
1966 | int |
1967 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) | |
1968 | { | |
c0e8c252 | 1969 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
c4093a6a | 1970 | if (gdbarch_debug >= 2) |
c4093a6a JM |
1971 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); |
1972 | return gdbarch->bfd_vma_bit; | |
1973 | } | |
1974 | ||
1975 | void | |
1976 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, | |
1977 | int bfd_vma_bit) | |
1978 | { | |
1979 | gdbarch->bfd_vma_bit = bfd_vma_bit; | |
1980 | } | |
1981 | ||
0f71a2f6 | 1982 | int |
104c1213 | 1983 | gdbarch_ptr_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1984 | { |
1985 | if (gdbarch->ptr_bit == 0) | |
96baa820 | 1986 | internal_error ("gdbarch: gdbarch_ptr_bit invalid"); |
0f71a2f6 | 1987 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1988 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); |
1989 | return gdbarch->ptr_bit; | |
1990 | } | |
1991 | ||
1992 | void | |
104c1213 JM |
1993 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, |
1994 | int ptr_bit) | |
0f71a2f6 JM |
1995 | { |
1996 | gdbarch->ptr_bit = ptr_bit; | |
1997 | } | |
1998 | ||
1999 | int | |
104c1213 | 2000 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2001 | { |
2002 | if (gdbarch->short_bit == 0) | |
96baa820 | 2003 | internal_error ("gdbarch: gdbarch_short_bit invalid"); |
0f71a2f6 | 2004 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2005 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
2006 | return gdbarch->short_bit; | |
2007 | } | |
2008 | ||
2009 | void | |
104c1213 JM |
2010 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
2011 | int short_bit) | |
0f71a2f6 JM |
2012 | { |
2013 | gdbarch->short_bit = short_bit; | |
2014 | } | |
2015 | ||
2016 | int | |
104c1213 | 2017 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2018 | { |
2019 | if (gdbarch->int_bit == 0) | |
96baa820 | 2020 | internal_error ("gdbarch: gdbarch_int_bit invalid"); |
0f71a2f6 | 2021 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2022 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
2023 | return gdbarch->int_bit; | |
2024 | } | |
2025 | ||
2026 | void | |
104c1213 JM |
2027 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
2028 | int int_bit) | |
0f71a2f6 JM |
2029 | { |
2030 | gdbarch->int_bit = int_bit; | |
2031 | } | |
2032 | ||
2033 | int | |
104c1213 | 2034 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2035 | { |
2036 | if (gdbarch->long_bit == 0) | |
96baa820 | 2037 | internal_error ("gdbarch: gdbarch_long_bit invalid"); |
0f71a2f6 | 2038 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2039 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
2040 | return gdbarch->long_bit; | |
2041 | } | |
2042 | ||
2043 | void | |
104c1213 JM |
2044 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
2045 | int long_bit) | |
0f71a2f6 JM |
2046 | { |
2047 | gdbarch->long_bit = long_bit; | |
2048 | } | |
2049 | ||
2050 | int | |
104c1213 | 2051 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2052 | { |
2053 | if (gdbarch->long_long_bit == 0) | |
96baa820 | 2054 | internal_error ("gdbarch: gdbarch_long_long_bit invalid"); |
0f71a2f6 | 2055 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2056 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
2057 | return gdbarch->long_long_bit; | |
2058 | } | |
2059 | ||
2060 | void | |
104c1213 JM |
2061 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
2062 | int long_long_bit) | |
0f71a2f6 JM |
2063 | { |
2064 | gdbarch->long_long_bit = long_long_bit; | |
2065 | } | |
2066 | ||
2067 | int | |
104c1213 | 2068 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2069 | { |
2070 | if (gdbarch->float_bit == 0) | |
96baa820 | 2071 | internal_error ("gdbarch: gdbarch_float_bit invalid"); |
0f71a2f6 | 2072 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2073 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
2074 | return gdbarch->float_bit; | |
2075 | } | |
2076 | ||
2077 | void | |
104c1213 JM |
2078 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
2079 | int float_bit) | |
0f71a2f6 JM |
2080 | { |
2081 | gdbarch->float_bit = float_bit; | |
2082 | } | |
2083 | ||
2084 | int | |
104c1213 | 2085 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2086 | { |
2087 | if (gdbarch->double_bit == 0) | |
96baa820 | 2088 | internal_error ("gdbarch: gdbarch_double_bit invalid"); |
0f71a2f6 | 2089 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2090 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
2091 | return gdbarch->double_bit; | |
2092 | } | |
2093 | ||
2094 | void | |
104c1213 JM |
2095 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
2096 | int double_bit) | |
0f71a2f6 JM |
2097 | { |
2098 | gdbarch->double_bit = double_bit; | |
2099 | } | |
2100 | ||
2101 | int | |
104c1213 | 2102 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2103 | { |
2104 | if (gdbarch->long_double_bit == 0) | |
96baa820 | 2105 | internal_error ("gdbarch: gdbarch_long_double_bit invalid"); |
0f71a2f6 | 2106 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2107 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
2108 | return gdbarch->long_double_bit; | |
2109 | } | |
2110 | ||
2111 | void | |
104c1213 JM |
2112 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
2113 | int long_double_bit) | |
0f71a2f6 JM |
2114 | { |
2115 | gdbarch->long_double_bit = long_double_bit; | |
2116 | } | |
2117 | ||
7355ddba JB |
2118 | int |
2119 | gdbarch_ieee_float (struct gdbarch *gdbarch) | |
2120 | { | |
2121 | /* Skip verify of ieee_float, invalid_p == 0 */ | |
2122 | if (gdbarch_debug >= 2) | |
2123 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n"); | |
2124 | return gdbarch->ieee_float; | |
2125 | } | |
2126 | ||
2127 | void | |
2128 | set_gdbarch_ieee_float (struct gdbarch *gdbarch, | |
2129 | int ieee_float) | |
2130 | { | |
2131 | gdbarch->ieee_float = ieee_float; | |
2132 | } | |
2133 | ||
0f71a2f6 JM |
2134 | CORE_ADDR |
2135 | gdbarch_read_pc (struct gdbarch *gdbarch, int pid) | |
2136 | { | |
2137 | if (gdbarch->read_pc == 0) | |
96baa820 | 2138 | internal_error ("gdbarch: gdbarch_read_pc invalid"); |
0f71a2f6 | 2139 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2140 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
2141 | return gdbarch->read_pc (pid); | |
2142 | } | |
2143 | ||
2144 | void | |
104c1213 JM |
2145 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
2146 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
2147 | { |
2148 | gdbarch->read_pc = read_pc; | |
2149 | } | |
2150 | ||
2151 | void | |
2152 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid) | |
2153 | { | |
2154 | if (gdbarch->write_pc == 0) | |
96baa820 | 2155 | internal_error ("gdbarch: gdbarch_write_pc invalid"); |
0f71a2f6 | 2156 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2157 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
2158 | gdbarch->write_pc (val, pid); | |
2159 | } | |
2160 | ||
2161 | void | |
104c1213 JM |
2162 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
2163 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
2164 | { |
2165 | gdbarch->write_pc = write_pc; | |
2166 | } | |
2167 | ||
2168 | CORE_ADDR | |
2169 | gdbarch_read_fp (struct gdbarch *gdbarch) | |
2170 | { | |
2171 | if (gdbarch->read_fp == 0) | |
96baa820 | 2172 | internal_error ("gdbarch: gdbarch_read_fp invalid"); |
0f71a2f6 | 2173 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2174 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); |
2175 | return gdbarch->read_fp (); | |
2176 | } | |
2177 | ||
2178 | void | |
104c1213 JM |
2179 | set_gdbarch_read_fp (struct gdbarch *gdbarch, |
2180 | gdbarch_read_fp_ftype read_fp) | |
0f71a2f6 JM |
2181 | { |
2182 | gdbarch->read_fp = read_fp; | |
2183 | } | |
2184 | ||
2185 | void | |
2186 | gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val) | |
2187 | { | |
2188 | if (gdbarch->write_fp == 0) | |
96baa820 | 2189 | internal_error ("gdbarch: gdbarch_write_fp invalid"); |
0f71a2f6 | 2190 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2191 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n"); |
2192 | gdbarch->write_fp (val); | |
2193 | } | |
2194 | ||
2195 | void | |
104c1213 JM |
2196 | set_gdbarch_write_fp (struct gdbarch *gdbarch, |
2197 | gdbarch_write_fp_ftype write_fp) | |
0f71a2f6 JM |
2198 | { |
2199 | gdbarch->write_fp = write_fp; | |
2200 | } | |
2201 | ||
2202 | CORE_ADDR | |
2203 | gdbarch_read_sp (struct gdbarch *gdbarch) | |
2204 | { | |
2205 | if (gdbarch->read_sp == 0) | |
96baa820 | 2206 | internal_error ("gdbarch: gdbarch_read_sp invalid"); |
0f71a2f6 | 2207 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2208 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
2209 | return gdbarch->read_sp (); | |
2210 | } | |
2211 | ||
2212 | void | |
104c1213 JM |
2213 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
2214 | gdbarch_read_sp_ftype read_sp) | |
0f71a2f6 JM |
2215 | { |
2216 | gdbarch->read_sp = read_sp; | |
2217 | } | |
2218 | ||
2219 | void | |
2220 | gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) | |
2221 | { | |
2222 | if (gdbarch->write_sp == 0) | |
96baa820 | 2223 | internal_error ("gdbarch: gdbarch_write_sp invalid"); |
0f71a2f6 | 2224 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2225 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n"); |
2226 | gdbarch->write_sp (val); | |
2227 | } | |
2228 | ||
2229 | void | |
104c1213 JM |
2230 | set_gdbarch_write_sp (struct gdbarch *gdbarch, |
2231 | gdbarch_write_sp_ftype write_sp) | |
0f71a2f6 JM |
2232 | { |
2233 | gdbarch->write_sp = write_sp; | |
2234 | } | |
2235 | ||
2236 | int | |
104c1213 | 2237 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2238 | { |
2239 | if (gdbarch->num_regs == -1) | |
96baa820 | 2240 | internal_error ("gdbarch: gdbarch_num_regs invalid"); |
0f71a2f6 | 2241 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2242 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2243 | return gdbarch->num_regs; | |
2244 | } | |
2245 | ||
2246 | void | |
104c1213 JM |
2247 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2248 | int num_regs) | |
0f71a2f6 JM |
2249 | { |
2250 | gdbarch->num_regs = num_regs; | |
2251 | } | |
2252 | ||
0aba1244 EZ |
2253 | int |
2254 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2255 | { | |
2256 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ | |
2257 | if (gdbarch_debug >= 2) | |
2258 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2259 | return gdbarch->num_pseudo_regs; | |
2260 | } | |
2261 | ||
2262 | void | |
2263 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2264 | int num_pseudo_regs) | |
2265 | { | |
2266 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2267 | } | |
2268 | ||
0f71a2f6 | 2269 | int |
104c1213 | 2270 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2271 | { |
2272 | if (gdbarch->sp_regnum == -1) | |
96baa820 | 2273 | internal_error ("gdbarch: gdbarch_sp_regnum invalid"); |
0f71a2f6 | 2274 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2275 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2276 | return gdbarch->sp_regnum; | |
2277 | } | |
2278 | ||
2279 | void | |
104c1213 JM |
2280 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2281 | int sp_regnum) | |
0f71a2f6 JM |
2282 | { |
2283 | gdbarch->sp_regnum = sp_regnum; | |
2284 | } | |
2285 | ||
2286 | int | |
104c1213 | 2287 | gdbarch_fp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2288 | { |
2289 | if (gdbarch->fp_regnum == -1) | |
96baa820 | 2290 | internal_error ("gdbarch: gdbarch_fp_regnum invalid"); |
0f71a2f6 | 2291 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2292 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); |
2293 | return gdbarch->fp_regnum; | |
2294 | } | |
2295 | ||
2296 | void | |
104c1213 JM |
2297 | set_gdbarch_fp_regnum (struct gdbarch *gdbarch, |
2298 | int fp_regnum) | |
0f71a2f6 JM |
2299 | { |
2300 | gdbarch->fp_regnum = fp_regnum; | |
2301 | } | |
2302 | ||
2303 | int | |
104c1213 | 2304 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2305 | { |
2306 | if (gdbarch->pc_regnum == -1) | |
96baa820 | 2307 | internal_error ("gdbarch: gdbarch_pc_regnum invalid"); |
0f71a2f6 | 2308 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2309 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2310 | return gdbarch->pc_regnum; | |
2311 | } | |
2312 | ||
2313 | void | |
104c1213 JM |
2314 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2315 | int pc_regnum) | |
0f71a2f6 JM |
2316 | { |
2317 | gdbarch->pc_regnum = pc_regnum; | |
2318 | } | |
2319 | ||
60054393 MS |
2320 | int |
2321 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2322 | { | |
2323 | /* Skip verify of fp0_regnum, invalid_p == 0 */ | |
2324 | if (gdbarch_debug >= 2) | |
2325 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2326 | return gdbarch->fp0_regnum; | |
2327 | } | |
2328 | ||
2329 | void | |
2330 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2331 | int fp0_regnum) | |
2332 | { | |
2333 | gdbarch->fp0_regnum = fp0_regnum; | |
2334 | } | |
2335 | ||
03863182 AC |
2336 | int |
2337 | gdbarch_npc_regnum (struct gdbarch *gdbarch) | |
2338 | { | |
2339 | /* Skip verify of npc_regnum, invalid_p == 0 */ | |
2340 | if (gdbarch_debug >= 2) | |
2341 | fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n"); | |
2342 | return gdbarch->npc_regnum; | |
2343 | } | |
2344 | ||
2345 | void | |
2346 | set_gdbarch_npc_regnum (struct gdbarch *gdbarch, | |
2347 | int npc_regnum) | |
2348 | { | |
2349 | gdbarch->npc_regnum = npc_regnum; | |
2350 | } | |
2351 | ||
2352 | int | |
2353 | gdbarch_nnpc_regnum (struct gdbarch *gdbarch) | |
2354 | { | |
2355 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ | |
2356 | if (gdbarch_debug >= 2) | |
2357 | fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n"); | |
2358 | return gdbarch->nnpc_regnum; | |
2359 | } | |
2360 | ||
2361 | void | |
2362 | set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, | |
2363 | int nnpc_regnum) | |
2364 | { | |
2365 | gdbarch->nnpc_regnum = nnpc_regnum; | |
2366 | } | |
2367 | ||
0f71a2f6 JM |
2368 | char * |
2369 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) | |
2370 | { | |
7be570e7 | 2371 | if (gdbarch->register_name == 0) |
96baa820 | 2372 | internal_error ("gdbarch: gdbarch_register_name invalid"); |
0f71a2f6 | 2373 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2374 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
2375 | return gdbarch->register_name (regnr); | |
2376 | } | |
2377 | ||
2378 | void | |
104c1213 JM |
2379 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2380 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2381 | { |
2382 | gdbarch->register_name = register_name; | |
2383 | } | |
2384 | ||
2385 | int | |
104c1213 | 2386 | gdbarch_register_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2387 | { |
2388 | if (gdbarch->register_size == -1) | |
96baa820 | 2389 | internal_error ("gdbarch: gdbarch_register_size invalid"); |
0f71a2f6 | 2390 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2391 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); |
2392 | return gdbarch->register_size; | |
2393 | } | |
2394 | ||
2395 | void | |
104c1213 JM |
2396 | set_gdbarch_register_size (struct gdbarch *gdbarch, |
2397 | int register_size) | |
0f71a2f6 JM |
2398 | { |
2399 | gdbarch->register_size = register_size; | |
2400 | } | |
2401 | ||
2402 | int | |
104c1213 | 2403 | gdbarch_register_bytes (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2404 | { |
2405 | if (gdbarch->register_bytes == -1) | |
96baa820 | 2406 | internal_error ("gdbarch: gdbarch_register_bytes invalid"); |
0f71a2f6 | 2407 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2408 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n"); |
2409 | return gdbarch->register_bytes; | |
2410 | } | |
2411 | ||
2412 | void | |
104c1213 JM |
2413 | set_gdbarch_register_bytes (struct gdbarch *gdbarch, |
2414 | int register_bytes) | |
0f71a2f6 JM |
2415 | { |
2416 | gdbarch->register_bytes = register_bytes; | |
2417 | } | |
2418 | ||
2419 | int | |
2420 | gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) | |
2421 | { | |
2422 | if (gdbarch->register_byte == 0) | |
96baa820 | 2423 | internal_error ("gdbarch: gdbarch_register_byte invalid"); |
0f71a2f6 | 2424 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); |
2426 | return gdbarch->register_byte (reg_nr); | |
2427 | } | |
2428 | ||
2429 | void | |
104c1213 JM |
2430 | set_gdbarch_register_byte (struct gdbarch *gdbarch, |
2431 | gdbarch_register_byte_ftype register_byte) | |
0f71a2f6 JM |
2432 | { |
2433 | gdbarch->register_byte = register_byte; | |
2434 | } | |
2435 | ||
2436 | int | |
2437 | gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr) | |
2438 | { | |
2439 | if (gdbarch->register_raw_size == 0) | |
96baa820 | 2440 | internal_error ("gdbarch: gdbarch_register_raw_size invalid"); |
0f71a2f6 | 2441 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2442 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n"); |
2443 | return gdbarch->register_raw_size (reg_nr); | |
2444 | } | |
2445 | ||
2446 | void | |
104c1213 JM |
2447 | set_gdbarch_register_raw_size (struct gdbarch *gdbarch, |
2448 | gdbarch_register_raw_size_ftype register_raw_size) | |
0f71a2f6 JM |
2449 | { |
2450 | gdbarch->register_raw_size = register_raw_size; | |
2451 | } | |
2452 | ||
2453 | int | |
104c1213 | 2454 | gdbarch_max_register_raw_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2455 | { |
2456 | if (gdbarch->max_register_raw_size == -1) | |
96baa820 | 2457 | internal_error ("gdbarch: gdbarch_max_register_raw_size invalid"); |
0f71a2f6 | 2458 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2459 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n"); |
2460 | return gdbarch->max_register_raw_size; | |
2461 | } | |
2462 | ||
2463 | void | |
104c1213 JM |
2464 | set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, |
2465 | int max_register_raw_size) | |
0f71a2f6 JM |
2466 | { |
2467 | gdbarch->max_register_raw_size = max_register_raw_size; | |
2468 | } | |
2469 | ||
2470 | int | |
2471 | gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) | |
2472 | { | |
2473 | if (gdbarch->register_virtual_size == 0) | |
96baa820 | 2474 | internal_error ("gdbarch: gdbarch_register_virtual_size invalid"); |
0f71a2f6 | 2475 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2476 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n"); |
2477 | return gdbarch->register_virtual_size (reg_nr); | |
2478 | } | |
2479 | ||
2480 | void | |
104c1213 JM |
2481 | set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, |
2482 | gdbarch_register_virtual_size_ftype register_virtual_size) | |
0f71a2f6 JM |
2483 | { |
2484 | gdbarch->register_virtual_size = register_virtual_size; | |
2485 | } | |
2486 | ||
2487 | int | |
104c1213 | 2488 | gdbarch_max_register_virtual_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2489 | { |
2490 | if (gdbarch->max_register_virtual_size == -1) | |
96baa820 | 2491 | internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid"); |
0f71a2f6 | 2492 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2493 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n"); |
2494 | return gdbarch->max_register_virtual_size; | |
2495 | } | |
2496 | ||
2497 | void | |
104c1213 JM |
2498 | set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, |
2499 | int max_register_virtual_size) | |
0f71a2f6 JM |
2500 | { |
2501 | gdbarch->max_register_virtual_size = max_register_virtual_size; | |
2502 | } | |
2503 | ||
2504 | struct type * | |
2505 | gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) | |
2506 | { | |
2507 | if (gdbarch->register_virtual_type == 0) | |
96baa820 | 2508 | internal_error ("gdbarch: gdbarch_register_virtual_type invalid"); |
0f71a2f6 | 2509 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2510 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n"); |
2511 | return gdbarch->register_virtual_type (reg_nr); | |
2512 | } | |
2513 | ||
2514 | void | |
104c1213 JM |
2515 | set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, |
2516 | gdbarch_register_virtual_type_ftype register_virtual_type) | |
0f71a2f6 JM |
2517 | { |
2518 | gdbarch->register_virtual_type = register_virtual_type; | |
2519 | } | |
2520 | ||
666e11c5 EZ |
2521 | void |
2522 | gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) | |
2523 | { | |
2524 | if (gdbarch->do_registers_info == 0) | |
2525 | internal_error ("gdbarch: gdbarch_do_registers_info invalid"); | |
2526 | if (gdbarch_debug >= 2) | |
2527 | fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n"); | |
2528 | gdbarch->do_registers_info (reg_nr, fpregs); | |
2529 | } | |
2530 | ||
2531 | void | |
2532 | set_gdbarch_do_registers_info (struct gdbarch *gdbarch, | |
2533 | gdbarch_do_registers_info_ftype do_registers_info) | |
2534 | { | |
2535 | gdbarch->do_registers_info = do_registers_info; | |
2536 | } | |
2537 | ||
7c7651b2 AC |
2538 | int |
2539 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) | |
2540 | { | |
2541 | if (gdbarch->register_sim_regno == 0) | |
2542 | internal_error ("gdbarch: gdbarch_register_sim_regno invalid"); | |
2543 | if (gdbarch_debug >= 2) | |
2544 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); | |
2545 | return gdbarch->register_sim_regno (reg_nr); | |
2546 | } | |
2547 | ||
2548 | void | |
2549 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, | |
2550 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
2551 | { | |
2552 | gdbarch->register_sim_regno = register_sim_regno; | |
2553 | } | |
2554 | ||
0f71a2f6 | 2555 | int |
104c1213 | 2556 | gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2557 | { |
2558 | if (gdbarch->use_generic_dummy_frames == -1) | |
96baa820 | 2559 | internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid"); |
0f71a2f6 | 2560 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2561 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n"); |
2562 | return gdbarch->use_generic_dummy_frames; | |
2563 | } | |
2564 | ||
2565 | void | |
104c1213 JM |
2566 | set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, |
2567 | int use_generic_dummy_frames) | |
0f71a2f6 JM |
2568 | { |
2569 | gdbarch->use_generic_dummy_frames = use_generic_dummy_frames; | |
2570 | } | |
2571 | ||
2572 | int | |
104c1213 | 2573 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2574 | { |
2575 | if (gdbarch->call_dummy_location == 0) | |
96baa820 | 2576 | internal_error ("gdbarch: gdbarch_call_dummy_location invalid"); |
0f71a2f6 | 2577 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2578 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
2579 | return gdbarch->call_dummy_location; | |
2580 | } | |
2581 | ||
2582 | void | |
104c1213 JM |
2583 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
2584 | int call_dummy_location) | |
0f71a2f6 JM |
2585 | { |
2586 | gdbarch->call_dummy_location = call_dummy_location; | |
2587 | } | |
2588 | ||
2589 | CORE_ADDR | |
2590 | gdbarch_call_dummy_address (struct gdbarch *gdbarch) | |
2591 | { | |
2592 | if (gdbarch->call_dummy_address == 0) | |
96baa820 | 2593 | internal_error ("gdbarch: gdbarch_call_dummy_address invalid"); |
0f71a2f6 | 2594 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2595 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); |
2596 | return gdbarch->call_dummy_address (); | |
2597 | } | |
2598 | ||
2599 | void | |
104c1213 JM |
2600 | set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, |
2601 | gdbarch_call_dummy_address_ftype call_dummy_address) | |
0f71a2f6 JM |
2602 | { |
2603 | gdbarch->call_dummy_address = call_dummy_address; | |
2604 | } | |
2605 | ||
2606 | CORE_ADDR | |
104c1213 | 2607 | gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2608 | { |
2609 | if (gdbarch->call_dummy_start_offset == -1) | |
96baa820 | 2610 | internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid"); |
0f71a2f6 | 2611 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2612 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); |
2613 | return gdbarch->call_dummy_start_offset; | |
2614 | } | |
2615 | ||
2616 | void | |
104c1213 JM |
2617 | set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, |
2618 | CORE_ADDR call_dummy_start_offset) | |
0f71a2f6 JM |
2619 | { |
2620 | gdbarch->call_dummy_start_offset = call_dummy_start_offset; | |
2621 | } | |
2622 | ||
2623 | CORE_ADDR | |
104c1213 | 2624 | gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2625 | { |
2626 | if (gdbarch->call_dummy_breakpoint_offset == -1) | |
96baa820 | 2627 | internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); |
0f71a2f6 | 2628 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2629 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); |
2630 | return gdbarch->call_dummy_breakpoint_offset; | |
2631 | } | |
2632 | ||
2633 | void | |
104c1213 JM |
2634 | set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, |
2635 | CORE_ADDR call_dummy_breakpoint_offset) | |
0f71a2f6 JM |
2636 | { |
2637 | gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; | |
2638 | } | |
2639 | ||
2640 | int | |
104c1213 | 2641 | gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2642 | { |
2643 | if (gdbarch->call_dummy_breakpoint_offset_p == -1) | |
96baa820 | 2644 | internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); |
0f71a2f6 | 2645 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2646 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); |
2647 | return gdbarch->call_dummy_breakpoint_offset_p; | |
2648 | } | |
2649 | ||
2650 | void | |
104c1213 JM |
2651 | set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, |
2652 | int call_dummy_breakpoint_offset_p) | |
0f71a2f6 JM |
2653 | { |
2654 | gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; | |
2655 | } | |
2656 | ||
2657 | int | |
104c1213 | 2658 | gdbarch_call_dummy_length (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2659 | { |
2660 | if (gdbarch->call_dummy_length == -1) | |
96baa820 | 2661 | internal_error ("gdbarch: gdbarch_call_dummy_length invalid"); |
0f71a2f6 | 2662 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2663 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); |
2664 | return gdbarch->call_dummy_length; | |
2665 | } | |
2666 | ||
2667 | void | |
104c1213 JM |
2668 | set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, |
2669 | int call_dummy_length) | |
0f71a2f6 JM |
2670 | { |
2671 | gdbarch->call_dummy_length = call_dummy_length; | |
2672 | } | |
2673 | ||
2674 | int | |
2675 | gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) | |
2676 | { | |
2677 | if (gdbarch->pc_in_call_dummy == 0) | |
96baa820 | 2678 | internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid"); |
0f71a2f6 | 2679 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2680 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n"); |
2681 | return gdbarch->pc_in_call_dummy (pc, sp, frame_address); | |
2682 | } | |
2683 | ||
2684 | void | |
104c1213 JM |
2685 | set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, |
2686 | gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy) | |
0f71a2f6 JM |
2687 | { |
2688 | gdbarch->pc_in_call_dummy = pc_in_call_dummy; | |
2689 | } | |
2690 | ||
2691 | int | |
104c1213 | 2692 | gdbarch_call_dummy_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2693 | { |
2694 | if (gdbarch->call_dummy_p == -1) | |
96baa820 | 2695 | internal_error ("gdbarch: gdbarch_call_dummy_p invalid"); |
0f71a2f6 | 2696 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2697 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n"); |
2698 | return gdbarch->call_dummy_p; | |
2699 | } | |
2700 | ||
2701 | void | |
104c1213 JM |
2702 | set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, |
2703 | int call_dummy_p) | |
0f71a2f6 JM |
2704 | { |
2705 | gdbarch->call_dummy_p = call_dummy_p; | |
2706 | } | |
2707 | ||
2708 | LONGEST * | |
104c1213 | 2709 | gdbarch_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 2710 | { |
c0e8c252 | 2711 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 2712 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2713 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); |
2714 | return gdbarch->call_dummy_words; | |
2715 | } | |
2716 | ||
2717 | void | |
104c1213 JM |
2718 | set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, |
2719 | LONGEST * call_dummy_words) | |
0f71a2f6 JM |
2720 | { |
2721 | gdbarch->call_dummy_words = call_dummy_words; | |
2722 | } | |
2723 | ||
2724 | int | |
104c1213 | 2725 | gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 2726 | { |
c0e8c252 | 2727 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 2728 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2729 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); |
2730 | return gdbarch->sizeof_call_dummy_words; | |
2731 | } | |
2732 | ||
2733 | void | |
104c1213 JM |
2734 | set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
2735 | int sizeof_call_dummy_words) | |
0f71a2f6 JM |
2736 | { |
2737 | gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; | |
2738 | } | |
2739 | ||
2740 | int | |
104c1213 | 2741 | gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2742 | { |
2743 | if (gdbarch->call_dummy_stack_adjust_p == -1) | |
96baa820 | 2744 | internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid"); |
0f71a2f6 | 2745 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2746 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n"); |
2747 | return gdbarch->call_dummy_stack_adjust_p; | |
2748 | } | |
2749 | ||
2750 | void | |
104c1213 JM |
2751 | set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, |
2752 | int call_dummy_stack_adjust_p) | |
0f71a2f6 JM |
2753 | { |
2754 | gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p; | |
2755 | } | |
2756 | ||
2757 | int | |
104c1213 | 2758 | gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2759 | { |
2760 | if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0) | |
96baa820 | 2761 | internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid"); |
0f71a2f6 | 2762 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2763 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n"); |
2764 | return gdbarch->call_dummy_stack_adjust; | |
2765 | } | |
2766 | ||
2767 | void | |
104c1213 JM |
2768 | set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, |
2769 | int call_dummy_stack_adjust) | |
0f71a2f6 JM |
2770 | { |
2771 | gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust; | |
2772 | } | |
2773 | ||
2774 | void | |
2775 | 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) | |
2776 | { | |
2777 | if (gdbarch->fix_call_dummy == 0) | |
96baa820 | 2778 | internal_error ("gdbarch: gdbarch_fix_call_dummy invalid"); |
0f71a2f6 | 2779 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2780 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); |
2781 | gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); | |
2782 | } | |
2783 | ||
2784 | void | |
104c1213 JM |
2785 | set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, |
2786 | gdbarch_fix_call_dummy_ftype fix_call_dummy) | |
0f71a2f6 JM |
2787 | { |
2788 | gdbarch->fix_call_dummy = fix_call_dummy; | |
2789 | } | |
2790 | ||
2791 | int | |
104c1213 | 2792 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2793 | { |
2794 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2795 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
2796 | return gdbarch->believe_pcc_promotion; | |
2797 | } | |
2798 | ||
2799 | void | |
104c1213 JM |
2800 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
2801 | int believe_pcc_promotion) | |
0f71a2f6 JM |
2802 | { |
2803 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
2804 | } | |
2805 | ||
2806 | int | |
104c1213 | 2807 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2808 | { |
2809 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2810 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
2811 | return gdbarch->believe_pcc_promotion_type; | |
2812 | } | |
2813 | ||
2814 | void | |
104c1213 JM |
2815 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
2816 | int believe_pcc_promotion_type) | |
0f71a2f6 JM |
2817 | { |
2818 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; | |
2819 | } | |
2820 | ||
b9a8e3bf JB |
2821 | int |
2822 | gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual) | |
2823 | { | |
2824 | if (gdbarch->coerce_float_to_double == 0) | |
2825 | internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid"); | |
2826 | if (gdbarch_debug >= 2) | |
b9a8e3bf JB |
2827 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n"); |
2828 | return gdbarch->coerce_float_to_double (formal, actual); | |
2829 | } | |
2830 | ||
2831 | void | |
2832 | set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, | |
2833 | gdbarch_coerce_float_to_double_ftype coerce_float_to_double) | |
2834 | { | |
2835 | gdbarch->coerce_float_to_double = coerce_float_to_double; | |
2836 | } | |
2837 | ||
0f71a2f6 | 2838 | void |
adf40b2e | 2839 | 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) |
0f71a2f6 JM |
2840 | { |
2841 | if (gdbarch->get_saved_register == 0) | |
96baa820 | 2842 | internal_error ("gdbarch: gdbarch_get_saved_register invalid"); |
0f71a2f6 | 2843 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2844 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n"); |
2845 | gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); | |
2846 | } | |
2847 | ||
2848 | void | |
104c1213 JM |
2849 | set_gdbarch_get_saved_register (struct gdbarch *gdbarch, |
2850 | gdbarch_get_saved_register_ftype get_saved_register) | |
0f71a2f6 JM |
2851 | { |
2852 | gdbarch->get_saved_register = get_saved_register; | |
2853 | } | |
2854 | ||
2855 | int | |
2856 | gdbarch_register_convertible (struct gdbarch *gdbarch, int nr) | |
2857 | { | |
2858 | if (gdbarch->register_convertible == 0) | |
96baa820 | 2859 | internal_error ("gdbarch: gdbarch_register_convertible invalid"); |
0f71a2f6 | 2860 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2861 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n"); |
2862 | return gdbarch->register_convertible (nr); | |
2863 | } | |
2864 | ||
2865 | void | |
104c1213 JM |
2866 | set_gdbarch_register_convertible (struct gdbarch *gdbarch, |
2867 | gdbarch_register_convertible_ftype register_convertible) | |
0f71a2f6 JM |
2868 | { |
2869 | gdbarch->register_convertible = register_convertible; | |
2870 | } | |
2871 | ||
2872 | void | |
2873 | gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) | |
2874 | { | |
2875 | if (gdbarch->register_convert_to_virtual == 0) | |
96baa820 | 2876 | internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid"); |
0f71a2f6 | 2877 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2878 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n"); |
2879 | gdbarch->register_convert_to_virtual (regnum, type, from, to); | |
2880 | } | |
2881 | ||
2882 | void | |
104c1213 JM |
2883 | set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, |
2884 | gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual) | |
0f71a2f6 JM |
2885 | { |
2886 | gdbarch->register_convert_to_virtual = register_convert_to_virtual; | |
2887 | } | |
2888 | ||
2889 | void | |
2890 | gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) | |
2891 | { | |
2892 | if (gdbarch->register_convert_to_raw == 0) | |
96baa820 | 2893 | internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid"); |
0f71a2f6 | 2894 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2895 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n"); |
2896 | gdbarch->register_convert_to_raw (type, regnum, from, to); | |
2897 | } | |
2898 | ||
2899 | void | |
104c1213 JM |
2900 | set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, |
2901 | gdbarch_register_convert_to_raw_ftype register_convert_to_raw) | |
0f71a2f6 JM |
2902 | { |
2903 | gdbarch->register_convert_to_raw = register_convert_to_raw; | |
2904 | } | |
2905 | ||
7f1b2585 EZ |
2906 | void |
2907 | gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum) | |
2908 | { | |
2909 | if (gdbarch->fetch_pseudo_register == 0) | |
2910 | internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid"); | |
2911 | if (gdbarch_debug >= 2) | |
2912 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n"); | |
2913 | gdbarch->fetch_pseudo_register (regnum); | |
2914 | } | |
2915 | ||
2916 | void | |
2917 | set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, | |
2918 | gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register) | |
2919 | { | |
2920 | gdbarch->fetch_pseudo_register = fetch_pseudo_register; | |
2921 | } | |
2922 | ||
2923 | void | |
2924 | gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum) | |
2925 | { | |
2926 | if (gdbarch->store_pseudo_register == 0) | |
2927 | internal_error ("gdbarch: gdbarch_store_pseudo_register invalid"); | |
2928 | if (gdbarch_debug >= 2) | |
2929 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n"); | |
2930 | gdbarch->store_pseudo_register (regnum); | |
2931 | } | |
2932 | ||
2933 | void | |
2934 | set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, | |
2935 | gdbarch_store_pseudo_register_ftype store_pseudo_register) | |
2936 | { | |
2937 | gdbarch->store_pseudo_register = store_pseudo_register; | |
2938 | } | |
2939 | ||
4478b372 | 2940 | CORE_ADDR |
ac2e2ef7 | 2941 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
4478b372 JB |
2942 | { |
2943 | if (gdbarch->pointer_to_address == 0) | |
2944 | internal_error ("gdbarch: gdbarch_pointer_to_address invalid"); | |
2945 | if (gdbarch_debug >= 2) | |
2946 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
2947 | return gdbarch->pointer_to_address (type, buf); | |
2948 | } | |
2949 | ||
2950 | void | |
2951 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
2952 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
2953 | { | |
2954 | gdbarch->pointer_to_address = pointer_to_address; | |
2955 | } | |
2956 | ||
2957 | void | |
ac2e2ef7 | 2958 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
4478b372 JB |
2959 | { |
2960 | if (gdbarch->address_to_pointer == 0) | |
2961 | internal_error ("gdbarch: gdbarch_address_to_pointer invalid"); | |
2962 | if (gdbarch_debug >= 2) | |
2963 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
2964 | gdbarch->address_to_pointer (type, buf, addr); | |
2965 | } | |
2966 | ||
2967 | void | |
2968 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
2969 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
2970 | { | |
2971 | gdbarch->address_to_pointer = address_to_pointer; | |
2972 | } | |
2973 | ||
71a9f22e JB |
2974 | int |
2975 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) | |
2976 | { | |
71a9f22e JB |
2977 | if (gdbarch->return_value_on_stack == 0) |
2978 | internal_error ("gdbarch: gdbarch_return_value_on_stack invalid"); | |
2979 | if (gdbarch_debug >= 2) | |
2980 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); | |
2981 | return gdbarch->return_value_on_stack (type); | |
2982 | } | |
2983 | ||
2984 | void | |
2985 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, | |
2986 | gdbarch_return_value_on_stack_ftype return_value_on_stack) | |
2987 | { | |
2988 | gdbarch->return_value_on_stack = return_value_on_stack; | |
2989 | } | |
2990 | ||
0f71a2f6 JM |
2991 | void |
2992 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) | |
2993 | { | |
2994 | if (gdbarch->extract_return_value == 0) | |
96baa820 | 2995 | internal_error ("gdbarch: gdbarch_extract_return_value invalid"); |
0f71a2f6 | 2996 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2997 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); |
2998 | gdbarch->extract_return_value (type, regbuf, valbuf); | |
2999 | } | |
3000 | ||
3001 | void | |
104c1213 JM |
3002 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, |
3003 | gdbarch_extract_return_value_ftype extract_return_value) | |
0f71a2f6 JM |
3004 | { |
3005 | gdbarch->extract_return_value = extract_return_value; | |
3006 | } | |
3007 | ||
3008 | CORE_ADDR | |
3009 | gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
3010 | { | |
3011 | if (gdbarch->push_arguments == 0) | |
96baa820 | 3012 | internal_error ("gdbarch: gdbarch_push_arguments invalid"); |
0f71a2f6 | 3013 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3014 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n"); |
3015 | return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr); | |
3016 | } | |
3017 | ||
3018 | void | |
104c1213 JM |
3019 | set_gdbarch_push_arguments (struct gdbarch *gdbarch, |
3020 | gdbarch_push_arguments_ftype push_arguments) | |
0f71a2f6 JM |
3021 | { |
3022 | gdbarch->push_arguments = push_arguments; | |
3023 | } | |
3024 | ||
3025 | void | |
3026 | gdbarch_push_dummy_frame (struct gdbarch *gdbarch) | |
3027 | { | |
3028 | if (gdbarch->push_dummy_frame == 0) | |
96baa820 | 3029 | internal_error ("gdbarch: gdbarch_push_dummy_frame invalid"); |
0f71a2f6 | 3030 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3031 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n"); |
3032 | gdbarch->push_dummy_frame (); | |
3033 | } | |
3034 | ||
3035 | void | |
104c1213 JM |
3036 | set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, |
3037 | gdbarch_push_dummy_frame_ftype push_dummy_frame) | |
0f71a2f6 JM |
3038 | { |
3039 | gdbarch->push_dummy_frame = push_dummy_frame; | |
3040 | } | |
3041 | ||
3042 | CORE_ADDR | |
3043 | gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) | |
3044 | { | |
3045 | if (gdbarch->push_return_address == 0) | |
96baa820 | 3046 | internal_error ("gdbarch: gdbarch_push_return_address invalid"); |
0f71a2f6 | 3047 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3048 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n"); |
3049 | return gdbarch->push_return_address (pc, sp); | |
3050 | } | |
3051 | ||
3052 | void | |
104c1213 JM |
3053 | set_gdbarch_push_return_address (struct gdbarch *gdbarch, |
3054 | gdbarch_push_return_address_ftype push_return_address) | |
0f71a2f6 JM |
3055 | { |
3056 | gdbarch->push_return_address = push_return_address; | |
3057 | } | |
3058 | ||
3059 | void | |
3060 | gdbarch_pop_frame (struct gdbarch *gdbarch) | |
3061 | { | |
3062 | if (gdbarch->pop_frame == 0) | |
96baa820 | 3063 | internal_error ("gdbarch: gdbarch_pop_frame invalid"); |
0f71a2f6 | 3064 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3065 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n"); |
3066 | gdbarch->pop_frame (); | |
3067 | } | |
3068 | ||
3069 | void | |
104c1213 JM |
3070 | set_gdbarch_pop_frame (struct gdbarch *gdbarch, |
3071 | gdbarch_pop_frame_ftype pop_frame) | |
0f71a2f6 JM |
3072 | { |
3073 | gdbarch->pop_frame = pop_frame; | |
3074 | } | |
3075 | ||
3076 | CORE_ADDR | |
3077 | gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x) | |
3078 | { | |
3079 | if (gdbarch->d10v_make_daddr == 0) | |
96baa820 | 3080 | internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid"); |
0f71a2f6 | 3081 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3082 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n"); |
3083 | return gdbarch->d10v_make_daddr (x); | |
3084 | } | |
3085 | ||
3086 | void | |
104c1213 JM |
3087 | set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, |
3088 | gdbarch_d10v_make_daddr_ftype d10v_make_daddr) | |
0f71a2f6 JM |
3089 | { |
3090 | gdbarch->d10v_make_daddr = d10v_make_daddr; | |
3091 | } | |
3092 | ||
3093 | CORE_ADDR | |
3094 | gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x) | |
3095 | { | |
3096 | if (gdbarch->d10v_make_iaddr == 0) | |
96baa820 | 3097 | internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid"); |
0f71a2f6 | 3098 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3099 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n"); |
3100 | return gdbarch->d10v_make_iaddr (x); | |
3101 | } | |
3102 | ||
3103 | void | |
104c1213 JM |
3104 | set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, |
3105 | gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr) | |
0f71a2f6 JM |
3106 | { |
3107 | gdbarch->d10v_make_iaddr = d10v_make_iaddr; | |
3108 | } | |
3109 | ||
3110 | int | |
3111 | gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x) | |
3112 | { | |
3113 | if (gdbarch->d10v_daddr_p == 0) | |
96baa820 | 3114 | internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid"); |
0f71a2f6 | 3115 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3116 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n"); |
3117 | return gdbarch->d10v_daddr_p (x); | |
3118 | } | |
3119 | ||
3120 | void | |
104c1213 JM |
3121 | set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, |
3122 | gdbarch_d10v_daddr_p_ftype d10v_daddr_p) | |
0f71a2f6 JM |
3123 | { |
3124 | gdbarch->d10v_daddr_p = d10v_daddr_p; | |
3125 | } | |
3126 | ||
3127 | int | |
3128 | gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x) | |
3129 | { | |
3130 | if (gdbarch->d10v_iaddr_p == 0) | |
96baa820 | 3131 | internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid"); |
0f71a2f6 | 3132 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3133 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n"); |
3134 | return gdbarch->d10v_iaddr_p (x); | |
3135 | } | |
3136 | ||
3137 | void | |
104c1213 JM |
3138 | set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, |
3139 | gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p) | |
0f71a2f6 JM |
3140 | { |
3141 | gdbarch->d10v_iaddr_p = d10v_iaddr_p; | |
3142 | } | |
3143 | ||
3144 | CORE_ADDR | |
3145 | gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x) | |
3146 | { | |
3147 | if (gdbarch->d10v_convert_daddr_to_raw == 0) | |
96baa820 | 3148 | internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid"); |
0f71a2f6 | 3149 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3150 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n"); |
3151 | return gdbarch->d10v_convert_daddr_to_raw (x); | |
3152 | } | |
3153 | ||
3154 | void | |
104c1213 JM |
3155 | set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, |
3156 | gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw) | |
0f71a2f6 JM |
3157 | { |
3158 | gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw; | |
3159 | } | |
3160 | ||
3161 | CORE_ADDR | |
3162 | gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x) | |
3163 | { | |
3164 | if (gdbarch->d10v_convert_iaddr_to_raw == 0) | |
96baa820 | 3165 | internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid"); |
0f71a2f6 | 3166 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3167 | fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n"); |
3168 | return gdbarch->d10v_convert_iaddr_to_raw (x); | |
3169 | } | |
3170 | ||
3171 | void | |
104c1213 JM |
3172 | set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, |
3173 | gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw) | |
0f71a2f6 JM |
3174 | { |
3175 | gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw; | |
3176 | } | |
3177 | ||
3178 | void | |
3179 | gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) | |
3180 | { | |
3181 | if (gdbarch->store_struct_return == 0) | |
96baa820 | 3182 | internal_error ("gdbarch: gdbarch_store_struct_return invalid"); |
0f71a2f6 | 3183 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3184 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n"); |
3185 | gdbarch->store_struct_return (addr, sp); | |
3186 | } | |
3187 | ||
3188 | void | |
104c1213 JM |
3189 | set_gdbarch_store_struct_return (struct gdbarch *gdbarch, |
3190 | gdbarch_store_struct_return_ftype store_struct_return) | |
0f71a2f6 JM |
3191 | { |
3192 | gdbarch->store_struct_return = store_struct_return; | |
3193 | } | |
3194 | ||
3195 | void | |
3196 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) | |
3197 | { | |
3198 | if (gdbarch->store_return_value == 0) | |
96baa820 | 3199 | internal_error ("gdbarch: gdbarch_store_return_value invalid"); |
0f71a2f6 | 3200 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3201 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
3202 | gdbarch->store_return_value (type, valbuf); | |
3203 | } | |
3204 | ||
3205 | void | |
104c1213 JM |
3206 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
3207 | gdbarch_store_return_value_ftype store_return_value) | |
0f71a2f6 JM |
3208 | { |
3209 | gdbarch->store_return_value = store_return_value; | |
3210 | } | |
3211 | ||
3212 | CORE_ADDR | |
3213 | gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) | |
3214 | { | |
3215 | if (gdbarch->extract_struct_value_address == 0) | |
96baa820 | 3216 | internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid"); |
0f71a2f6 | 3217 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3218 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); |
3219 | return gdbarch->extract_struct_value_address (regbuf); | |
3220 | } | |
3221 | ||
3222 | void | |
104c1213 JM |
3223 | set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, |
3224 | gdbarch_extract_struct_value_address_ftype extract_struct_value_address) | |
0f71a2f6 JM |
3225 | { |
3226 | gdbarch->extract_struct_value_address = extract_struct_value_address; | |
3227 | } | |
3228 | ||
3229 | int | |
3230 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) | |
3231 | { | |
3232 | if (gdbarch->use_struct_convention == 0) | |
96baa820 | 3233 | internal_error ("gdbarch: gdbarch_use_struct_convention invalid"); |
0f71a2f6 | 3234 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3235 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); |
3236 | return gdbarch->use_struct_convention (gcc_p, value_type); | |
3237 | } | |
3238 | ||
3239 | void | |
104c1213 JM |
3240 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, |
3241 | gdbarch_use_struct_convention_ftype use_struct_convention) | |
0f71a2f6 JM |
3242 | { |
3243 | gdbarch->use_struct_convention = use_struct_convention; | |
3244 | } | |
3245 | ||
3246 | void | |
3247 | gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) | |
3248 | { | |
3249 | if (gdbarch->frame_init_saved_regs == 0) | |
96baa820 | 3250 | internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid"); |
0f71a2f6 | 3251 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3252 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n"); |
3253 | gdbarch->frame_init_saved_regs (frame); | |
3254 | } | |
3255 | ||
3256 | void | |
104c1213 JM |
3257 | set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, |
3258 | gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs) | |
0f71a2f6 JM |
3259 | { |
3260 | gdbarch->frame_init_saved_regs = frame_init_saved_regs; | |
3261 | } | |
3262 | ||
3263 | void | |
3264 | gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) | |
3265 | { | |
3266 | if (gdbarch->init_extra_frame_info == 0) | |
96baa820 | 3267 | internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid"); |
0f71a2f6 | 3268 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3269 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n"); |
3270 | gdbarch->init_extra_frame_info (fromleaf, frame); | |
3271 | } | |
3272 | ||
3273 | void | |
104c1213 JM |
3274 | set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, |
3275 | gdbarch_init_extra_frame_info_ftype init_extra_frame_info) | |
0f71a2f6 JM |
3276 | { |
3277 | gdbarch->init_extra_frame_info = init_extra_frame_info; | |
3278 | } | |
3279 | ||
3280 | CORE_ADDR | |
3281 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
3282 | { | |
3283 | if (gdbarch->skip_prologue == 0) | |
96baa820 | 3284 | internal_error ("gdbarch: gdbarch_skip_prologue invalid"); |
0f71a2f6 | 3285 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3286 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
3287 | return gdbarch->skip_prologue (ip); | |
3288 | } | |
3289 | ||
3290 | void | |
104c1213 JM |
3291 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
3292 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
3293 | { |
3294 | gdbarch->skip_prologue = skip_prologue; | |
3295 | } | |
3296 | ||
dad41f9a AC |
3297 | int |
3298 | gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip) | |
3299 | { | |
dad41f9a AC |
3300 | if (gdbarch->prologue_frameless_p == 0) |
3301 | internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid"); | |
3302 | if (gdbarch_debug >= 2) | |
3303 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n"); | |
3304 | return gdbarch->prologue_frameless_p (ip); | |
3305 | } | |
3306 | ||
3307 | void | |
3308 | set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, | |
3309 | gdbarch_prologue_frameless_p_ftype prologue_frameless_p) | |
3310 | { | |
3311 | gdbarch->prologue_frameless_p = prologue_frameless_p; | |
3312 | } | |
3313 | ||
0f71a2f6 JM |
3314 | int |
3315 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
3316 | { | |
3317 | if (gdbarch->inner_than == 0) | |
96baa820 | 3318 | internal_error ("gdbarch: gdbarch_inner_than invalid"); |
0f71a2f6 | 3319 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3320 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
3321 | return gdbarch->inner_than (lhs, rhs); | |
3322 | } | |
3323 | ||
3324 | void | |
104c1213 JM |
3325 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
3326 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
3327 | { |
3328 | gdbarch->inner_than = inner_than; | |
3329 | } | |
3330 | ||
3331 | unsigned char * | |
adf40b2e | 3332 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 JM |
3333 | { |
3334 | if (gdbarch->breakpoint_from_pc == 0) | |
96baa820 | 3335 | internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid"); |
0f71a2f6 | 3336 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3337 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
3338 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); | |
3339 | } | |
3340 | ||
3341 | void | |
104c1213 JM |
3342 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
3343 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
3344 | { |
3345 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
3346 | } | |
3347 | ||
917317f4 JM |
3348 | int |
3349 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3350 | { | |
3351 | if (gdbarch->memory_insert_breakpoint == 0) | |
3352 | internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid"); | |
3353 | if (gdbarch_debug >= 2) | |
917317f4 JM |
3354 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
3355 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); | |
3356 | } | |
3357 | ||
3358 | void | |
3359 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
3360 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
3361 | { | |
3362 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
3363 | } | |
3364 | ||
3365 | int | |
3366 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3367 | { | |
3368 | if (gdbarch->memory_remove_breakpoint == 0) | |
3369 | internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid"); | |
3370 | if (gdbarch_debug >= 2) | |
917317f4 JM |
3371 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
3372 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); | |
3373 | } | |
3374 | ||
3375 | void | |
3376 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
3377 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
3378 | { | |
3379 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
3380 | } | |
3381 | ||
0f71a2f6 | 3382 | CORE_ADDR |
104c1213 | 3383 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3384 | { |
3385 | if (gdbarch->decr_pc_after_break == -1) | |
96baa820 | 3386 | internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid"); |
0f71a2f6 | 3387 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3388 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
3389 | return gdbarch->decr_pc_after_break; | |
3390 | } | |
3391 | ||
3392 | void | |
104c1213 JM |
3393 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
3394 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
3395 | { |
3396 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
3397 | } | |
3398 | ||
3399 | CORE_ADDR | |
104c1213 | 3400 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3401 | { |
3402 | if (gdbarch->function_start_offset == -1) | |
96baa820 | 3403 | internal_error ("gdbarch: gdbarch_function_start_offset invalid"); |
0f71a2f6 | 3404 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
3406 | return gdbarch->function_start_offset; | |
3407 | } | |
3408 | ||
3409 | void | |
104c1213 JM |
3410 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
3411 | CORE_ADDR function_start_offset) | |
0f71a2f6 JM |
3412 | { |
3413 | gdbarch->function_start_offset = function_start_offset; | |
3414 | } | |
3415 | ||
3416 | void | |
adf40b2e | 3417 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
0f71a2f6 JM |
3418 | { |
3419 | if (gdbarch->remote_translate_xfer_address == 0) | |
96baa820 | 3420 | internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid"); |
0f71a2f6 | 3421 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3422 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
3423 | gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len); | |
3424 | } | |
3425 | ||
3426 | void | |
104c1213 JM |
3427 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
3428 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) | |
0f71a2f6 JM |
3429 | { |
3430 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; | |
3431 | } | |
3432 | ||
3433 | CORE_ADDR | |
104c1213 | 3434 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3435 | { |
3436 | if (gdbarch->frame_args_skip == -1) | |
96baa820 | 3437 | internal_error ("gdbarch: gdbarch_frame_args_skip invalid"); |
0f71a2f6 | 3438 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3439 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
3440 | return gdbarch->frame_args_skip; | |
3441 | } | |
3442 | ||
3443 | void | |
104c1213 JM |
3444 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
3445 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
3446 | { |
3447 | gdbarch->frame_args_skip = frame_args_skip; | |
3448 | } | |
3449 | ||
3450 | int | |
3451 | gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) | |
3452 | { | |
3453 | if (gdbarch->frameless_function_invocation == 0) | |
96baa820 | 3454 | internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid"); |
0f71a2f6 | 3455 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3456 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n"); |
3457 | return gdbarch->frameless_function_invocation (fi); | |
3458 | } | |
3459 | ||
3460 | void | |
104c1213 JM |
3461 | set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, |
3462 | gdbarch_frameless_function_invocation_ftype frameless_function_invocation) | |
0f71a2f6 JM |
3463 | { |
3464 | gdbarch->frameless_function_invocation = frameless_function_invocation; | |
3465 | } | |
3466 | ||
3467 | CORE_ADDR | |
3468 | gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) | |
3469 | { | |
3470 | if (gdbarch->frame_chain == 0) | |
96baa820 | 3471 | internal_error ("gdbarch: gdbarch_frame_chain invalid"); |
0f71a2f6 | 3472 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3473 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n"); |
3474 | return gdbarch->frame_chain (frame); | |
3475 | } | |
3476 | ||
3477 | void | |
104c1213 JM |
3478 | set_gdbarch_frame_chain (struct gdbarch *gdbarch, |
3479 | gdbarch_frame_chain_ftype frame_chain) | |
0f71a2f6 JM |
3480 | { |
3481 | gdbarch->frame_chain = frame_chain; | |
3482 | } | |
3483 | ||
3484 | int | |
3485 | gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) | |
3486 | { | |
3487 | if (gdbarch->frame_chain_valid == 0) | |
96baa820 | 3488 | internal_error ("gdbarch: gdbarch_frame_chain_valid invalid"); |
0f71a2f6 | 3489 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3490 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n"); |
3491 | return gdbarch->frame_chain_valid (chain, thisframe); | |
3492 | } | |
3493 | ||
3494 | void | |
104c1213 JM |
3495 | set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, |
3496 | gdbarch_frame_chain_valid_ftype frame_chain_valid) | |
0f71a2f6 JM |
3497 | { |
3498 | gdbarch->frame_chain_valid = frame_chain_valid; | |
3499 | } | |
3500 | ||
3501 | CORE_ADDR | |
3502 | gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) | |
3503 | { | |
3504 | if (gdbarch->frame_saved_pc == 0) | |
96baa820 | 3505 | internal_error ("gdbarch: gdbarch_frame_saved_pc invalid"); |
0f71a2f6 | 3506 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3507 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n"); |
3508 | return gdbarch->frame_saved_pc (fi); | |
3509 | } | |
3510 | ||
3511 | void | |
104c1213 JM |
3512 | set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, |
3513 | gdbarch_frame_saved_pc_ftype frame_saved_pc) | |
0f71a2f6 JM |
3514 | { |
3515 | gdbarch->frame_saved_pc = frame_saved_pc; | |
3516 | } | |
3517 | ||
3518 | CORE_ADDR | |
3519 | gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
3520 | { | |
3521 | if (gdbarch->frame_args_address == 0) | |
96baa820 | 3522 | internal_error ("gdbarch: gdbarch_frame_args_address invalid"); |
0f71a2f6 | 3523 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3524 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n"); |
3525 | return gdbarch->frame_args_address (fi); | |
3526 | } | |
3527 | ||
3528 | void | |
104c1213 JM |
3529 | set_gdbarch_frame_args_address (struct gdbarch *gdbarch, |
3530 | gdbarch_frame_args_address_ftype frame_args_address) | |
0f71a2f6 JM |
3531 | { |
3532 | gdbarch->frame_args_address = frame_args_address; | |
3533 | } | |
3534 | ||
3535 | CORE_ADDR | |
3536 | gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
3537 | { | |
3538 | if (gdbarch->frame_locals_address == 0) | |
96baa820 | 3539 | internal_error ("gdbarch: gdbarch_frame_locals_address invalid"); |
0f71a2f6 | 3540 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3541 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n"); |
3542 | return gdbarch->frame_locals_address (fi); | |
3543 | } | |
3544 | ||
3545 | void | |
104c1213 JM |
3546 | set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, |
3547 | gdbarch_frame_locals_address_ftype frame_locals_address) | |
0f71a2f6 JM |
3548 | { |
3549 | gdbarch->frame_locals_address = frame_locals_address; | |
3550 | } | |
3551 | ||
3552 | CORE_ADDR | |
3553 | gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) | |
3554 | { | |
3555 | if (gdbarch->saved_pc_after_call == 0) | |
96baa820 | 3556 | internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid"); |
0f71a2f6 | 3557 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3558 | fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n"); |
3559 | return gdbarch->saved_pc_after_call (frame); | |
3560 | } | |
3561 | ||
3562 | void | |
104c1213 JM |
3563 | set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, |
3564 | gdbarch_saved_pc_after_call_ftype saved_pc_after_call) | |
0f71a2f6 JM |
3565 | { |
3566 | gdbarch->saved_pc_after_call = saved_pc_after_call; | |
3567 | } | |
3568 | ||
3569 | int | |
3570 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
3571 | { | |
3572 | if (gdbarch->frame_num_args == 0) | |
96baa820 | 3573 | internal_error ("gdbarch: gdbarch_frame_num_args invalid"); |
0f71a2f6 | 3574 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3575 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
3576 | return gdbarch->frame_num_args (frame); | |
3577 | } | |
3578 | ||
3579 | void | |
104c1213 JM |
3580 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
3581 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
3582 | { |
3583 | gdbarch->frame_num_args = frame_num_args; | |
3584 | } | |
3585 | ||
2ada493a AC |
3586 | int |
3587 | gdbarch_stack_align_p (struct gdbarch *gdbarch) | |
3588 | { | |
3589 | return gdbarch->stack_align != 0; | |
3590 | } | |
3591 | ||
3592 | CORE_ADDR | |
3593 | gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) | |
3594 | { | |
3595 | if (gdbarch->stack_align == 0) | |
3596 | internal_error ("gdbarch: gdbarch_stack_align invalid"); | |
3597 | if (gdbarch_debug >= 2) | |
3598 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n"); | |
3599 | return gdbarch->stack_align (sp); | |
3600 | } | |
3601 | ||
3602 | void | |
3603 | set_gdbarch_stack_align (struct gdbarch *gdbarch, | |
3604 | gdbarch_stack_align_ftype stack_align) | |
3605 | { | |
3606 | gdbarch->stack_align = stack_align; | |
3607 | } | |
3608 | ||
d03e67c9 AC |
3609 | int |
3610 | gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch) | |
3611 | { | |
3612 | return gdbarch->reg_struct_has_addr != 0; | |
3613 | } | |
3614 | ||
3615 | int | |
3616 | gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) | |
3617 | { | |
3618 | if (gdbarch->reg_struct_has_addr == 0) | |
3619 | internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid"); | |
3620 | if (gdbarch_debug >= 2) | |
3621 | fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n"); | |
3622 | return gdbarch->reg_struct_has_addr (gcc_p, type); | |
3623 | } | |
3624 | ||
3625 | void | |
3626 | set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, | |
3627 | gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr) | |
3628 | { | |
3629 | gdbarch->reg_struct_has_addr = reg_struct_has_addr; | |
3630 | } | |
3631 | ||
d1e3cf49 AC |
3632 | int |
3633 | gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) | |
3634 | { | |
3635 | return gdbarch->save_dummy_frame_tos != 0; | |
3636 | } | |
3637 | ||
3638 | void | |
3639 | gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) | |
3640 | { | |
3641 | if (gdbarch->save_dummy_frame_tos == 0) | |
3642 | internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid"); | |
3643 | if (gdbarch_debug >= 2) | |
3644 | fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); | |
3645 | gdbarch->save_dummy_frame_tos (sp); | |
3646 | } | |
3647 | ||
3648 | void | |
3649 | set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, | |
3650 | gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) | |
3651 | { | |
3652 | gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; | |
3653 | } | |
3654 | ||
f0d4cc9e AC |
3655 | const struct floatformat * |
3656 | gdbarch_float_format (struct gdbarch *gdbarch) | |
3657 | { | |
3658 | if (gdbarch_debug >= 2) | |
3659 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
3660 | return gdbarch->float_format; | |
3661 | } | |
3662 | ||
3663 | void | |
3664 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
3665 | const struct floatformat * float_format) | |
3666 | { | |
3667 | gdbarch->float_format = float_format; | |
3668 | } | |
3669 | ||
3670 | const struct floatformat * | |
3671 | gdbarch_double_format (struct gdbarch *gdbarch) | |
3672 | { | |
3673 | if (gdbarch_debug >= 2) | |
3674 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
3675 | return gdbarch->double_format; | |
3676 | } | |
3677 | ||
3678 | void | |
3679 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
3680 | const struct floatformat * double_format) | |
3681 | { | |
3682 | gdbarch->double_format = double_format; | |
3683 | } | |
3684 | ||
3685 | const struct floatformat * | |
3686 | gdbarch_long_double_format (struct gdbarch *gdbarch) | |
3687 | { | |
3688 | if (gdbarch_debug >= 2) | |
3689 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
3690 | return gdbarch->long_double_format; | |
3691 | } | |
3692 | ||
3693 | void | |
3694 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
3695 | const struct floatformat * long_double_format) | |
3696 | { | |
3697 | gdbarch->long_double_format = long_double_format; | |
3698 | } | |
3699 | ||
0f71a2f6 JM |
3700 | |
3701 | /* Keep a registrary of per-architecture data-pointers required by GDB | |
3702 | modules. */ | |
3703 | ||
3704 | struct gdbarch_data | |
3705 | { | |
3706 | int index; | |
3707 | }; | |
3708 | ||
3709 | struct gdbarch_data_registration | |
adf40b2e JM |
3710 | { |
3711 | gdbarch_data_ftype *init; | |
3712 | struct gdbarch_data *data; | |
3713 | struct gdbarch_data_registration *next; | |
3714 | }; | |
0f71a2f6 JM |
3715 | |
3716 | struct gdbarch_data_registrary | |
adf40b2e JM |
3717 | { |
3718 | int nr; | |
3719 | struct gdbarch_data_registration *registrations; | |
3720 | }; | |
0f71a2f6 JM |
3721 | |
3722 | struct gdbarch_data_registrary gdbarch_data_registrary = | |
3723 | { | |
3724 | 0, NULL, | |
3725 | }; | |
3726 | ||
3727 | struct gdbarch_data * | |
104c1213 | 3728 | register_gdbarch_data (gdbarch_data_ftype *init) |
0f71a2f6 JM |
3729 | { |
3730 | struct gdbarch_data_registration **curr; | |
3731 | for (curr = &gdbarch_data_registrary.registrations; | |
3732 | (*curr) != NULL; | |
3733 | curr = &(*curr)->next); | |
3734 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
3735 | (*curr)->next = NULL; | |
3736 | (*curr)->init = init; | |
3737 | (*curr)->data = XMALLOC (struct gdbarch_data); | |
3738 | (*curr)->data->index = gdbarch_data_registrary.nr++; | |
3739 | return (*curr)->data; | |
3740 | } | |
3741 | ||
3742 | ||
3743 | /* Walk through all the registered users initializing each in turn. */ | |
3744 | ||
0f71a2f6 | 3745 | static void |
104c1213 | 3746 | init_gdbarch_data (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3747 | { |
3748 | struct gdbarch_data_registration *rego; | |
3749 | gdbarch->nr_data = gdbarch_data_registrary.nr + 1; | |
adf40b2e | 3750 | gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data); |
0f71a2f6 JM |
3751 | for (rego = gdbarch_data_registrary.registrations; |
3752 | rego != NULL; | |
3753 | rego = rego->next) | |
3754 | { | |
3755 | if (rego->data->index < gdbarch->nr_data) | |
3756 | gdbarch->data[rego->data->index] = rego->init (); | |
3757 | } | |
3758 | } | |
3759 | ||
3760 | ||
3761 | /* Return the current value of the specified per-architecture | |
3762 | data-pointer. */ | |
3763 | ||
3764 | void * | |
7c7651b2 | 3765 | gdbarch_data (struct gdbarch_data *data) |
0f71a2f6 JM |
3766 | { |
3767 | if (data->index >= current_gdbarch->nr_data) | |
96baa820 | 3768 | internal_error ("gdbarch_data: request for non-existant data."); |
0f71a2f6 JM |
3769 | return current_gdbarch->data[data->index]; |
3770 | } | |
3771 | ||
3772 | ||
3773 | ||
3774 | /* Keep a registrary of swaped data required by GDB modules. */ | |
3775 | ||
3776 | struct gdbarch_swap | |
3777 | { | |
3778 | void *swap; | |
3779 | struct gdbarch_swap_registration *source; | |
3780 | struct gdbarch_swap *next; | |
3781 | }; | |
3782 | ||
3783 | struct gdbarch_swap_registration | |
adf40b2e JM |
3784 | { |
3785 | void *data; | |
3786 | unsigned long sizeof_data; | |
3787 | gdbarch_swap_ftype *init; | |
3788 | struct gdbarch_swap_registration *next; | |
3789 | }; | |
0f71a2f6 JM |
3790 | |
3791 | struct gdbarch_swap_registrary | |
adf40b2e JM |
3792 | { |
3793 | int nr; | |
3794 | struct gdbarch_swap_registration *registrations; | |
3795 | }; | |
0f71a2f6 | 3796 | |
adf40b2e | 3797 | struct gdbarch_swap_registrary gdbarch_swap_registrary = |
0f71a2f6 JM |
3798 | { |
3799 | 0, NULL, | |
3800 | }; | |
3801 | ||
3802 | void | |
104c1213 JM |
3803 | register_gdbarch_swap (void *data, |
3804 | unsigned long sizeof_data, | |
3805 | gdbarch_swap_ftype *init) | |
0f71a2f6 JM |
3806 | { |
3807 | struct gdbarch_swap_registration **rego; | |
3808 | for (rego = &gdbarch_swap_registrary.registrations; | |
3809 | (*rego) != NULL; | |
3810 | rego = &(*rego)->next); | |
3811 | (*rego) = XMALLOC (struct gdbarch_swap_registration); | |
3812 | (*rego)->next = NULL; | |
3813 | (*rego)->init = init; | |
3814 | (*rego)->data = data; | |
3815 | (*rego)->sizeof_data = sizeof_data; | |
3816 | } | |
3817 | ||
3818 | ||
0f71a2f6 | 3819 | static void |
104c1213 | 3820 | init_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3821 | { |
3822 | struct gdbarch_swap_registration *rego; | |
3823 | struct gdbarch_swap **curr = &gdbarch->swap; | |
3824 | for (rego = gdbarch_swap_registrary.registrations; | |
3825 | rego != NULL; | |
3826 | rego = rego->next) | |
3827 | { | |
3828 | if (rego->data != NULL) | |
3829 | { | |
3830 | (*curr) = XMALLOC (struct gdbarch_swap); | |
3831 | (*curr)->source = rego; | |
3832 | (*curr)->swap = xmalloc (rego->sizeof_data); | |
3833 | (*curr)->next = NULL; | |
3834 | memset (rego->data, 0, rego->sizeof_data); | |
3835 | curr = &(*curr)->next; | |
3836 | } | |
3837 | if (rego->init != NULL) | |
3838 | rego->init (); | |
3839 | } | |
3840 | } | |
3841 | ||
0f71a2f6 | 3842 | static void |
104c1213 | 3843 | swapout_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3844 | { |
3845 | struct gdbarch_swap *curr; | |
3846 | for (curr = gdbarch->swap; | |
3847 | curr != NULL; | |
3848 | curr = curr->next) | |
3849 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); | |
3850 | } | |
3851 | ||
0f71a2f6 | 3852 | static void |
104c1213 | 3853 | swapin_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3854 | { |
3855 | struct gdbarch_swap *curr; | |
3856 | for (curr = gdbarch->swap; | |
3857 | curr != NULL; | |
3858 | curr = curr->next) | |
3859 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); | |
3860 | } | |
3861 | ||
3862 | ||
3863 | /* Keep a registrary of the architectures known by GDB. */ | |
3864 | ||
4b9b3959 | 3865 | struct gdbarch_registration |
0f71a2f6 JM |
3866 | { |
3867 | enum bfd_architecture bfd_architecture; | |
3868 | gdbarch_init_ftype *init; | |
4b9b3959 | 3869 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 3870 | struct gdbarch_list *arches; |
4b9b3959 | 3871 | struct gdbarch_registration *next; |
0f71a2f6 JM |
3872 | }; |
3873 | ||
4b9b3959 | 3874 | static struct gdbarch_registration *gdbarch_registrary = NULL; |
0f71a2f6 | 3875 | |
b4a20239 AC |
3876 | static void |
3877 | append_name (const char ***buf, int *nr, const char *name) | |
3878 | { | |
3879 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
3880 | (*buf)[*nr] = name; | |
3881 | *nr += 1; | |
3882 | } | |
3883 | ||
3884 | const char ** | |
3885 | gdbarch_printable_names (void) | |
3886 | { | |
3887 | if (GDB_MULTI_ARCH) | |
3888 | { | |
3889 | /* Accumulate a list of names based on the registed list of | |
3890 | architectures. */ | |
3891 | enum bfd_architecture a; | |
3892 | int nr_arches = 0; | |
3893 | const char **arches = NULL; | |
4b9b3959 AC |
3894 | struct gdbarch_registration *rego; |
3895 | for (rego = gdbarch_registrary; | |
b4a20239 AC |
3896 | rego != NULL; |
3897 | rego = rego->next) | |
3898 | { | |
3899 | const struct bfd_arch_info *ap; | |
3900 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
3901 | if (ap == NULL) | |
3902 | internal_error ("gdbarch_architecture_names: multi-arch unknown"); | |
3903 | do | |
3904 | { | |
3905 | append_name (&arches, &nr_arches, ap->printable_name); | |
3906 | ap = ap->next; | |
3907 | } | |
3908 | while (ap != NULL); | |
3909 | } | |
3910 | append_name (&arches, &nr_arches, NULL); | |
3911 | return arches; | |
3912 | } | |
3913 | else | |
3914 | /* Just return all the architectures that BFD knows. Assume that | |
3915 | the legacy architecture framework supports them. */ | |
3916 | return bfd_arch_list (); | |
3917 | } | |
3918 | ||
3919 | ||
0f71a2f6 | 3920 | void |
4b9b3959 AC |
3921 | gdbarch_register (enum bfd_architecture bfd_architecture, |
3922 | gdbarch_init_ftype *init, | |
3923 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 3924 | { |
4b9b3959 | 3925 | struct gdbarch_registration **curr; |
0f71a2f6 JM |
3926 | const struct bfd_arch_info *bfd_arch_info; |
3927 | /* Check that BFD reconizes this architecture */ | |
3928 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); | |
3929 | if (bfd_arch_info == NULL) | |
3930 | { | |
96baa820 | 3931 | internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture); |
0f71a2f6 JM |
3932 | } |
3933 | /* Check that we haven't seen this architecture before */ | |
4b9b3959 | 3934 | for (curr = &gdbarch_registrary; |
0f71a2f6 JM |
3935 | (*curr) != NULL; |
3936 | curr = &(*curr)->next) | |
3937 | { | |
3938 | if (bfd_architecture == (*curr)->bfd_architecture) | |
96baa820 | 3939 | internal_error ("gdbarch: Duplicate registraration of architecture (%s)", |
0f71a2f6 JM |
3940 | bfd_arch_info->printable_name); |
3941 | } | |
3942 | /* log it */ | |
3943 | if (gdbarch_debug) | |
3944 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", | |
3945 | bfd_arch_info->printable_name, | |
3946 | (long) init); | |
3947 | /* Append it */ | |
4b9b3959 | 3948 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
3949 | (*curr)->bfd_architecture = bfd_architecture; |
3950 | (*curr)->init = init; | |
4b9b3959 | 3951 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
3952 | (*curr)->arches = NULL; |
3953 | (*curr)->next = NULL; | |
4b9b3959 AC |
3954 | /* When non- multi-arch, install what ever target dump routine we've |
3955 | been provided - hopefully that routine has been writen correct | |
3956 | and works regardless of multi-arch. */ | |
3957 | if (!GDB_MULTI_ARCH && dump_tdep != NULL | |
3958 | && startup_gdbarch.dump_tdep == NULL) | |
3959 | startup_gdbarch.dump_tdep = dump_tdep; | |
3960 | } | |
3961 | ||
3962 | void | |
3963 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
3964 | gdbarch_init_ftype *init) | |
3965 | { | |
3966 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 3967 | } |
0f71a2f6 JM |
3968 | |
3969 | ||
3970 | /* Look for an architecture using gdbarch_info. Base search on only | |
3971 | BFD_ARCH_INFO and BYTE_ORDER. */ | |
3972 | ||
3973 | struct gdbarch_list * | |
104c1213 JM |
3974 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
3975 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
3976 | { |
3977 | for (; arches != NULL; arches = arches->next) | |
3978 | { | |
3979 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
3980 | continue; | |
3981 | if (info->byte_order != arches->gdbarch->byte_order) | |
3982 | continue; | |
3983 | return arches; | |
3984 | } | |
3985 | return NULL; | |
3986 | } | |
3987 | ||
3988 | ||
3989 | /* Update the current architecture. Return ZERO if the update request | |
3990 | failed. */ | |
3991 | ||
3992 | int | |
104c1213 | 3993 | gdbarch_update (struct gdbarch_info info) |
0f71a2f6 JM |
3994 | { |
3995 | struct gdbarch *new_gdbarch; | |
3996 | struct gdbarch_list **list; | |
4b9b3959 | 3997 | struct gdbarch_registration *rego; |
0f71a2f6 JM |
3998 | |
3999 | /* Fill in any missing bits. Most important is the bfd_architecture | |
4000 | which is used to select the target architecture. */ | |
4001 | if (info.bfd_architecture == bfd_arch_unknown) | |
4002 | { | |
4003 | if (info.bfd_arch_info != NULL) | |
4004 | info.bfd_architecture = info.bfd_arch_info->arch; | |
4005 | else if (info.abfd != NULL) | |
4006 | info.bfd_architecture = bfd_get_arch (info.abfd); | |
4007 | /* FIXME - should query BFD for its default architecture. */ | |
4008 | else | |
4009 | info.bfd_architecture = current_gdbarch->bfd_arch_info->arch; | |
4010 | } | |
4011 | if (info.bfd_arch_info == NULL) | |
4012 | { | |
4013 | if (target_architecture_auto && info.abfd != NULL) | |
4014 | info.bfd_arch_info = bfd_get_arch_info (info.abfd); | |
4015 | else | |
4016 | info.bfd_arch_info = current_gdbarch->bfd_arch_info; | |
4017 | } | |
4018 | if (info.byte_order == 0) | |
4019 | { | |
4020 | if (target_byte_order_auto && info.abfd != NULL) | |
4021 | info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN | |
4022 | : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN | |
4023 | : 0); | |
4024 | else | |
4025 | info.byte_order = current_gdbarch->byte_order; | |
4026 | /* FIXME - should query BFD for its default byte-order. */ | |
4027 | } | |
4028 | /* A default for abfd? */ | |
4029 | ||
4030 | /* Find the target that knows about this architecture. */ | |
4b9b3959 AC |
4031 | for (rego = gdbarch_registrary; |
4032 | rego != NULL; | |
4033 | rego = rego->next) | |
4034 | if (rego->bfd_architecture == info.bfd_architecture) | |
4035 | break; | |
0f71a2f6 JM |
4036 | if (rego == NULL) |
4037 | { | |
4038 | if (gdbarch_debug) | |
4039 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n"); | |
4040 | return 0; | |
4041 | } | |
4042 | ||
4043 | if (gdbarch_debug) | |
4044 | { | |
4045 | fprintf_unfiltered (gdb_stdlog, | |
4046 | "gdbarch_update: info.bfd_architecture %d (%s)\n", | |
4047 | info.bfd_architecture, | |
adf40b2e | 4048 | bfd_lookup_arch (info.bfd_architecture, 0)->printable_name); |
0f71a2f6 JM |
4049 | fprintf_unfiltered (gdb_stdlog, |
4050 | "gdbarch_update: info.bfd_arch_info %s\n", | |
4051 | (info.bfd_arch_info != NULL | |
4052 | ? info.bfd_arch_info->printable_name | |
4053 | : "(null)")); | |
4054 | fprintf_unfiltered (gdb_stdlog, | |
4055 | "gdbarch_update: info.byte_order %d (%s)\n", | |
4056 | info.byte_order, | |
4057 | (info.byte_order == BIG_ENDIAN ? "big" | |
4058 | : info.byte_order == LITTLE_ENDIAN ? "little" | |
4059 | : "default")); | |
4060 | fprintf_unfiltered (gdb_stdlog, | |
4061 | "gdbarch_update: info.abfd 0x%lx\n", | |
4062 | (long) info.abfd); | |
4063 | fprintf_unfiltered (gdb_stdlog, | |
4064 | "gdbarch_update: info.tdep_info 0x%lx\n", | |
4065 | (long) info.tdep_info); | |
4066 | } | |
4067 | ||
4068 | /* Ask the target for a replacement architecture. */ | |
4069 | new_gdbarch = rego->init (info, rego->arches); | |
4070 | ||
4071 | /* Did the target like it? No. Reject the change. */ | |
4072 | if (new_gdbarch == NULL) | |
4073 | { | |
4074 | if (gdbarch_debug) | |
4075 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n"); | |
4076 | return 0; | |
4077 | } | |
4078 | ||
4079 | /* Did the architecture change? No. Do nothing. */ | |
4080 | if (current_gdbarch == new_gdbarch) | |
4081 | { | |
4082 | if (gdbarch_debug) | |
4083 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n", | |
4084 | (long) new_gdbarch, | |
4085 | new_gdbarch->bfd_arch_info->printable_name); | |
4086 | return 1; | |
4087 | } | |
4088 | ||
4089 | /* Swap all data belonging to the old target out */ | |
4090 | swapout_gdbarch_swap (current_gdbarch); | |
4091 | ||
4092 | /* Is this a pre-existing architecture? Yes. Swap it in. */ | |
4093 | for (list = ®o->arches; | |
4094 | (*list) != NULL; | |
4095 | list = &(*list)->next) | |
4096 | { | |
4097 | if ((*list)->gdbarch == new_gdbarch) | |
4098 | { | |
4099 | if (gdbarch_debug) | |
4b9b3959 AC |
4100 | fprintf_unfiltered (gdb_stdlog, |
4101 | "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n", | |
0f71a2f6 JM |
4102 | (long) new_gdbarch, |
4103 | new_gdbarch->bfd_arch_info->printable_name); | |
4104 | current_gdbarch = new_gdbarch; | |
4105 | swapin_gdbarch_swap (new_gdbarch); | |
4106 | return 1; | |
4107 | } | |
4108 | } | |
4b9b3959 | 4109 | |
0f71a2f6 JM |
4110 | /* Append this new architecture to this targets list. */ |
4111 | (*list) = XMALLOC (struct gdbarch_list); | |
4112 | (*list)->next = NULL; | |
4113 | (*list)->gdbarch = new_gdbarch; | |
4114 | ||
4115 | /* Switch to this new architecture. Dump it out. */ | |
4116 | current_gdbarch = new_gdbarch; | |
4117 | if (gdbarch_debug) | |
4118 | { | |
4119 | fprintf_unfiltered (gdb_stdlog, | |
adf40b2e | 4120 | "gdbarch_update: New architecture 0x%08lx (%s) selected\n", |
0f71a2f6 JM |
4121 | (long) new_gdbarch, |
4122 | new_gdbarch->bfd_arch_info->printable_name); | |
0f71a2f6 | 4123 | } |
adf40b2e | 4124 | |
4b9b3959 AC |
4125 | /* Check that the newly installed architecture is valid. Plug in |
4126 | any post init values. */ | |
4127 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 JM |
4128 | verify_gdbarch (new_gdbarch); |
4129 | ||
4130 | /* Initialize the per-architecture memory (swap) areas. | |
4131 | CURRENT_GDBARCH must be update before these modules are | |
4132 | called. */ | |
4133 | init_gdbarch_swap (new_gdbarch); | |
adf40b2e | 4134 | |
0f71a2f6 JM |
4135 | /* Initialize the per-architecture data-pointer of all parties that |
4136 | registered an interest in this architecture. CURRENT_GDBARCH | |
4137 | must be updated before these modules are called. */ | |
4138 | init_gdbarch_data (new_gdbarch); | |
adf40b2e | 4139 | |
4b9b3959 AC |
4140 | if (gdbarch_debug) |
4141 | gdbarch_dump (current_gdbarch, gdb_stdlog); | |
4142 | ||
0f71a2f6 JM |
4143 | return 1; |
4144 | } | |
c906108c | 4145 | |
c906108c | 4146 | |
c906108c SS |
4147 | /* Disassembler */ |
4148 | ||
4149 | /* Pointer to the target-dependent disassembly function. */ | |
104c1213 | 4150 | int (*tm_print_insn) (bfd_vma, disassemble_info *); |
c906108c SS |
4151 | disassemble_info tm_print_insn_info; |
4152 | ||
4153 | ||
104c1213 | 4154 | extern void _initialize_gdbarch (void); |
b4a20239 | 4155 | |
c906108c | 4156 | void |
7c7651b2 | 4157 | _initialize_gdbarch (void) |
c906108c | 4158 | { |
5d161b24 DB |
4159 | struct cmd_list_element *c; |
4160 | ||
adf40b2e | 4161 | INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered); |
c906108c SS |
4162 | tm_print_insn_info.flavour = bfd_target_unknown_flavour; |
4163 | tm_print_insn_info.read_memory_func = dis_asm_read_memory; | |
4164 | tm_print_insn_info.memory_error_func = dis_asm_memory_error; | |
4165 | tm_print_insn_info.print_address_func = dis_asm_print_address; | |
4166 | ||
5d161b24 | 4167 | add_show_from_set (add_set_cmd ("arch", |
c906108c SS |
4168 | class_maintenance, |
4169 | var_zinteger, | |
adf40b2e | 4170 | (char *)&gdbarch_debug, |
c906108c | 4171 | "Set architecture debugging.\n\ |
5d161b24 DB |
4172 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
4173 | &showdebuglist); | |
59233f88 AC |
4174 | c = add_set_cmd ("archdebug", |
4175 | class_maintenance, | |
4176 | var_zinteger, | |
4177 | (char *)&gdbarch_debug, | |
4178 | "Set architecture debugging.\n\ | |
5d161b24 DB |
4179 | When non-zero, architecture debugging is enabled.", &setlist); |
4180 | ||
59233f88 AC |
4181 | deprecate_cmd (c, "set debug arch"); |
4182 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); | |
c906108c | 4183 | } |