]> Git Repo - binutils.git/blob - gdb/gdbarch-components.py
Automatic date update in version.in
[binutils.git] / gdb / gdbarch-components.py
1 # Dynamic architecture support for GDB, the GNU debugger.
2
3 # Copyright (C) 1998-2022 Free Software Foundation, Inc.
4
5 # This file is part of GDB.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 # How to add to gdbarch:
21 #
22 # There are four kinds of fields in gdbarch:
23 #
24 # * Info - you should never need this; it is only for things that are
25 # copied directly from the gdbarch_info.
26 #
27 # * Value - a variable.
28 #
29 # * Function - a function pointer.
30 #
31 # * Method - a function pointer, but the function takes a gdbarch as
32 # its first parameter.
33 #
34 # You construct a new one with a call to one of those functions.  So,
35 # for instance, you can use the function named "Value" to make a new
36 # Value.
37 #
38 # All parameters are keyword-only.  This is done to help catch typos.
39 #
40 # Some parameters are shared among all types (including Info):
41 #
42 # * "name" - required, the name of the field.
43 #
44 # * "type" - required, the type of the field.  For functions and
45 # methods, this is the return type.
46 #
47 # * "printer" - an expression to turn this field into a 'const char
48 # *'.  This is used for dumping.  The string must live long enough to
49 # be passed to printf.
50 #
51 # Value, Function, and Method share some more parameters.  Some of
52 # these work in conjunction in a somewhat complicated way, so they are
53 # described in a separate sub-section below.
54 #
55 # * "comment" - a comment that's written to the .h file.  Please
56 # always use this.  (It isn't currently a required option for
57 # historical reasons.)
58 #
59 # * "predicate" - a boolean, if True then a _p predicate function will
60 # be generated.  The predicate will use the generic validation
61 # function for the field.  See below.
62 #
63 # * "predefault", "postdefault", and "invalid" - These are used for
64 # the initialization and verification steps:
65 #
66 # A gdbarch is zero-initialized.  Then, if a field has a pre-default,
67 # the field is set to that value.  After initialization is complete
68 # (that is, after the tdep code has a chance to change the settings),
69 # the post-initialization step is done.
70 #
71 # There is a generic algorithm to generate a "validation function" for
72 # all fields.  If the field has an "invalid" attribute with a string
73 # value, then this string is the expression (note that a string-valued
74 # "invalid" and "predicate" are mutually exclusive; and the case where
75 # invalid is True means to ignore this field and instead use the
76 # default checking that is about to be described).  Otherwise, if
77 # there is a "predefault", then the field is valid if it differs from
78 # the predefault.  Otherwise, the check is done against 0 (really NULL
79 # for function pointers, but same idea).
80 #
81 # In post-initialization / validation, there are several cases.
82 #
83 # * If "invalid" is False, or if the field specifies "predicate",
84 # validation is skipped.  Otherwise, a validation step is emitted.
85 #
86 # * Otherwise, the validity is checked using the usual validation
87 # function (see above).  If the field is considered valid, nothing is
88 # done.
89 #
90 # * Otherwise, the field's value is invalid.  If there is a
91 # "postdefault", then the field is assigned that value.
92 #
93 # * Otherwise, the gdbarch will fail validation and gdb will crash.
94 #
95 # Function and Method share:
96 #
97 # * "params" - required, a tuple of tuples.  Each inner tuple is a
98 # pair of the form (TYPE, NAME), where TYPE is the type of this
99 # argument, and NAME is the name.  Note that while the names could be
100 # auto-generated, this approach lets the "comment" field refer to
101 # arguments in a nicer way.  It is also just nicer for users.
102 #
103 # * "param_checks" - optional, a list of strings.  Each string is an
104 # expression that is placed within a gdb_assert before the call is
105 # made to the Function/Method implementation.  Each expression is
106 # something that should be true, and it is expected that the
107 # expression will make use of the parameters named in 'params' (though
108 # this is not required).
109 #
110 # * "result_checks" - optional, a list of strings.  Each string is an
111 # expression that is placed within a gdb_assert after the call to the
112 # Function/Method implementation.  Within each expression the variable
113 # 'result' can be used to reference the result of the function/method
114 # implementation.  The 'result_checks' can only be used if the 'type'
115 # of this Function/Method is not 'void'.
116
117 Info(
118     type="const struct bfd_arch_info *",
119     name="bfd_arch_info",
120     printer="gdbarch_bfd_arch_info (gdbarch)->printable_name",
121 )
122
123 Info(
124     type="enum bfd_endian",
125     name="byte_order",
126 )
127
128 Info(
129     type="enum bfd_endian",
130     name="byte_order_for_code",
131 )
132
133 Info(
134     type="enum gdb_osabi",
135     name="osabi",
136 )
137
138 Info(
139     type="const struct target_desc *",
140     name="target_desc",
141     printer="host_address_to_string (gdbarch->target_desc)",
142 )
143
144 Value(
145     comment="""
146 Number of bits in a short or unsigned short for the target machine.
147 """,
148     type="int",
149     name="short_bit",
150     predefault="2*TARGET_CHAR_BIT",
151     invalid=False,
152 )
153
154 int_bit = Value(
155     comment="""
156 Number of bits in an int or unsigned int for the target machine.
157 """,
158     type="int",
159     name="int_bit",
160     predefault="4*TARGET_CHAR_BIT",
161     invalid=False,
162 )
163
164 long_bit = Value(
165     comment="""
166 Number of bits in a long or unsigned long for the target machine.
167 """,
168     type="int",
169     name="long_bit",
170     predefault="4*TARGET_CHAR_BIT",
171     invalid=False,
172 )
173
174 Value(
175     comment="""
176 Number of bits in a long long or unsigned long long for the target
177 machine.
178 """,
179     type="int",
180     name="long_long_bit",
181     predefault="2*" + long_bit.predefault,
182     invalid=False,
183 )
184
185 Value(
186     comment="""
187 The ABI default bit-size and format for "bfloat16", "half", "float", "double", and
188 "long double".  These bit/format pairs should eventually be combined
189 into a single object.  For the moment, just initialize them as a pair.
190 Each format describes both the big and little endian layouts (if
191 useful).
192 """,
193     type="int",
194     name="bfloat16_bit",
195     predefault="2*TARGET_CHAR_BIT",
196     invalid=False,
197 )
198
199 Value(
200     type="const struct floatformat **",
201     name="bfloat16_format",
202     postdefault="floatformats_bfloat16",
203     invalid=True,
204     printer="pformat (gdbarch, gdbarch->bfloat16_format)",
205 )
206
207 Value(
208     type="int",
209     name="half_bit",
210     predefault="2*TARGET_CHAR_BIT",
211     invalid=False,
212 )
213
214 Value(
215     type="const struct floatformat **",
216     name="half_format",
217     postdefault="floatformats_ieee_half",
218     invalid=True,
219     printer="pformat (gdbarch, gdbarch->half_format)",
220 )
221
222 Value(
223     type="int",
224     name="float_bit",
225     predefault="4*TARGET_CHAR_BIT",
226     invalid=False,
227 )
228
229 Value(
230     type="const struct floatformat **",
231     name="float_format",
232     postdefault="floatformats_ieee_single",
233     invalid=True,
234     printer="pformat (gdbarch, gdbarch->float_format)",
235 )
236
237 Value(
238     type="int",
239     name="double_bit",
240     predefault="8*TARGET_CHAR_BIT",
241     invalid=False,
242 )
243
244 Value(
245     type="const struct floatformat **",
246     name="double_format",
247     postdefault="floatformats_ieee_double",
248     invalid=True,
249     printer="pformat (gdbarch, gdbarch->double_format)",
250 )
251
252 Value(
253     type="int",
254     name="long_double_bit",
255     predefault="8*TARGET_CHAR_BIT",
256     invalid=False,
257 )
258
259 Value(
260     type="const struct floatformat **",
261     name="long_double_format",
262     postdefault="floatformats_ieee_double",
263     invalid=True,
264     printer="pformat (gdbarch, gdbarch->long_double_format)",
265 )
266
267 Value(
268     comment="""
269 The ABI default bit-size for "wchar_t".  wchar_t is a built-in type
270 starting with C++11.
271 """,
272     type="int",
273     name="wchar_bit",
274     predefault="4*TARGET_CHAR_BIT",
275     invalid=False,
276 )
277
278 Value(
279     comment="""
280 One if `wchar_t' is signed, zero if unsigned.
281 """,
282     type="int",
283     name="wchar_signed",
284     predefault="-1",
285     postdefault="1",
286     invalid=True,
287 )
288
289 Method(
290     comment="""
291 Returns the floating-point format to be used for values of length LENGTH.
292 NAME, if non-NULL, is the type name, which may be used to distinguish
293 different target formats of the same length.
294 """,
295     type="const struct floatformat **",
296     name="floatformat_for_type",
297     params=[("const char *", "name"), ("int", "length")],
298     predefault="default_floatformat_for_type",
299     invalid=False,
300 )
301
302 Value(
303     comment="""
304 For most targets, a pointer on the target and its representation as an
305 address in GDB have the same size and "look the same".  For such a
306 target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
307 / addr_bit will be set from it.
308
309 If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably
310 also need to set gdbarch_dwarf2_addr_size, gdbarch_pointer_to_address and
311 gdbarch_address_to_pointer as well.
312
313 ptr_bit is the size of a pointer on the target
314 """,
315     type="int",
316     name="ptr_bit",
317     predefault=int_bit.predefault,
318     invalid=False,
319 )
320
321 Value(
322     comment="""
323 addr_bit is the size of a target address as represented in gdb
324 """,
325     type="int",
326     name="addr_bit",
327     predefault="0",
328     postdefault="gdbarch_ptr_bit (gdbarch)",
329     invalid=True,
330 )
331
332 Value(
333     comment="""
334 dwarf2_addr_size is the target address size as used in the Dwarf debug
335 info.  For .debug_frame FDEs, this is supposed to be the target address
336 size from the associated CU header, and which is equivalent to the
337 DWARF2_ADDR_SIZE as defined by the target specific GCC back-end.
338 Unfortunately there is no good way to determine this value.  Therefore
339 dwarf2_addr_size simply defaults to the target pointer size.
340
341 dwarf2_addr_size is not used for .eh_frame FDEs, which are generally
342 defined using the target's pointer size so far.
343
344 Note that dwarf2_addr_size only needs to be redefined by a target if the
345 GCC back-end defines a DWARF2_ADDR_SIZE other than the target pointer size,
346 and if Dwarf versions < 4 need to be supported.
347 """,
348     type="int",
349     name="dwarf2_addr_size",
350     predefault="0",
351     postdefault="gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT",
352     invalid=True,
353 )
354
355 Value(
356     comment="""
357 One if `char' acts like `signed char', zero if `unsigned char'.
358 """,
359     type="int",
360     name="char_signed",
361     predefault="-1",
362     postdefault="1",
363     invalid=True,
364 )
365
366 Function(
367     type="CORE_ADDR",
368     name="read_pc",
369     params=[("readable_regcache *", "regcache")],
370     predicate=True,
371     invalid=True,
372 )
373
374 Function(
375     type="void",
376     name="write_pc",
377     params=[("struct regcache *", "regcache"), ("CORE_ADDR", "val")],
378     predicate=True,
379     invalid=True,
380 )
381
382 Method(
383     comment="""
384 Function for getting target's idea of a frame pointer.  FIXME: GDB's
385 whole scheme for dealing with "frames" and "frame pointers" needs a
386 serious shakedown.
387 """,
388     type="void",
389     name="virtual_frame_pointer",
390     params=[
391         ("CORE_ADDR", "pc"),
392         ("int *", "frame_regnum"),
393         ("LONGEST *", "frame_offset"),
394     ],
395     predefault="legacy_virtual_frame_pointer",
396     invalid=False,
397 )
398
399 Method(
400     type="enum register_status",
401     name="pseudo_register_read",
402     params=[
403         ("readable_regcache *", "regcache"),
404         ("int", "cookednum"),
405         ("gdb_byte *", "buf"),
406     ],
407     predicate=True,
408     invalid=True,
409 )
410
411 Method(
412     comment="""
413 Read a register into a new struct value.  If the register is wholly
414 or partly unavailable, this should call mark_value_bytes_unavailable
415 as appropriate.  If this is defined, then pseudo_register_read will
416 never be called.
417 """,
418     type="struct value *",
419     name="pseudo_register_read_value",
420     params=[("readable_regcache *", "regcache"), ("int", "cookednum")],
421     predicate=True,
422     invalid=True,
423 )
424
425 Method(
426     type="void",
427     name="pseudo_register_write",
428     params=[
429         ("struct regcache *", "regcache"),
430         ("int", "cookednum"),
431         ("const gdb_byte *", "buf"),
432     ],
433     predicate=True,
434     invalid=True,
435 )
436
437 Value(
438     type="int",
439     name="num_regs",
440     predefault="-1",
441     invalid=True,
442 )
443
444 Value(
445     comment="""
446 This macro gives the number of pseudo-registers that live in the
447 register namespace but do not get fetched or stored on the target.
448 These pseudo-registers may be aliases for other registers,
449 combinations of other registers, or they may be computed by GDB.
450 """,
451     type="int",
452     name="num_pseudo_regs",
453     predefault="0",
454     invalid=False,
455 )
456
457 Method(
458     comment="""
459 Assemble agent expression bytecode to collect pseudo-register REG.
460 Return -1 if something goes wrong, 0 otherwise.
461 """,
462     type="int",
463     name="ax_pseudo_register_collect",
464     params=[("struct agent_expr *", "ax"), ("int", "reg")],
465     predicate=True,
466     invalid=True,
467 )
468
469 Method(
470     comment="""
471 Assemble agent expression bytecode to push the value of pseudo-register
472 REG on the interpreter stack.
473 Return -1 if something goes wrong, 0 otherwise.
474 """,
475     type="int",
476     name="ax_pseudo_register_push_stack",
477     params=[("struct agent_expr *", "ax"), ("int", "reg")],
478     predicate=True,
479     invalid=True,
480 )
481
482 Method(
483     comment="""
484 Some architectures can display additional information for specific
485 signals.
486 UIOUT is the output stream where the handler will place information.
487 """,
488     type="void",
489     name="report_signal_info",
490     params=[("struct ui_out *", "uiout"), ("enum gdb_signal", "siggnal")],
491     predicate=True,
492     invalid=True,
493 )
494
495 Value(
496     comment="""
497 GDB's standard (or well known) register numbers.  These can map onto
498 a real register or a pseudo (computed) register or not be defined at
499 all (-1).
500 gdbarch_sp_regnum will hopefully be replaced by UNWIND_SP.
501 """,
502     type="int",
503     name="sp_regnum",
504     predefault="-1",
505     invalid=False,
506 )
507
508 Value(
509     type="int",
510     name="pc_regnum",
511     predefault="-1",
512     invalid=False,
513 )
514
515 Value(
516     type="int",
517     name="ps_regnum",
518     predefault="-1",
519     invalid=False,
520 )
521
522 Value(
523     type="int",
524     name="fp0_regnum",
525     predefault="-1",
526     invalid=False,
527 )
528
529 Method(
530     comment="""
531 Convert stab register number (from `r' declaration) to a gdb REGNUM.
532 """,
533     type="int",
534     name="stab_reg_to_regnum",
535     params=[("int", "stab_regnr")],
536     predefault="no_op_reg_to_regnum",
537     invalid=False,
538 )
539
540 Method(
541     comment="""
542 Provide a default mapping from a ecoff register number to a gdb REGNUM.
543 """,
544     type="int",
545     name="ecoff_reg_to_regnum",
546     params=[("int", "ecoff_regnr")],
547     predefault="no_op_reg_to_regnum",
548     invalid=False,
549 )
550
551 Method(
552     comment="""
553 Convert from an sdb register number to an internal gdb register number.
554 """,
555     type="int",
556     name="sdb_reg_to_regnum",
557     params=[("int", "sdb_regnr")],
558     predefault="no_op_reg_to_regnum",
559     invalid=False,
560 )
561
562 Method(
563     comment="""
564 Provide a default mapping from a DWARF2 register number to a gdb REGNUM.
565 Return -1 for bad REGNUM.  Note: Several targets get this wrong.
566 """,
567     type="int",
568     name="dwarf2_reg_to_regnum",
569     params=[("int", "dwarf2_regnr")],
570     predefault="no_op_reg_to_regnum",
571     invalid=False,
572 )
573
574 Method(
575     comment="""
576 Return the name of register REGNR for the specified architecture.
577 REGNR can be any value greater than, or equal to zero, and less than
578 'gdbarch_num_cooked_regs (GDBARCH)'.  If REGNR is not supported for
579 GDBARCH, then this function will return an empty string, this function
580 should never return nullptr.
581 """,
582     type="const char *",
583     name="register_name",
584     params=[("int", "regnr")],
585     param_checks=["regnr >= 0", "regnr < gdbarch_num_cooked_regs (gdbarch)"],
586     result_checks=["result != nullptr"],
587     predefault="0",
588     invalid=True,
589 )
590
591 Method(
592     comment="""
593 Return the type of a register specified by the architecture.  Only
594 the register cache should call this function directly; others should
595 use "register_type".
596 """,
597     type="struct type *",
598     name="register_type",
599     params=[("int", "reg_nr")],
600     invalid=True,
601 )
602
603 Method(
604     comment="""
605 Generate a dummy frame_id for THIS_FRAME assuming that the frame is
606 a dummy frame.  A dummy frame is created before an inferior call,
607 the frame_id returned here must match the frame_id that was built
608 for the inferior call.  Usually this means the returned frame_id's
609 stack address should match the address returned by
610 gdbarch_push_dummy_call, and the returned frame_id's code address
611 should match the address at which the breakpoint was set in the dummy
612 frame.
613 """,
614     type="struct frame_id",
615     name="dummy_id",
616     params=[("frame_info_ptr", "this_frame")],
617     predefault="default_dummy_id",
618     invalid=False,
619 )
620
621 Value(
622     comment="""
623 Implement DUMMY_ID and PUSH_DUMMY_CALL, then delete
624 deprecated_fp_regnum.
625 """,
626     type="int",
627     name="deprecated_fp_regnum",
628     predefault="-1",
629     invalid=False,
630 )
631
632 Method(
633     type="CORE_ADDR",
634     name="push_dummy_call",
635     params=[
636         ("struct value *", "function"),
637         ("struct regcache *", "regcache"),
638         ("CORE_ADDR", "bp_addr"),
639         ("int", "nargs"),
640         ("struct value **", "args"),
641         ("CORE_ADDR", "sp"),
642         ("function_call_return_method", "return_method"),
643         ("CORE_ADDR", "struct_addr"),
644     ],
645     predicate=True,
646     invalid=True,
647 )
648
649 Value(
650     type="enum call_dummy_location_type",
651     name="call_dummy_location",
652     predefault="AT_ENTRY_POINT",
653     invalid=False,
654 )
655
656 Method(
657     type="CORE_ADDR",
658     name="push_dummy_code",
659     params=[
660         ("CORE_ADDR", "sp"),
661         ("CORE_ADDR", "funaddr"),
662         ("struct value **", "args"),
663         ("int", "nargs"),
664         ("struct type *", "value_type"),
665         ("CORE_ADDR *", "real_pc"),
666         ("CORE_ADDR *", "bp_addr"),
667         ("struct regcache *", "regcache"),
668     ],
669     predicate=True,
670     invalid=True,
671 )
672
673 Method(
674     comment="""
675 Return true if the code of FRAME is writable.
676 """,
677     type="int",
678     name="code_of_frame_writable",
679     params=[("frame_info_ptr", "frame")],
680     predefault="default_code_of_frame_writable",
681     invalid=False,
682 )
683
684 Method(
685     type="void",
686     name="print_registers_info",
687     params=[
688         ("struct ui_file *", "file"),
689         ("frame_info_ptr", "frame"),
690         ("int", "regnum"),
691         ("int", "all"),
692     ],
693     predefault="default_print_registers_info",
694     invalid=False,
695 )
696
697 Method(
698     type="void",
699     name="print_float_info",
700     params=[
701         ("struct ui_file *", "file"),
702         ("frame_info_ptr", "frame"),
703         ("const char *", "args"),
704     ],
705     predefault="default_print_float_info",
706     invalid=False,
707 )
708
709 Method(
710     type="void",
711     name="print_vector_info",
712     params=[
713         ("struct ui_file *", "file"),
714         ("frame_info_ptr", "frame"),
715         ("const char *", "args"),
716     ],
717     predicate=True,
718     invalid=True,
719 )
720
721 Method(
722     comment="""
723 MAP a GDB RAW register number onto a simulator register number.  See
724 also include/...-sim.h.
725 """,
726     type="int",
727     name="register_sim_regno",
728     params=[("int", "reg_nr")],
729     predefault="legacy_register_sim_regno",
730     invalid=False,
731 )
732
733 Method(
734     type="int",
735     name="cannot_fetch_register",
736     params=[("int", "regnum")],
737     predefault="cannot_register_not",
738     invalid=False,
739 )
740
741 Method(
742     type="int",
743     name="cannot_store_register",
744     params=[("int", "regnum")],
745     predefault="cannot_register_not",
746     invalid=False,
747 )
748
749 Function(
750     comment="""
751 Determine the address where a longjmp will land and save this address
752 in PC.  Return nonzero on success.
753
754 FRAME corresponds to the longjmp frame.
755 """,
756     type="int",
757     name="get_longjmp_target",
758     params=[("frame_info_ptr", "frame"), ("CORE_ADDR *", "pc")],
759     predicate=True,
760     invalid=True,
761 )
762
763 Value(
764     type="int",
765     name="believe_pcc_promotion",
766     invalid=False,
767 )
768
769 Method(
770     type="int",
771     name="convert_register_p",
772     params=[("int", "regnum"), ("struct type *", "type")],
773     predefault="generic_convert_register_p",
774     invalid=False,
775 )
776
777 Function(
778     type="int",
779     name="register_to_value",
780     params=[
781         ("frame_info_ptr", "frame"),
782         ("int", "regnum"),
783         ("struct type *", "type"),
784         ("gdb_byte *", "buf"),
785         ("int *", "optimizedp"),
786         ("int *", "unavailablep"),
787     ],
788     invalid=False,
789 )
790
791 Function(
792     type="void",
793     name="value_to_register",
794     params=[
795         ("frame_info_ptr", "frame"),
796         ("int", "regnum"),
797         ("struct type *", "type"),
798         ("const gdb_byte *", "buf"),
799     ],
800     invalid=False,
801 )
802
803 Method(
804     comment="""
805 Construct a value representing the contents of register REGNUM in
806 frame FRAME_ID, interpreted as type TYPE.  The routine needs to
807 allocate and return a struct value with all value attributes
808 (but not the value contents) filled in.
809 """,
810     type="struct value *",
811     name="value_from_register",
812     params=[
813         ("struct type *", "type"),
814         ("int", "regnum"),
815         ("struct frame_id", "frame_id"),
816     ],
817     predefault="default_value_from_register",
818     invalid=False,
819 )
820
821 Method(
822     type="CORE_ADDR",
823     name="pointer_to_address",
824     params=[("struct type *", "type"), ("const gdb_byte *", "buf")],
825     predefault="unsigned_pointer_to_address",
826     invalid=False,
827 )
828
829 Method(
830     type="void",
831     name="address_to_pointer",
832     params=[("struct type *", "type"), ("gdb_byte *", "buf"), ("CORE_ADDR", "addr")],
833     predefault="unsigned_address_to_pointer",
834     invalid=False,
835 )
836
837 Method(
838     type="CORE_ADDR",
839     name="integer_to_address",
840     params=[("struct type *", "type"), ("const gdb_byte *", "buf")],
841     predicate=True,
842     invalid=True,
843 )
844
845 Method(
846     comment="""
847 Return the return-value convention that will be used by FUNCTION
848 to return a value of type VALTYPE.  FUNCTION may be NULL in which
849 case the return convention is computed based only on VALTYPE.
850
851 If READBUF is not NULL, extract the return value and save it in this buffer.
852
853 If WRITEBUF is not NULL, it contains a return value which will be
854 stored into the appropriate register.  This can be used when we want
855 to force the value returned by a function (see the "return" command
856 for instance).
857 """,
858     type="enum return_value_convention",
859     name="return_value",
860     params=[
861         ("struct value *", "function"),
862         ("struct type *", "valtype"),
863         ("struct regcache *", "regcache"),
864         ("gdb_byte *", "readbuf"),
865         ("const gdb_byte *", "writebuf"),
866     ],
867     predicate=True,
868     invalid=True,
869 )
870
871 Function(
872     comment="""
873 Return the address at which the value being returned from
874 the current function will be stored.  This routine is only
875 called if the current function uses the the "struct return
876 convention".
877
878 May return 0 when unable to determine that address.""",
879     type="CORE_ADDR",
880     name="get_return_buf_addr",
881     params=[("struct type *", "val_type"), ("frame_info_ptr", "cur_frame")],
882     predefault="default_get_return_buf_addr",
883     invalid=False,
884 )
885
886 Method(
887     comment="""
888 Return true if the return value of function is stored in the first hidden
889 parameter.  In theory, this feature should be language-dependent, specified
890 by language and its ABI, such as C++.  Unfortunately, compiler may
891 implement it to a target-dependent feature.  So that we need such hook here
892 to be aware of this in GDB.
893 """,
894     type="int",
895     name="return_in_first_hidden_param_p",
896     params=[("struct type *", "type")],
897     predefault="default_return_in_first_hidden_param_p",
898     invalid=False,
899 )
900
901 Method(
902     type="CORE_ADDR",
903     name="skip_prologue",
904     params=[("CORE_ADDR", "ip")],
905     predefault="0",
906     invalid=True,
907 )
908
909 Method(
910     type="CORE_ADDR",
911     name="skip_main_prologue",
912     params=[("CORE_ADDR", "ip")],
913     predicate=True,
914     invalid=True,
915 )
916
917 Method(
918     comment="""
919 On some platforms, a single function may provide multiple entry points,
920 e.g. one that is used for function-pointer calls and a different one
921 that is used for direct function calls.
922 In order to ensure that breakpoints set on the function will trigger
923 no matter via which entry point the function is entered, a platform
924 may provide the skip_entrypoint callback.  It is called with IP set
925 to the main entry point of a function (as determined by the symbol table),
926 and should return the address of the innermost entry point, where the
927 actual breakpoint needs to be set.  Note that skip_entrypoint is used
928 by GDB common code even when debugging optimized code, where skip_prologue
929 is not used.
930 """,
931     type="CORE_ADDR",
932     name="skip_entrypoint",
933     params=[("CORE_ADDR", "ip")],
934     predicate=True,
935     invalid=True,
936 )
937
938 Function(
939     type="int",
940     name="inner_than",
941     params=[("CORE_ADDR", "lhs"), ("CORE_ADDR", "rhs")],
942     predefault="0",
943     invalid=True,
944 )
945
946 Method(
947     type="const gdb_byte *",
948     name="breakpoint_from_pc",
949     params=[("CORE_ADDR *", "pcptr"), ("int *", "lenptr")],
950     predefault="default_breakpoint_from_pc",
951     invalid=False,
952 )
953
954 Method(
955     comment="""
956 Return the breakpoint kind for this target based on *PCPTR.
957 """,
958     type="int",
959     name="breakpoint_kind_from_pc",
960     params=[("CORE_ADDR *", "pcptr")],
961     predefault="0",
962     invalid=True,
963 )
964
965 Method(
966     comment="""
967 Return the software breakpoint from KIND.  KIND can have target
968 specific meaning like the Z0 kind parameter.
969 SIZE is set to the software breakpoint's length in memory.
970 """,
971     type="const gdb_byte *",
972     name="sw_breakpoint_from_kind",
973     params=[("int", "kind"), ("int *", "size")],
974     predefault="NULL",
975     invalid=False,
976 )
977
978 Method(
979     comment="""
980 Return the breakpoint kind for this target based on the current
981 processor state (e.g. the current instruction mode on ARM) and the
982 *PCPTR.  In default, it is gdbarch->breakpoint_kind_from_pc.
983 """,
984     type="int",
985     name="breakpoint_kind_from_current_state",
986     params=[("struct regcache *", "regcache"), ("CORE_ADDR *", "pcptr")],
987     predefault="default_breakpoint_kind_from_current_state",
988     invalid=False,
989 )
990
991 Method(
992     type="CORE_ADDR",
993     name="adjust_breakpoint_address",
994     params=[("CORE_ADDR", "bpaddr")],
995     predicate=True,
996     invalid=True,
997 )
998
999 Method(
1000     type="int",
1001     name="memory_insert_breakpoint",
1002     params=[("struct bp_target_info *", "bp_tgt")],
1003     predefault="default_memory_insert_breakpoint",
1004     invalid=False,
1005 )
1006
1007 Method(
1008     type="int",
1009     name="memory_remove_breakpoint",
1010     params=[("struct bp_target_info *", "bp_tgt")],
1011     predefault="default_memory_remove_breakpoint",
1012     invalid=False,
1013 )
1014
1015 Value(
1016     type="CORE_ADDR",
1017     name="decr_pc_after_break",
1018     invalid=False,
1019 )
1020
1021 Value(
1022     comment="""
1023 A function can be addressed by either it's "pointer" (possibly a
1024 descriptor address) or "entry point" (first executable instruction).
1025 The method "convert_from_func_ptr_addr" converting the former to the
1026 latter.  gdbarch_deprecated_function_start_offset is being used to implement
1027 a simplified subset of that functionality - the function's address
1028 corresponds to the "function pointer" and the function's start
1029 corresponds to the "function entry point" - and hence is redundant.
1030 """,
1031     type="CORE_ADDR",
1032     name="deprecated_function_start_offset",
1033     invalid=False,
1034 )
1035
1036 Method(
1037     comment="""
1038 Return the remote protocol register number associated with this
1039 register.  Normally the identity mapping.
1040 """,
1041     type="int",
1042     name="remote_register_number",
1043     params=[("int", "regno")],
1044     predefault="default_remote_register_number",
1045     invalid=False,
1046 )
1047
1048 Function(
1049     comment="""
1050 Fetch the target specific address used to represent a load module.
1051 """,
1052     type="CORE_ADDR",
1053     name="fetch_tls_load_module_address",
1054     params=[("struct objfile *", "objfile")],
1055     predicate=True,
1056     invalid=True,
1057 )
1058
1059 Method(
1060     comment="""
1061 Return the thread-local address at OFFSET in the thread-local
1062 storage for the thread PTID and the shared library or executable
1063 file given by LM_ADDR.  If that block of thread-local storage hasn't
1064 been allocated yet, this function may throw an error.  LM_ADDR may
1065 be zero for statically linked multithreaded inferiors.
1066 """,
1067     type="CORE_ADDR",
1068     name="get_thread_local_address",
1069     params=[("ptid_t", "ptid"), ("CORE_ADDR", "lm_addr"), ("CORE_ADDR", "offset")],
1070     predicate=True,
1071     invalid=True,
1072 )
1073
1074 Value(
1075     type="CORE_ADDR",
1076     name="frame_args_skip",
1077     invalid=False,
1078 )
1079
1080 Method(
1081     type="CORE_ADDR",
1082     name="unwind_pc",
1083     params=[("frame_info_ptr", "next_frame")],
1084     predefault="default_unwind_pc",
1085     invalid=False,
1086 )
1087
1088 Method(
1089     type="CORE_ADDR",
1090     name="unwind_sp",
1091     params=[("frame_info_ptr", "next_frame")],
1092     predefault="default_unwind_sp",
1093     invalid=False,
1094 )
1095
1096 Function(
1097     comment="""
1098 DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
1099 frame-base.  Enable frame-base before frame-unwind.
1100 """,
1101     type="int",
1102     name="frame_num_args",
1103     params=[("frame_info_ptr", "frame")],
1104     predicate=True,
1105     invalid=True,
1106 )
1107
1108 Method(
1109     type="CORE_ADDR",
1110     name="frame_align",
1111     params=[("CORE_ADDR", "address")],
1112     predicate=True,
1113     invalid=True,
1114 )
1115
1116 Method(
1117     type="int",
1118     name="stabs_argument_has_addr",
1119     params=[("struct type *", "type")],
1120     predefault="default_stabs_argument_has_addr",
1121     invalid=False,
1122 )
1123
1124 Value(
1125     type="int",
1126     name="frame_red_zone_size",
1127     invalid=False,
1128 )
1129
1130 Method(
1131     type="CORE_ADDR",
1132     name="convert_from_func_ptr_addr",
1133     params=[("CORE_ADDR", "addr"), ("struct target_ops *", "targ")],
1134     predefault="convert_from_func_ptr_addr_identity",
1135     invalid=False,
1136 )
1137
1138 Method(
1139     comment="""
1140 On some machines there are bits in addresses which are not really
1141 part of the address, but are used by the kernel, the hardware, etc.
1142 for special purposes.  gdbarch_addr_bits_remove takes out any such bits so
1143 we get a "real" address such as one would find in a symbol table.
1144 This is used only for addresses of instructions, and even then I'm
1145 not sure it's used in all contexts.  It exists to deal with there
1146 being a few stray bits in the PC which would mislead us, not as some
1147 sort of generic thing to handle alignment or segmentation (it's
1148 possible it should be in TARGET_READ_PC instead).
1149 """,
1150     type="CORE_ADDR",
1151     name="addr_bits_remove",
1152     params=[("CORE_ADDR", "addr")],
1153     predefault="core_addr_identity",
1154     invalid=False,
1155 )
1156
1157 Value(
1158     comment="""
1159 On some machines, not all bits of an address word are significant.
1160 For example, on AArch64, the top bits of an address known as the "tag"
1161 are ignored by the kernel, the hardware, etc. and can be regarded as
1162 additional data associated with the address.
1163 """,
1164     type="int",
1165     name="significant_addr_bit",
1166     invalid=False,
1167 )
1168
1169 Method(
1170     comment="""
1171 Return a string representation of the memory tag TAG.
1172 """,
1173     type="std::string",
1174     name="memtag_to_string",
1175     params=[("struct value *", "tag")],
1176     predefault="default_memtag_to_string",
1177     invalid=False,
1178 )
1179
1180 Method(
1181     comment="""
1182 Return true if ADDRESS contains a tag and false otherwise.  ADDRESS
1183 must be either a pointer or a reference type.
1184 """,
1185     type="bool",
1186     name="tagged_address_p",
1187     params=[("struct value *", "address")],
1188     predefault="default_tagged_address_p",
1189     invalid=False,
1190 )
1191
1192 Method(
1193     comment="""
1194 Return true if the tag from ADDRESS matches the memory tag for that
1195 particular address.  Return false otherwise.
1196 """,
1197     type="bool",
1198     name="memtag_matches_p",
1199     params=[("struct value *", "address")],
1200     predefault="default_memtag_matches_p",
1201     invalid=False,
1202 )
1203
1204 Method(
1205     comment="""
1206 Set the tags of type TAG_TYPE, for the memory address range
1207 [ADDRESS, ADDRESS + LENGTH) to TAGS.
1208 Return true if successful and false otherwise.
1209 """,
1210     type="bool",
1211     name="set_memtags",
1212     params=[
1213         ("struct value *", "address"),
1214         ("size_t", "length"),
1215         ("const gdb::byte_vector &", "tags"),
1216         ("memtag_type", "tag_type"),
1217     ],
1218     predefault="default_set_memtags",
1219     invalid=False,
1220 )
1221
1222 Method(
1223     comment="""
1224 Return the tag of type TAG_TYPE associated with the memory address ADDRESS,
1225 assuming ADDRESS is tagged.
1226 """,
1227     type="struct value *",
1228     name="get_memtag",
1229     params=[("struct value *", "address"), ("memtag_type", "tag_type")],
1230     predefault="default_get_memtag",
1231     invalid=False,
1232 )
1233
1234 Value(
1235     comment="""
1236 memtag_granule_size is the size of the allocation tag granule, for
1237 architectures that support memory tagging.
1238 This is 0 for architectures that do not support memory tagging.
1239 For a non-zero value, this represents the number of bytes of memory per tag.
1240 """,
1241     type="CORE_ADDR",
1242     name="memtag_granule_size",
1243     invalid=False,
1244 )
1245
1246 Function(
1247     comment="""
1248 FIXME/cagney/2001-01-18: This should be split in two.  A target method that
1249 indicates if the target needs software single step.  An ISA method to
1250 implement it.
1251
1252 FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the
1253 target can single step.  If not, then implement single step using breakpoints.
1254
1255 Return a vector of addresses on which the software single step
1256 breakpoints should be inserted.  NULL means software single step is
1257 not used.
1258 Multiple breakpoints may be inserted for some instructions such as
1259 conditional branch.  However, each implementation must always evaluate
1260 the condition and only put the breakpoint at the branch destination if
1261 the condition is true, so that we ensure forward progress when stepping
1262 past a conditional branch to self.
1263 """,
1264     type="std::vector<CORE_ADDR>",
1265     name="software_single_step",
1266     params=[("struct regcache *", "regcache")],
1267     predicate=True,
1268     invalid=True,
1269 )
1270
1271 Method(
1272     comment="""
1273 Return non-zero if the processor is executing a delay slot and a
1274 further single-step is needed before the instruction finishes.
1275 """,
1276     type="int",
1277     name="single_step_through_delay",
1278     params=[("frame_info_ptr", "frame")],
1279     predicate=True,
1280     invalid=True,
1281 )
1282
1283 Function(
1284     comment="""
1285 FIXME: cagney/2003-08-28: Need to find a better way of selecting the
1286 disassembler.  Perhaps objdump can handle it?
1287 """,
1288     type="int",
1289     name="print_insn",
1290     params=[("bfd_vma", "vma"), ("struct disassemble_info *", "info")],
1291     predefault="default_print_insn",
1292     invalid=False,
1293 )
1294
1295 Function(
1296     type="CORE_ADDR",
1297     name="skip_trampoline_code",
1298     params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
1299     predefault="generic_skip_trampoline_code",
1300     invalid=False,
1301 )
1302
1303 Value(
1304     comment="Vtable of solib operations functions.",
1305     type="const struct target_so_ops *",
1306     name="so_ops",
1307     postdefault="&solib_target_so_ops",
1308     printer="host_address_to_string (gdbarch->so_ops)",
1309 )
1310
1311 Method(
1312     comment="""
1313 If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
1314 evaluates non-zero, this is the address where the debugger will place
1315 a step-resume breakpoint to get us past the dynamic linker.
1316 """,
1317     type="CORE_ADDR",
1318     name="skip_solib_resolver",
1319     params=[("CORE_ADDR", "pc")],
1320     predefault="generic_skip_solib_resolver",
1321     invalid=False,
1322 )
1323
1324 Method(
1325     comment="""
1326 Some systems also have trampoline code for returning from shared libs.
1327 """,
1328     type="int",
1329     name="in_solib_return_trampoline",
1330     params=[("CORE_ADDR", "pc"), ("const char *", "name")],
1331     predefault="generic_in_solib_return_trampoline",
1332     invalid=False,
1333 )
1334
1335 Method(
1336     comment="""
1337 Return true if PC lies inside an indirect branch thunk.
1338 """,
1339     type="bool",
1340     name="in_indirect_branch_thunk",
1341     params=[("CORE_ADDR", "pc")],
1342     predefault="default_in_indirect_branch_thunk",
1343     invalid=False,
1344 )
1345
1346 Method(
1347     comment="""
1348 A target might have problems with watchpoints as soon as the stack
1349 frame of the current function has been destroyed.  This mostly happens
1350 as the first action in a function's epilogue.  stack_frame_destroyed_p()
1351 is defined to return a non-zero value if either the given addr is one
1352 instruction after the stack destroying instruction up to the trailing
1353 return instruction or if we can figure out that the stack frame has
1354 already been invalidated regardless of the value of addr.  Targets
1355 which don't suffer from that problem could just let this functionality
1356 untouched.
1357 """,
1358     type="int",
1359     name="stack_frame_destroyed_p",
1360     params=[("CORE_ADDR", "addr")],
1361     predefault="generic_stack_frame_destroyed_p",
1362     invalid=False,
1363 )
1364
1365 Function(
1366     comment="""
1367 Process an ELF symbol in the minimal symbol table in a backend-specific
1368 way.  Normally this hook is supposed to do nothing, however if required,
1369 then this hook can be used to apply tranformations to symbols that are
1370 considered special in some way.  For example the MIPS backend uses it
1371 to interpret `st_other' information to mark compressed code symbols so
1372 that they can be treated in the appropriate manner in the processing of
1373 the main symbol table and DWARF-2 records.
1374 """,
1375     type="void",
1376     name="elf_make_msymbol_special",
1377     params=[("asymbol *", "sym"), ("struct minimal_symbol *", "msym")],
1378     predicate=True,
1379     invalid=True,
1380 )
1381
1382 Function(
1383     type="void",
1384     name="coff_make_msymbol_special",
1385     params=[("int", "val"), ("struct minimal_symbol *", "msym")],
1386     predefault="default_coff_make_msymbol_special",
1387     invalid=False,
1388 )
1389
1390 Function(
1391     comment="""
1392 Process a symbol in the main symbol table in a backend-specific way.
1393 Normally this hook is supposed to do nothing, however if required,
1394 then this hook can be used to apply tranformations to symbols that
1395 are considered special in some way.  This is currently used by the
1396 MIPS backend to make sure compressed code symbols have the ISA bit
1397 set.  This in turn is needed for symbol values seen in GDB to match
1398 the values used at the runtime by the program itself, for function
1399 and label references.
1400 """,
1401     type="void",
1402     name="make_symbol_special",
1403     params=[("struct symbol *", "sym"), ("struct objfile *", "objfile")],
1404     predefault="default_make_symbol_special",
1405     invalid=False,
1406 )
1407
1408 Function(
1409     comment="""
1410 Adjust the address retrieved from a DWARF-2 record other than a line
1411 entry in a backend-specific way.  Normally this hook is supposed to
1412 return the address passed unchanged, however if that is incorrect for
1413 any reason, then this hook can be used to fix the address up in the
1414 required manner.  This is currently used by the MIPS backend to make
1415 sure addresses in FDE, range records, etc. referring to compressed
1416 code have the ISA bit set, matching line information and the symbol
1417 table.
1418 """,
1419     type="CORE_ADDR",
1420     name="adjust_dwarf2_addr",
1421     params=[("CORE_ADDR", "pc")],
1422     predefault="default_adjust_dwarf2_addr",
1423     invalid=False,
1424 )
1425
1426 Function(
1427     comment="""
1428 Adjust the address updated by a line entry in a backend-specific way.
1429 Normally this hook is supposed to return the address passed unchanged,
1430 however in the case of inconsistencies in these records, this hook can
1431 be used to fix them up in the required manner.  This is currently used
1432 by the MIPS backend to make sure all line addresses in compressed code
1433 are presented with the ISA bit set, which is not always the case.  This
1434 in turn ensures breakpoint addresses are correctly matched against the
1435 stop PC.
1436 """,
1437     type="CORE_ADDR",
1438     name="adjust_dwarf2_line",
1439     params=[("CORE_ADDR", "addr"), ("int", "rel")],
1440     predefault="default_adjust_dwarf2_line",
1441     invalid=False,
1442 )
1443
1444 Value(
1445     type="int",
1446     name="cannot_step_breakpoint",
1447     predefault="0",
1448     invalid=False,
1449 )
1450
1451 Value(
1452     comment="""
1453 See comment in target.h about continuable, steppable and
1454 non-steppable watchpoints.
1455 """,
1456     type="int",
1457     name="have_nonsteppable_watchpoint",
1458     predefault="0",
1459     invalid=False,
1460 )
1461
1462 Function(
1463     type="type_instance_flags",
1464     name="address_class_type_flags",
1465     params=[("int", "byte_size"), ("int", "dwarf2_addr_class")],
1466     predicate=True,
1467     invalid=True,
1468 )
1469
1470 Method(
1471     type="const char *",
1472     name="address_class_type_flags_to_name",
1473     params=[("type_instance_flags", "type_flags")],
1474     predicate=True,
1475     invalid=True,
1476 )
1477
1478 Method(
1479     comment="""
1480 Execute vendor-specific DWARF Call Frame Instruction.  OP is the instruction.
1481 FS are passed from the generic execute_cfa_program function.
1482 """,
1483     type="bool",
1484     name="execute_dwarf_cfa_vendor_op",
1485     params=[("gdb_byte", "op"), ("struct dwarf2_frame_state *", "fs")],
1486     predefault="default_execute_dwarf_cfa_vendor_op",
1487     invalid=False,
1488 )
1489
1490 Method(
1491     comment="""
1492 Return the appropriate type_flags for the supplied address class.
1493 This function should return true if the address class was recognized and
1494 type_flags was set, false otherwise.
1495 """,
1496     type="bool",
1497     name="address_class_name_to_type_flags",
1498     params=[("const char *", "name"), ("type_instance_flags *", "type_flags_ptr")],
1499     predicate=True,
1500     invalid=True,
1501 )
1502
1503 Method(
1504     comment="""
1505 Is a register in a group
1506 """,
1507     type="int",
1508     name="register_reggroup_p",
1509     params=[("int", "regnum"), ("const struct reggroup *", "reggroup")],
1510     predefault="default_register_reggroup_p",
1511     invalid=False,
1512 )
1513
1514 Function(
1515     comment="""
1516 Fetch the pointer to the ith function argument.
1517 """,
1518     type="CORE_ADDR",
1519     name="fetch_pointer_argument",
1520     params=[
1521         ("frame_info_ptr", "frame"),
1522         ("int", "argi"),
1523         ("struct type *", "type"),
1524     ],
1525     predicate=True,
1526     invalid=True,
1527 )
1528
1529 Method(
1530     comment="""
1531 Iterate over all supported register notes in a core file.  For each
1532 supported register note section, the iterator must call CB and pass
1533 CB_DATA unchanged.  If REGCACHE is not NULL, the iterator can limit
1534 the supported register note sections based on the current register
1535 values.  Otherwise it should enumerate all supported register note
1536 sections.
1537 """,
1538     type="void",
1539     name="iterate_over_regset_sections",
1540     params=[
1541         ("iterate_over_regset_sections_cb *", "cb"),
1542         ("void *", "cb_data"),
1543         ("const struct regcache *", "regcache"),
1544     ],
1545     predicate=True,
1546     invalid=True,
1547 )
1548
1549 Method(
1550     comment="""
1551 Create core file notes
1552 """,
1553     type="gdb::unique_xmalloc_ptr<char>",
1554     name="make_corefile_notes",
1555     params=[("bfd *", "obfd"), ("int *", "note_size")],
1556     predicate=True,
1557     invalid=True,
1558 )
1559
1560 Method(
1561     comment="""
1562 Find core file memory regions
1563 """,
1564     type="int",
1565     name="find_memory_regions",
1566     params=[("find_memory_region_ftype", "func"), ("void *", "data")],
1567     predicate=True,
1568     invalid=True,
1569 )
1570
1571 Method(
1572     comment="""
1573 Given a bfd OBFD, segment ADDRESS and SIZE, create a memory tag section to be dumped to a core file
1574 """,
1575     type="asection *",
1576     name="create_memtag_section",
1577     params=[("bfd *", "obfd"), ("CORE_ADDR", "address"), ("size_t", "size")],
1578     predicate=True,
1579     invalid=True,
1580 )
1581
1582 Method(
1583     comment="""
1584 Given a memory tag section OSEC, fill OSEC's contents with the appropriate tag data
1585 """,
1586     type="bool",
1587     name="fill_memtag_section",
1588     params=[("asection *", "osec")],
1589     predicate=True,
1590     invalid=True,
1591 )
1592
1593 Method(
1594     comment="""
1595 Decode a memory tag SECTION and return the tags of type TYPE contained in
1596 the memory range [ADDRESS, ADDRESS + LENGTH).
1597 If no tags were found, return an empty vector.
1598 """,
1599     type="gdb::byte_vector",
1600     name="decode_memtag_section",
1601     params=[
1602         ("bfd_section *", "section"),
1603         ("int", "type"),
1604         ("CORE_ADDR", "address"),
1605         ("size_t", "length"),
1606     ],
1607     predicate=True,
1608     invalid=True,
1609 )
1610
1611 Method(
1612     comment="""
1613 Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
1614 core file into buffer READBUF with length LEN.  Return the number of bytes read
1615 (zero indicates failure).
1616 failed, otherwise, return the red length of READBUF.
1617 """,
1618     type="ULONGEST",
1619     name="core_xfer_shared_libraries",
1620     params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1621     predicate=True,
1622     invalid=True,
1623 )
1624
1625 Method(
1626     comment="""
1627 Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
1628 libraries list from core file into buffer READBUF with length LEN.
1629 Return the number of bytes read (zero indicates failure).
1630 """,
1631     type="ULONGEST",
1632     name="core_xfer_shared_libraries_aix",
1633     params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1634     predicate=True,
1635     invalid=True,
1636 )
1637
1638 Method(
1639     comment="""
1640 How the core target converts a PTID from a core file to a string.
1641 """,
1642     type="std::string",
1643     name="core_pid_to_str",
1644     params=[("ptid_t", "ptid")],
1645     predicate=True,
1646     invalid=True,
1647 )
1648
1649 Method(
1650     comment="""
1651 How the core target extracts the name of a thread from a core file.
1652 """,
1653     type="const char *",
1654     name="core_thread_name",
1655     params=[("struct thread_info *", "thr")],
1656     predicate=True,
1657     invalid=True,
1658 )
1659
1660 Method(
1661     comment="""
1662 Read offset OFFSET of TARGET_OBJECT_SIGNAL_INFO signal information
1663 from core file into buffer READBUF with length LEN.  Return the number
1664 of bytes read (zero indicates EOF, a negative value indicates failure).
1665 """,
1666     type="LONGEST",
1667     name="core_xfer_siginfo",
1668     params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1669     predicate=True,
1670     invalid=True,
1671 )
1672
1673 Value(
1674     comment="""
1675 BFD target to use when generating a core file.
1676 """,
1677     type="const char *",
1678     name="gcore_bfd_target",
1679     predicate=True,
1680     predefault="0",
1681     invalid=True,
1682     printer="pstring (gdbarch->gcore_bfd_target)",
1683 )
1684
1685 Value(
1686     comment="""
1687 If the elements of C++ vtables are in-place function descriptors rather
1688 than normal function pointers (which may point to code or a descriptor),
1689 set this to one.
1690 """,
1691     type="int",
1692     name="vtable_function_descriptors",
1693     predefault="0",
1694     invalid=False,
1695 )
1696
1697 Value(
1698     comment="""
1699 Set if the least significant bit of the delta is used instead of the least
1700 significant bit of the pfn for pointers to virtual member functions.
1701 """,
1702     type="int",
1703     name="vbit_in_delta",
1704     predefault="0",
1705     invalid=False,
1706 )
1707
1708 Function(
1709     comment="""
1710 Advance PC to next instruction in order to skip a permanent breakpoint.
1711 """,
1712     type="void",
1713     name="skip_permanent_breakpoint",
1714     params=[("struct regcache *", "regcache")],
1715     predefault="default_skip_permanent_breakpoint",
1716     invalid=False,
1717 )
1718
1719 Value(
1720     comment="""
1721 The maximum length of an instruction on this architecture in bytes.
1722 """,
1723     type="ULONGEST",
1724     name="max_insn_length",
1725     predicate=True,
1726     predefault="0",
1727     invalid=True,
1728 )
1729
1730 Method(
1731     comment="""
1732 Copy the instruction at FROM to TO, and make any adjustments
1733 necessary to single-step it at that address.
1734
1735 REGS holds the state the thread's registers will have before
1736 executing the copied instruction; the PC in REGS will refer to FROM,
1737 not the copy at TO.  The caller should update it to point at TO later.
1738
1739 Return a pointer to data of the architecture's choice to be passed
1740 to gdbarch_displaced_step_fixup.
1741
1742 For a general explanation of displaced stepping and how GDB uses it,
1743 see the comments in infrun.c.
1744
1745 The TO area is only guaranteed to have space for
1746 gdbarch_max_insn_length (arch) bytes, so this function must not
1747 write more bytes than that to that area.
1748
1749 If you do not provide this function, GDB assumes that the
1750 architecture does not support displaced stepping.
1751
1752 If the instruction cannot execute out of line, return NULL.  The
1753 core falls back to stepping past the instruction in-line instead in
1754 that case.
1755 """,
1756     type="displaced_step_copy_insn_closure_up",
1757     name="displaced_step_copy_insn",
1758     params=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")],
1759     predicate=True,
1760     invalid=True,
1761 )
1762
1763 Method(
1764     comment="""
1765 Return true if GDB should use hardware single-stepping to execute a displaced
1766 step instruction.  If false, GDB will simply restart execution at the
1767 displaced instruction location, and it is up to the target to ensure GDB will
1768 receive control again (e.g. by placing a software breakpoint instruction into
1769 the displaced instruction buffer).
1770
1771 The default implementation returns false on all targets that provide a
1772 gdbarch_software_single_step routine, and true otherwise.
1773 """,
1774     type="bool",
1775     name="displaced_step_hw_singlestep",
1776     params=[],
1777     predefault="default_displaced_step_hw_singlestep",
1778     invalid=False,
1779 )
1780
1781 Method(
1782     comment="""
1783 Fix up the state resulting from successfully single-stepping a
1784 displaced instruction, to give the result we would have gotten from
1785 stepping the instruction in its original location.
1786
1787 REGS is the register state resulting from single-stepping the
1788 displaced instruction.
1789
1790 CLOSURE is the result from the matching call to
1791 gdbarch_displaced_step_copy_insn.
1792
1793 If you provide gdbarch_displaced_step_copy_insn.but not this
1794 function, then GDB assumes that no fixup is needed after
1795 single-stepping the instruction.
1796
1797 For a general explanation of displaced stepping and how GDB uses it,
1798 see the comments in infrun.c.
1799 """,
1800     type="void",
1801     name="displaced_step_fixup",
1802     params=[
1803         ("struct displaced_step_copy_insn_closure *", "closure"),
1804         ("CORE_ADDR", "from"),
1805         ("CORE_ADDR", "to"),
1806         ("struct regcache *", "regs"),
1807     ],
1808     predicate=True,
1809     predefault="NULL",
1810     invalid=True,
1811 )
1812
1813 Method(
1814     comment="""
1815 Prepare THREAD for it to displaced step the instruction at its current PC.
1816
1817 Throw an exception if any unexpected error happens.
1818 """,
1819     type="displaced_step_prepare_status",
1820     name="displaced_step_prepare",
1821     params=[("thread_info *", "thread"), ("CORE_ADDR &", "displaced_pc")],
1822     predicate=True,
1823     invalid=True,
1824 )
1825
1826 Method(
1827     comment="""
1828 Clean up after a displaced step of THREAD.
1829 """,
1830     type="displaced_step_finish_status",
1831     name="displaced_step_finish",
1832     params=[("thread_info *", "thread"), ("gdb_signal", "sig")],
1833     predefault="NULL",
1834     invalid="(! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)",
1835 )
1836
1837 Function(
1838     comment="""
1839 Return the closure associated to the displaced step buffer that is at ADDR.
1840 """,
1841     type="const displaced_step_copy_insn_closure *",
1842     name="displaced_step_copy_insn_closure_by_addr",
1843     params=[("inferior *", "inf"), ("CORE_ADDR", "addr")],
1844     predicate=True,
1845     invalid=True,
1846 )
1847
1848 Function(
1849     comment="""
1850 PARENT_INF has forked and CHILD_PTID is the ptid of the child.  Restore the
1851 contents of all displaced step buffers in the child's address space.
1852 """,
1853     type="void",
1854     name="displaced_step_restore_all_in_ptid",
1855     params=[("inferior *", "parent_inf"), ("ptid_t", "child_ptid")],
1856     invalid=False,
1857 )
1858
1859 Method(
1860     comment="""
1861 Relocate an instruction to execute at a different address.  OLDLOC
1862 is the address in the inferior memory where the instruction to
1863 relocate is currently at.  On input, TO points to the destination
1864 where we want the instruction to be copied (and possibly adjusted)
1865 to.  On output, it points to one past the end of the resulting
1866 instruction(s).  The effect of executing the instruction at TO shall
1867 be the same as if executing it at FROM.  For example, call
1868 instructions that implicitly push the return address on the stack
1869 should be adjusted to return to the instruction after OLDLOC;
1870 relative branches, and other PC-relative instructions need the
1871 offset adjusted; etc.
1872 """,
1873     type="void",
1874     name="relocate_instruction",
1875     params=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")],
1876     predicate=True,
1877     predefault="NULL",
1878     invalid=True,
1879 )
1880
1881 Function(
1882     comment="""
1883 Refresh overlay mapped state for section OSECT.
1884 """,
1885     type="void",
1886     name="overlay_update",
1887     params=[("struct obj_section *", "osect")],
1888     predicate=True,
1889     invalid=True,
1890 )
1891
1892 Method(
1893     type="const struct target_desc *",
1894     name="core_read_description",
1895     params=[("struct target_ops *", "target"), ("bfd *", "abfd")],
1896     predicate=True,
1897     invalid=True,
1898 )
1899
1900 Value(
1901     comment="""
1902 Set if the address in N_SO or N_FUN stabs may be zero.
1903 """,
1904     type="int",
1905     name="sofun_address_maybe_missing",
1906     predefault="0",
1907     invalid=False,
1908 )
1909
1910 Method(
1911     comment="""
1912 Parse the instruction at ADDR storing in the record execution log
1913 the registers REGCACHE and memory ranges that will be affected when
1914 the instruction executes, along with their current values.
1915 Return -1 if something goes wrong, 0 otherwise.
1916 """,
1917     type="int",
1918     name="process_record",
1919     params=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
1920     predicate=True,
1921     invalid=True,
1922 )
1923
1924 Method(
1925     comment="""
1926 Save process state after a signal.
1927 Return -1 if something goes wrong, 0 otherwise.
1928 """,
1929     type="int",
1930     name="process_record_signal",
1931     params=[("struct regcache *", "regcache"), ("enum gdb_signal", "signal")],
1932     predicate=True,
1933     invalid=True,
1934 )
1935
1936 Method(
1937     comment="""
1938 Signal translation: translate inferior's signal (target's) number
1939 into GDB's representation.  The implementation of this method must
1940 be host independent.  IOW, don't rely on symbols of the NAT_FILE
1941 header (the nm-*.h files), the host <signal.h> header, or similar
1942 headers.  This is mainly used when cross-debugging core files ---
1943 "Live" targets hide the translation behind the target interface
1944 (target_wait, target_resume, etc.).
1945 """,
1946     type="enum gdb_signal",
1947     name="gdb_signal_from_target",
1948     params=[("int", "signo")],
1949     predicate=True,
1950     invalid=True,
1951 )
1952
1953 Method(
1954     comment="""
1955 Signal translation: translate the GDB's internal signal number into
1956 the inferior's signal (target's) representation.  The implementation
1957 of this method must be host independent.  IOW, don't rely on symbols
1958 of the NAT_FILE header (the nm-*.h files), the host <signal.h>
1959 header, or similar headers.
1960 Return the target signal number if found, or -1 if the GDB internal
1961 signal number is invalid.
1962 """,
1963     type="int",
1964     name="gdb_signal_to_target",
1965     params=[("enum gdb_signal", "signal")],
1966     predicate=True,
1967     invalid=True,
1968 )
1969
1970 Method(
1971     comment="""
1972 Extra signal info inspection.
1973
1974 Return a type suitable to inspect extra signal information.
1975 """,
1976     type="struct type *",
1977     name="get_siginfo_type",
1978     params=[],
1979     predicate=True,
1980     invalid=True,
1981 )
1982
1983 Method(
1984     comment="""
1985 Record architecture-specific information from the symbol table.
1986 """,
1987     type="void",
1988     name="record_special_symbol",
1989     params=[("struct objfile *", "objfile"), ("asymbol *", "sym")],
1990     predicate=True,
1991     invalid=True,
1992 )
1993
1994 Method(
1995     comment="""
1996 Function for the 'catch syscall' feature.
1997 Get architecture-specific system calls information from registers.
1998 """,
1999     type="LONGEST",
2000     name="get_syscall_number",
2001     params=[("thread_info *", "thread")],
2002     predicate=True,
2003     invalid=True,
2004 )
2005
2006 Value(
2007     comment="""
2008 The filename of the XML syscall for this architecture.
2009 """,
2010     type="const char *",
2011     name="xml_syscall_file",
2012     predefault="0",
2013     invalid=False,
2014     printer="pstring (gdbarch->xml_syscall_file)",
2015 )
2016
2017 Value(
2018     comment="""
2019 Information about system calls from this architecture
2020 """,
2021     type="struct syscalls_info *",
2022     name="syscalls_info",
2023     predefault="0",
2024     invalid=False,
2025     printer="host_address_to_string (gdbarch->syscalls_info)",
2026 )
2027
2028 Value(
2029     comment="""
2030 SystemTap related fields and functions.
2031 A NULL-terminated array of prefixes used to mark an integer constant
2032 on the architecture's assembly.
2033 For example, on x86 integer constants are written as:
2034
2035 $10 ;; integer constant 10
2036
2037 in this case, this prefix would be the character `$'.
2038 """,
2039     type="const char *const *",
2040     name="stap_integer_prefixes",
2041     predefault="0",
2042     invalid=False,
2043     printer="pstring_list (gdbarch->stap_integer_prefixes)",
2044 )
2045
2046 Value(
2047     comment="""
2048 A NULL-terminated array of suffixes used to mark an integer constant
2049 on the architecture's assembly.
2050 """,
2051     type="const char *const *",
2052     name="stap_integer_suffixes",
2053     predefault="0",
2054     invalid=False,
2055     printer="pstring_list (gdbarch->stap_integer_suffixes)",
2056 )
2057
2058 Value(
2059     comment="""
2060 A NULL-terminated array of prefixes used to mark a register name on
2061 the architecture's assembly.
2062 For example, on x86 the register name is written as:
2063
2064 %eax ;; register eax
2065
2066 in this case, this prefix would be the character `%'.
2067 """,
2068     type="const char *const *",
2069     name="stap_register_prefixes",
2070     predefault="0",
2071     invalid=False,
2072     printer="pstring_list (gdbarch->stap_register_prefixes)",
2073 )
2074
2075 Value(
2076     comment="""
2077 A NULL-terminated array of suffixes used to mark a register name on
2078 the architecture's assembly.
2079 """,
2080     type="const char *const *",
2081     name="stap_register_suffixes",
2082     predefault="0",
2083     invalid=False,
2084     printer="pstring_list (gdbarch->stap_register_suffixes)",
2085 )
2086
2087 Value(
2088     comment="""
2089 A NULL-terminated array of prefixes used to mark a register
2090 indirection on the architecture's assembly.
2091 For example, on x86 the register indirection is written as:
2092
2093 (%eax) ;; indirecting eax
2094
2095 in this case, this prefix would be the charater `('.
2096
2097 Please note that we use the indirection prefix also for register
2098 displacement, e.g., `4(%eax)' on x86.
2099 """,
2100     type="const char *const *",
2101     name="stap_register_indirection_prefixes",
2102     predefault="0",
2103     invalid=False,
2104     printer="pstring_list (gdbarch->stap_register_indirection_prefixes)",
2105 )
2106
2107 Value(
2108     comment="""
2109 A NULL-terminated array of suffixes used to mark a register
2110 indirection on the architecture's assembly.
2111 For example, on x86 the register indirection is written as:
2112
2113 (%eax) ;; indirecting eax
2114
2115 in this case, this prefix would be the charater `)'.
2116
2117 Please note that we use the indirection suffix also for register
2118 displacement, e.g., `4(%eax)' on x86.
2119 """,
2120     type="const char *const *",
2121     name="stap_register_indirection_suffixes",
2122     predefault="0",
2123     invalid=False,
2124     printer="pstring_list (gdbarch->stap_register_indirection_suffixes)",
2125 )
2126
2127 Value(
2128     comment="""
2129 Prefix(es) used to name a register using GDB's nomenclature.
2130
2131 For example, on PPC a register is represented by a number in the assembly
2132 language (e.g., `10' is the 10th general-purpose register).  However,
2133 inside GDB this same register has an `r' appended to its name, so the 10th
2134 register would be represented as `r10' internally.
2135 """,
2136     type="const char *",
2137     name="stap_gdb_register_prefix",
2138     predefault="0",
2139     invalid=False,
2140     printer="pstring (gdbarch->stap_gdb_register_prefix)",
2141 )
2142
2143 Value(
2144     comment="""
2145 Suffix used to name a register using GDB's nomenclature.
2146 """,
2147     type="const char *",
2148     name="stap_gdb_register_suffix",
2149     predefault="0",
2150     invalid=False,
2151     printer="pstring (gdbarch->stap_gdb_register_suffix)",
2152 )
2153
2154 Method(
2155     comment="""
2156 Check if S is a single operand.
2157
2158 Single operands can be:
2159 - Literal integers, e.g. `$10' on x86
2160 - Register access, e.g. `%eax' on x86
2161 - Register indirection, e.g. `(%eax)' on x86
2162 - Register displacement, e.g. `4(%eax)' on x86
2163
2164 This function should check for these patterns on the string
2165 and return 1 if some were found, or zero otherwise.  Please try to match
2166 as much info as you can from the string, i.e., if you have to match
2167 something like `(%', do not match just the `('.
2168 """,
2169     type="int",
2170     name="stap_is_single_operand",
2171     params=[("const char *", "s")],
2172     predicate=True,
2173     invalid=True,
2174 )
2175
2176 Method(
2177     comment="""
2178 Function used to handle a "special case" in the parser.
2179
2180 A "special case" is considered to be an unknown token, i.e., a token
2181 that the parser does not know how to parse.  A good example of special
2182 case would be ARM's register displacement syntax:
2183
2184 [R0, #4]  ;; displacing R0 by 4
2185
2186 Since the parser assumes that a register displacement is of the form:
2187
2188 <number> <indirection_prefix> <register_name> <indirection_suffix>
2189
2190 it means that it will not be able to recognize and parse this odd syntax.
2191 Therefore, we should add a special case function that will handle this token.
2192
2193 This function should generate the proper expression form of the expression
2194 using GDB's internal expression mechanism (e.g., `write_exp_elt_opcode'
2195 and so on).  It should also return 1 if the parsing was successful, or zero
2196 if the token was not recognized as a special token (in this case, returning
2197 zero means that the special parser is deferring the parsing to the generic
2198 parser), and should advance the buffer pointer (p->arg).
2199 """,
2200     type="expr::operation_up",
2201     name="stap_parse_special_token",
2202     params=[("struct stap_parse_info *", "p")],
2203     predicate=True,
2204     invalid=True,
2205 )
2206
2207 Method(
2208     comment="""
2209 Perform arch-dependent adjustments to a register name.
2210
2211 In very specific situations, it may be necessary for the register
2212 name present in a SystemTap probe's argument to be handled in a
2213 special way.  For example, on i386, GCC may over-optimize the
2214 register allocation and use smaller registers than necessary.  In
2215 such cases, the client that is reading and evaluating the SystemTap
2216 probe (ourselves) will need to actually fetch values from the wider
2217 version of the register in question.
2218
2219 To illustrate the example, consider the following probe argument
2220 (i386):
2221
2222 4@%ax
2223
2224 This argument says that its value can be found at the %ax register,
2225 which is a 16-bit register.  However, the argument's prefix says
2226 that its type is "uint32_t", which is 32-bit in size.  Therefore, in
2227 this case, GDB should actually fetch the probe's value from register
2228 %eax, not %ax.  In this scenario, this function would actually
2229 replace the register name from %ax to %eax.
2230
2231 The rationale for this can be found at PR breakpoints/24541.
2232 """,
2233     type="std::string",
2234     name="stap_adjust_register",
2235     params=[
2236         ("struct stap_parse_info *", "p"),
2237         ("const std::string &", "regname"),
2238         ("int", "regnum"),
2239     ],
2240     predicate=True,
2241     invalid=True,
2242 )
2243
2244 Method(
2245     comment="""
2246 DTrace related functions.
2247 The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
2248 NARG must be >= 0.
2249 """,
2250     type="expr::operation_up",
2251     name="dtrace_parse_probe_argument",
2252     params=[("int", "narg")],
2253     predicate=True,
2254     invalid=True,
2255 )
2256
2257 Method(
2258     comment="""
2259 True if the given ADDR does not contain the instruction sequence
2260 corresponding to a disabled DTrace is-enabled probe.
2261 """,
2262     type="int",
2263     name="dtrace_probe_is_enabled",
2264     params=[("CORE_ADDR", "addr")],
2265     predicate=True,
2266     invalid=True,
2267 )
2268
2269 Method(
2270     comment="""
2271 Enable a DTrace is-enabled probe at ADDR.
2272 """,
2273     type="void",
2274     name="dtrace_enable_probe",
2275     params=[("CORE_ADDR", "addr")],
2276     predicate=True,
2277     invalid=True,
2278 )
2279
2280 Method(
2281     comment="""
2282 Disable a DTrace is-enabled probe at ADDR.
2283 """,
2284     type="void",
2285     name="dtrace_disable_probe",
2286     params=[("CORE_ADDR", "addr")],
2287     predicate=True,
2288     invalid=True,
2289 )
2290
2291 Value(
2292     comment="""
2293 True if the list of shared libraries is one and only for all
2294 processes, as opposed to a list of shared libraries per inferior.
2295 This usually means that all processes, although may or may not share
2296 an address space, will see the same set of symbols at the same
2297 addresses.
2298 """,
2299     type="int",
2300     name="has_global_solist",
2301     predefault="0",
2302     invalid=False,
2303 )
2304
2305 Value(
2306     comment="""
2307 On some targets, even though each inferior has its own private
2308 address space, the debug interface takes care of making breakpoints
2309 visible to all address spaces automatically.  For such cases,
2310 this property should be set to true.
2311 """,
2312     type="int",
2313     name="has_global_breakpoints",
2314     predefault="0",
2315     invalid=False,
2316 )
2317
2318 Method(
2319     comment="""
2320 True if inferiors share an address space (e.g., uClinux).
2321 """,
2322     type="int",
2323     name="has_shared_address_space",
2324     params=[],
2325     predefault="default_has_shared_address_space",
2326     invalid=False,
2327 )
2328
2329 Method(
2330     comment="""
2331 True if a fast tracepoint can be set at an address.
2332 """,
2333     type="int",
2334     name="fast_tracepoint_valid_at",
2335     params=[("CORE_ADDR", "addr"), ("std::string *", "msg")],
2336     predefault="default_fast_tracepoint_valid_at",
2337     invalid=False,
2338 )
2339
2340 Method(
2341     comment="""
2342 Guess register state based on tracepoint location.  Used for tracepoints
2343 where no registers have been collected, but there's only one location,
2344 allowing us to guess the PC value, and perhaps some other registers.
2345 On entry, regcache has all registers marked as unavailable.
2346 """,
2347     type="void",
2348     name="guess_tracepoint_registers",
2349     params=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
2350     predefault="default_guess_tracepoint_registers",
2351     invalid=False,
2352 )
2353
2354 Function(
2355     comment="""
2356 Return the "auto" target charset.
2357 """,
2358     type="const char *",
2359     name="auto_charset",
2360     params=[],
2361     predefault="default_auto_charset",
2362     invalid=False,
2363 )
2364
2365 Function(
2366     comment="""
2367 Return the "auto" target wide charset.
2368 """,
2369     type="const char *",
2370     name="auto_wide_charset",
2371     params=[],
2372     predefault="default_auto_wide_charset",
2373     invalid=False,
2374 )
2375
2376 Value(
2377     comment="""
2378 If non-empty, this is a file extension that will be opened in place
2379 of the file extension reported by the shared library list.
2380
2381 This is most useful for toolchains that use a post-linker tool,
2382 where the names of the files run on the target differ in extension
2383 compared to the names of the files GDB should load for debug info.
2384 """,
2385     type="const char *",
2386     name="solib_symbols_extension",
2387     invalid=False,
2388     printer="pstring (gdbarch->solib_symbols_extension)",
2389 )
2390
2391 Value(
2392     comment="""
2393 If true, the target OS has DOS-based file system semantics.  That
2394 is, absolute paths include a drive name, and the backslash is
2395 considered a directory separator.
2396 """,
2397     type="int",
2398     name="has_dos_based_file_system",
2399     predefault="0",
2400     invalid=False,
2401 )
2402
2403 Method(
2404     comment="""
2405 Generate bytecodes to collect the return address in a frame.
2406 Since the bytecodes run on the target, possibly with GDB not even
2407 connected, the full unwinding machinery is not available, and
2408 typically this function will issue bytecodes for one or more likely
2409 places that the return address may be found.
2410 """,
2411     type="void",
2412     name="gen_return_address",
2413     params=[
2414         ("struct agent_expr *", "ax"),
2415         ("struct axs_value *", "value"),
2416         ("CORE_ADDR", "scope"),
2417     ],
2418     predefault="default_gen_return_address",
2419     invalid=False,
2420 )
2421
2422 Method(
2423     comment="""
2424 Implement the "info proc" command.
2425 """,
2426     type="void",
2427     name="info_proc",
2428     params=[("const char *", "args"), ("enum info_proc_what", "what")],
2429     predicate=True,
2430     invalid=True,
2431 )
2432
2433 Method(
2434     comment="""
2435 Implement the "info proc" command for core files.  Noe that there
2436 are two "info_proc"-like methods on gdbarch -- one for core files,
2437 one for live targets.
2438 """,
2439     type="void",
2440     name="core_info_proc",
2441     params=[("const char *", "args"), ("enum info_proc_what", "what")],
2442     predicate=True,
2443     invalid=True,
2444 )
2445
2446 Method(
2447     comment="""
2448 Iterate over all objfiles in the order that makes the most sense
2449 for the architecture to make global symbol searches.
2450
2451 CB is a callback function passed an objfile to be searched.  The iteration stops
2452 if this function returns nonzero.
2453
2454 If not NULL, CURRENT_OBJFILE corresponds to the objfile being
2455 inspected when the symbol search was requested.
2456 """,
2457     type="void",
2458     name="iterate_over_objfiles_in_search_order",
2459     params=[
2460         ("iterate_over_objfiles_in_search_order_cb_ftype", "cb"),
2461         ("struct objfile *", "current_objfile"),
2462     ],
2463     predefault="default_iterate_over_objfiles_in_search_order",
2464     invalid=False,
2465 )
2466
2467 Value(
2468     comment="""
2469 Ravenscar arch-dependent ops.
2470 """,
2471     type="struct ravenscar_arch_ops *",
2472     name="ravenscar_ops",
2473     predefault="NULL",
2474     invalid=False,
2475     printer="host_address_to_string (gdbarch->ravenscar_ops)",
2476 )
2477
2478 Method(
2479     comment="""
2480 Return non-zero if the instruction at ADDR is a call; zero otherwise.
2481 """,
2482     type="int",
2483     name="insn_is_call",
2484     params=[("CORE_ADDR", "addr")],
2485     predefault="default_insn_is_call",
2486     invalid=False,
2487 )
2488
2489 Method(
2490     comment="""
2491 Return non-zero if the instruction at ADDR is a return; zero otherwise.
2492 """,
2493     type="int",
2494     name="insn_is_ret",
2495     params=[("CORE_ADDR", "addr")],
2496     predefault="default_insn_is_ret",
2497     invalid=False,
2498 )
2499
2500 Method(
2501     comment="""
2502 Return non-zero if the instruction at ADDR is a jump; zero otherwise.
2503 """,
2504     type="int",
2505     name="insn_is_jump",
2506     params=[("CORE_ADDR", "addr")],
2507     predefault="default_insn_is_jump",
2508     invalid=False,
2509 )
2510
2511 Method(
2512     comment="""
2513 Return true if there's a program/permanent breakpoint planted in
2514 memory at ADDRESS, return false otherwise.
2515 """,
2516     type="bool",
2517     name="program_breakpoint_here_p",
2518     params=[("CORE_ADDR", "address")],
2519     predefault="default_program_breakpoint_here_p",
2520     invalid=False,
2521 )
2522
2523 Method(
2524     comment="""
2525 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
2526 Return 0 if *READPTR is already at the end of the buffer.
2527 Return -1 if there is insufficient buffer for a whole entry.
2528 Return 1 if an entry was read into *TYPEP and *VALP.
2529 """,
2530     type="int",
2531     name="auxv_parse",
2532     params=[
2533         ("const gdb_byte **", "readptr"),
2534         ("const gdb_byte *", "endptr"),
2535         ("CORE_ADDR *", "typep"),
2536         ("CORE_ADDR *", "valp"),
2537     ],
2538     predicate=True,
2539     invalid=True,
2540 )
2541
2542 Method(
2543     comment="""
2544 Print the description of a single auxv entry described by TYPE and VAL
2545 to FILE.
2546 """,
2547     type="void",
2548     name="print_auxv_entry",
2549     params=[("struct ui_file *", "file"), ("CORE_ADDR", "type"), ("CORE_ADDR", "val")],
2550     predefault="default_print_auxv_entry",
2551     invalid=False,
2552 )
2553
2554 Method(
2555     comment="""
2556 Find the address range of the current inferior's vsyscall/vDSO, and
2557 write it to *RANGE.  If the vsyscall's length can't be determined, a
2558 range with zero length is returned.  Returns true if the vsyscall is
2559 found, false otherwise.
2560 """,
2561     type="int",
2562     name="vsyscall_range",
2563     params=[("struct mem_range *", "range")],
2564     predefault="default_vsyscall_range",
2565     invalid=False,
2566 )
2567
2568 Function(
2569     comment="""
2570 Allocate SIZE bytes of PROT protected page aligned memory in inferior.
2571 PROT has GDB_MMAP_PROT_* bitmask format.
2572 Throw an error if it is not possible.  Returned address is always valid.
2573 """,
2574     type="CORE_ADDR",
2575     name="infcall_mmap",
2576     params=[("CORE_ADDR", "size"), ("unsigned", "prot")],
2577     predefault="default_infcall_mmap",
2578     invalid=False,
2579 )
2580
2581 Function(
2582     comment="""
2583 Deallocate SIZE bytes of memory at ADDR in inferior from gdbarch_infcall_mmap.
2584 Print a warning if it is not possible.
2585 """,
2586     type="void",
2587     name="infcall_munmap",
2588     params=[("CORE_ADDR", "addr"), ("CORE_ADDR", "size")],
2589     predefault="default_infcall_munmap",
2590     invalid=False,
2591 )
2592
2593 Method(
2594     comment="""
2595 Return string (caller has to use xfree for it) with options for GCC
2596 to produce code for this target, typically "-m64", "-m32" or "-m31".
2597 These options are put before CU's DW_AT_producer compilation options so that
2598 they can override it.
2599 """,
2600     type="std::string",
2601     name="gcc_target_options",
2602     params=[],
2603     predefault="default_gcc_target_options",
2604     invalid=False,
2605 )
2606
2607 Method(
2608     comment="""
2609 Return a regular expression that matches names used by this
2610 architecture in GNU configury triplets.  The result is statically
2611 allocated and must not be freed.  The default implementation simply
2612 returns the BFD architecture name, which is correct in nearly every
2613 case.
2614 """,
2615     type="const char *",
2616     name="gnu_triplet_regexp",
2617     params=[],
2618     predefault="default_gnu_triplet_regexp",
2619     invalid=False,
2620 )
2621
2622 Method(
2623     comment="""
2624 Return the size in 8-bit bytes of an addressable memory unit on this
2625 architecture.  This corresponds to the number of 8-bit bytes associated to
2626 each address in memory.
2627 """,
2628     type="int",
2629     name="addressable_memory_unit_size",
2630     params=[],
2631     predefault="default_addressable_memory_unit_size",
2632     invalid=False,
2633 )
2634
2635 Value(
2636     comment="""
2637 Functions for allowing a target to modify its disassembler options.
2638 """,
2639     type="const char *",
2640     name="disassembler_options_implicit",
2641     predefault="0",
2642     invalid=False,
2643     printer="pstring (gdbarch->disassembler_options_implicit)",
2644 )
2645
2646 Value(
2647     type="char **",
2648     name="disassembler_options",
2649     predefault="0",
2650     invalid=False,
2651     printer="pstring_ptr (gdbarch->disassembler_options)",
2652 )
2653
2654 Value(
2655     type="const disasm_options_and_args_t *",
2656     name="valid_disassembler_options",
2657     predefault="0",
2658     invalid=False,
2659     printer="host_address_to_string (gdbarch->valid_disassembler_options)",
2660 )
2661
2662 Method(
2663     comment="""
2664 Type alignment override method.  Return the architecture specific
2665 alignment required for TYPE.  If there is no special handling
2666 required for TYPE then return the value 0, GDB will then apply the
2667 default rules as laid out in gdbtypes.c:type_align.
2668 """,
2669     type="ULONGEST",
2670     name="type_align",
2671     params=[("struct type *", "type")],
2672     predefault="default_type_align",
2673     invalid=False,
2674 )
2675
2676 Function(
2677     comment="""
2678 Return a string containing any flags for the given PC in the given FRAME.
2679 """,
2680     type="std::string",
2681     name="get_pc_address_flags",
2682     params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
2683     predefault="default_get_pc_address_flags",
2684     invalid=False,
2685 )
2686
2687 Method(
2688     comment="""
2689 Read core file mappings
2690 """,
2691     type="void",
2692     name="read_core_file_mappings",
2693     params=[
2694         ("struct bfd *", "cbfd"),
2695         ("read_core_file_mappings_pre_loop_ftype", "pre_loop_cb"),
2696         ("read_core_file_mappings_loop_ftype", "loop_cb"),
2697     ],
2698     predefault="default_read_core_file_mappings",
2699     invalid=False,
2700 )
This page took 0.170986 seconds and 4 git commands to generate.