manual copyright year range of various GDB files to add 2023
[binutils-gdb.git] / gdb / gdbarch-components.py
blobca9c3bceb3dea728c1f8c7664c541bd55ba97388
1 # Dynamic architecture support for GDB, the GNU debugger.
3 # Copyright (C) 1998-2023 Free Software Foundation, Inc.
5 # This file is part of GDB.
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.
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.
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/>.
20 # How to add to gdbarch:
22 # There are four kinds of fields in gdbarch:
24 # * Info - you should never need this; it is only for things that are
25 # copied directly from the gdbarch_info.
27 # * Value - a variable.
29 # * Function - a function pointer.
31 # * Method - a function pointer, but the function takes a gdbarch as
32 # its first parameter.
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.
38 # All parameters are keyword-only. This is done to help catch typos.
40 # Some parameters are shared among all types (including Info):
42 # * "name" - required, the name of the field.
44 # * "type" - required, the type of the field. For functions and
45 # methods, this is the return type.
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.
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.
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.)
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.
63 # * "predefault", "postdefault", and "invalid" - These are used for
64 # the initialization and verification steps:
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.
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).
81 # In post-initialization / validation, there are several cases.
83 # * If "invalid" is False, or if the field specifies "predicate",
84 # validation is skipped. Otherwise, a validation step is emitted.
86 # * Otherwise, the validity is checked using the usual validation
87 # function (see above). If the field is considered valid, nothing is
88 # done.
90 # * Otherwise, the field's value is invalid. If there is a
91 # "postdefault", then the field is assigned that value.
93 # * Otherwise, the gdbarch will fail validation and gdb will crash.
95 # Function and Method share:
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.
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).
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'.
117 Info(
118 type="const struct bfd_arch_info *",
119 name="bfd_arch_info",
120 printer="gdbarch_bfd_arch_info (gdbarch)->printable_name",
123 Info(
124 type="enum bfd_endian",
125 name="byte_order",
128 Info(
129 type="enum bfd_endian",
130 name="byte_order_for_code",
133 Info(
134 type="enum gdb_osabi",
135 name="osabi",
138 Info(
139 type="const struct target_desc *",
140 name="target_desc",
141 printer="host_address_to_string (gdbarch->target_desc)",
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,
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,
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,
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,
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,
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)",
207 Value(
208 type="int",
209 name="half_bit",
210 predefault="2*TARGET_CHAR_BIT",
211 invalid=False,
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)",
222 Value(
223 type="int",
224 name="float_bit",
225 predefault="4*TARGET_CHAR_BIT",
226 invalid=False,
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)",
237 Value(
238 type="int",
239 name="double_bit",
240 predefault="8*TARGET_CHAR_BIT",
241 invalid=False,
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)",
252 Value(
253 type="int",
254 name="long_double_bit",
255 predefault="8*TARGET_CHAR_BIT",
256 invalid=False,
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)",
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,
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,
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,
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.
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.
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,
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,
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.
341 dwarf2_addr_size is not used for .eh_frame FDEs, which are generally
342 defined using the target's pointer size so far.
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,
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,
366 Function(
367 type="CORE_ADDR",
368 name="read_pc",
369 params=[("readable_regcache *", "regcache")],
370 predicate=True,
371 invalid=True,
374 Function(
375 type="void",
376 name="write_pc",
377 params=[("struct regcache *", "regcache"), ("CORE_ADDR", "val")],
378 predicate=True,
379 invalid=True,
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"),
395 predefault="legacy_virtual_frame_pointer",
396 invalid=False,
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"),
407 predicate=True,
408 invalid=True,
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,
425 Method(
426 type="void",
427 name="pseudo_register_write",
428 params=[
429 ("struct regcache *", "regcache"),
430 ("int", "cookednum"),
431 ("const gdb_byte *", "buf"),
433 predicate=True,
434 invalid=True,
437 Value(
438 type="int",
439 name="num_regs",
440 predefault="-1",
441 invalid=True,
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,
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,
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,
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,
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,
508 Value(
509 type="int",
510 name="pc_regnum",
511 predefault="-1",
512 invalid=False,
515 Value(
516 type="int",
517 name="ps_regnum",
518 predefault="-1",
519 invalid=False,
522 Value(
523 type="int",
524 name="fp0_regnum",
525 predefault="-1",
526 invalid=False,
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,
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,
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,
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,
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,
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,
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,
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,
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"),
645 predicate=True,
646 invalid=True,
649 Value(
650 type="enum call_dummy_location_type",
651 name="call_dummy_location",
652 predefault="AT_ENTRY_POINT",
653 invalid=False,
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"),
669 predicate=True,
670 invalid=True,
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,
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"),
693 predefault="default_print_registers_info",
694 invalid=False,
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"),
705 predefault="default_print_float_info",
706 invalid=False,
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"),
717 predicate=True,
718 invalid=True,
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,
733 Method(
734 type="int",
735 name="cannot_fetch_register",
736 params=[("int", "regnum")],
737 predefault="cannot_register_not",
738 invalid=False,
741 Method(
742 type="int",
743 name="cannot_store_register",
744 params=[("int", "regnum")],
745 predefault="cannot_register_not",
746 invalid=False,
749 Function(
750 comment="""
751 Determine the address where a longjmp will land and save this address
752 in PC. Return nonzero on success.
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,
763 Value(
764 type="int",
765 name="believe_pcc_promotion",
766 invalid=False,
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,
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"),
788 invalid=False,
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"),
800 invalid=False,
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"),
817 predefault="default_value_from_register",
818 invalid=False,
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,
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,
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,
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.
851 If READBUF is not NULL, extract the return value and save it in this buffer.
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"),
867 predicate=True,
868 invalid=True,
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".
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,
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,
901 Method(
902 type="CORE_ADDR",
903 name="skip_prologue",
904 params=[("CORE_ADDR", "ip")],
905 predefault="0",
906 invalid=True,
909 Method(
910 type="CORE_ADDR",
911 name="skip_main_prologue",
912 params=[("CORE_ADDR", "ip")],
913 predicate=True,
914 invalid=True,
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,
938 Function(
939 type="int",
940 name="inner_than",
941 params=[("CORE_ADDR", "lhs"), ("CORE_ADDR", "rhs")],
942 predefault="0",
943 invalid=True,
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,
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,
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,
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,
991 Method(
992 type="CORE_ADDR",
993 name="adjust_breakpoint_address",
994 params=[("CORE_ADDR", "bpaddr")],
995 predicate=True,
996 invalid=True,
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,
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,
1015 Value(
1016 type="CORE_ADDR",
1017 name="decr_pc_after_break",
1018 invalid=False,
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,
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,
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,
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,
1074 Value(
1075 type="CORE_ADDR",
1076 name="frame_args_skip",
1077 invalid=False,
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,
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,
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,
1108 Method(
1109 type="CORE_ADDR",
1110 name="frame_align",
1111 params=[("CORE_ADDR", "address")],
1112 predicate=True,
1113 invalid=True,
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,
1124 Value(
1125 type="int",
1126 name="frame_red_zone_size",
1127 invalid=False,
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,
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,
1157 Method(
1158 comment="""
1159 On some architectures, not all bits of a pointer are significant.
1160 On AArch64, for example, the top bits of a pointer may carry a "tag", which
1161 can be ignored by the kernel and the hardware. The "tag" can be regarded as
1162 additional data associated with the pointer, but it is not part of the address.
1164 Given a pointer for the architecture, this hook removes all the
1165 non-significant bits and sign-extends things as needed. It gets used to remove
1166 non-address bits from data pointers (for example, removing the AArch64 MTE tag
1167 bits from a pointer) and from code pointers (removing the AArch64 PAC signature
1168 from a pointer containing the return address).
1169 """,
1170 type="CORE_ADDR",
1171 name="remove_non_address_bits",
1172 params=[("CORE_ADDR", "pointer")],
1173 predefault="default_remove_non_address_bits",
1174 invalid=False,
1177 Method(
1178 comment="""
1179 Return a string representation of the memory tag TAG.
1180 """,
1181 type="std::string",
1182 name="memtag_to_string",
1183 params=[("struct value *", "tag")],
1184 predefault="default_memtag_to_string",
1185 invalid=False,
1188 Method(
1189 comment="""
1190 Return true if ADDRESS contains a tag and false otherwise. ADDRESS
1191 must be either a pointer or a reference type.
1192 """,
1193 type="bool",
1194 name="tagged_address_p",
1195 params=[("struct value *", "address")],
1196 predefault="default_tagged_address_p",
1197 invalid=False,
1200 Method(
1201 comment="""
1202 Return true if the tag from ADDRESS matches the memory tag for that
1203 particular address. Return false otherwise.
1204 """,
1205 type="bool",
1206 name="memtag_matches_p",
1207 params=[("struct value *", "address")],
1208 predefault="default_memtag_matches_p",
1209 invalid=False,
1212 Method(
1213 comment="""
1214 Set the tags of type TAG_TYPE, for the memory address range
1215 [ADDRESS, ADDRESS + LENGTH) to TAGS.
1216 Return true if successful and false otherwise.
1217 """,
1218 type="bool",
1219 name="set_memtags",
1220 params=[
1221 ("struct value *", "address"),
1222 ("size_t", "length"),
1223 ("const gdb::byte_vector &", "tags"),
1224 ("memtag_type", "tag_type"),
1226 predefault="default_set_memtags",
1227 invalid=False,
1230 Method(
1231 comment="""
1232 Return the tag of type TAG_TYPE associated with the memory address ADDRESS,
1233 assuming ADDRESS is tagged.
1234 """,
1235 type="struct value *",
1236 name="get_memtag",
1237 params=[("struct value *", "address"), ("memtag_type", "tag_type")],
1238 predefault="default_get_memtag",
1239 invalid=False,
1242 Value(
1243 comment="""
1244 memtag_granule_size is the size of the allocation tag granule, for
1245 architectures that support memory tagging.
1246 This is 0 for architectures that do not support memory tagging.
1247 For a non-zero value, this represents the number of bytes of memory per tag.
1248 """,
1249 type="CORE_ADDR",
1250 name="memtag_granule_size",
1251 invalid=False,
1254 Function(
1255 comment="""
1256 FIXME/cagney/2001-01-18: This should be split in two. A target method that
1257 indicates if the target needs software single step. An ISA method to
1258 implement it.
1260 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the
1261 target can single step. If not, then implement single step using breakpoints.
1263 Return a vector of addresses on which the software single step
1264 breakpoints should be inserted. NULL means software single step is
1265 not used.
1266 Multiple breakpoints may be inserted for some instructions such as
1267 conditional branch. However, each implementation must always evaluate
1268 the condition and only put the breakpoint at the branch destination if
1269 the condition is true, so that we ensure forward progress when stepping
1270 past a conditional branch to self.
1271 """,
1272 type="std::vector<CORE_ADDR>",
1273 name="software_single_step",
1274 params=[("struct regcache *", "regcache")],
1275 predicate=True,
1276 invalid=True,
1279 Method(
1280 comment="""
1281 Return non-zero if the processor is executing a delay slot and a
1282 further single-step is needed before the instruction finishes.
1283 """,
1284 type="int",
1285 name="single_step_through_delay",
1286 params=[("frame_info_ptr", "frame")],
1287 predicate=True,
1288 invalid=True,
1291 Function(
1292 comment="""
1293 FIXME: cagney/2003-08-28: Need to find a better way of selecting the
1294 disassembler. Perhaps objdump can handle it?
1295 """,
1296 type="int",
1297 name="print_insn",
1298 params=[("bfd_vma", "vma"), ("struct disassemble_info *", "info")],
1299 predefault="default_print_insn",
1300 invalid=False,
1303 Function(
1304 type="CORE_ADDR",
1305 name="skip_trampoline_code",
1306 params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
1307 predefault="generic_skip_trampoline_code",
1308 invalid=False,
1311 Value(
1312 comment="Vtable of solib operations functions.",
1313 type="const struct target_so_ops *",
1314 name="so_ops",
1315 postdefault="&solib_target_so_ops",
1316 printer="host_address_to_string (gdbarch->so_ops)",
1319 Method(
1320 comment="""
1321 If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
1322 evaluates non-zero, this is the address where the debugger will place
1323 a step-resume breakpoint to get us past the dynamic linker.
1324 """,
1325 type="CORE_ADDR",
1326 name="skip_solib_resolver",
1327 params=[("CORE_ADDR", "pc")],
1328 predefault="generic_skip_solib_resolver",
1329 invalid=False,
1332 Method(
1333 comment="""
1334 Some systems also have trampoline code for returning from shared libs.
1335 """,
1336 type="int",
1337 name="in_solib_return_trampoline",
1338 params=[("CORE_ADDR", "pc"), ("const char *", "name")],
1339 predefault="generic_in_solib_return_trampoline",
1340 invalid=False,
1343 Method(
1344 comment="""
1345 Return true if PC lies inside an indirect branch thunk.
1346 """,
1347 type="bool",
1348 name="in_indirect_branch_thunk",
1349 params=[("CORE_ADDR", "pc")],
1350 predefault="default_in_indirect_branch_thunk",
1351 invalid=False,
1354 Method(
1355 comment="""
1356 A target might have problems with watchpoints as soon as the stack
1357 frame of the current function has been destroyed. This mostly happens
1358 as the first action in a function's epilogue. stack_frame_destroyed_p()
1359 is defined to return a non-zero value if either the given addr is one
1360 instruction after the stack destroying instruction up to the trailing
1361 return instruction or if we can figure out that the stack frame has
1362 already been invalidated regardless of the value of addr. Targets
1363 which don't suffer from that problem could just let this functionality
1364 untouched.
1365 """,
1366 type="int",
1367 name="stack_frame_destroyed_p",
1368 params=[("CORE_ADDR", "addr")],
1369 predefault="generic_stack_frame_destroyed_p",
1370 invalid=False,
1373 Function(
1374 comment="""
1375 Process an ELF symbol in the minimal symbol table in a backend-specific
1376 way. Normally this hook is supposed to do nothing, however if required,
1377 then this hook can be used to apply tranformations to symbols that are
1378 considered special in some way. For example the MIPS backend uses it
1379 to interpret `st_other' information to mark compressed code symbols so
1380 that they can be treated in the appropriate manner in the processing of
1381 the main symbol table and DWARF-2 records.
1382 """,
1383 type="void",
1384 name="elf_make_msymbol_special",
1385 params=[("asymbol *", "sym"), ("struct minimal_symbol *", "msym")],
1386 predicate=True,
1387 invalid=True,
1390 Function(
1391 type="void",
1392 name="coff_make_msymbol_special",
1393 params=[("int", "val"), ("struct minimal_symbol *", "msym")],
1394 predefault="default_coff_make_msymbol_special",
1395 invalid=False,
1398 Function(
1399 comment="""
1400 Process a symbol in the main symbol table in a backend-specific way.
1401 Normally this hook is supposed to do nothing, however if required,
1402 then this hook can be used to apply tranformations to symbols that
1403 are considered special in some way. This is currently used by the
1404 MIPS backend to make sure compressed code symbols have the ISA bit
1405 set. This in turn is needed for symbol values seen in GDB to match
1406 the values used at the runtime by the program itself, for function
1407 and label references.
1408 """,
1409 type="void",
1410 name="make_symbol_special",
1411 params=[("struct symbol *", "sym"), ("struct objfile *", "objfile")],
1412 predefault="default_make_symbol_special",
1413 invalid=False,
1416 Function(
1417 comment="""
1418 Adjust the address retrieved from a DWARF-2 record other than a line
1419 entry in a backend-specific way. Normally this hook is supposed to
1420 return the address passed unchanged, however if that is incorrect for
1421 any reason, then this hook can be used to fix the address up in the
1422 required manner. This is currently used by the MIPS backend to make
1423 sure addresses in FDE, range records, etc. referring to compressed
1424 code have the ISA bit set, matching line information and the symbol
1425 table.
1426 """,
1427 type="CORE_ADDR",
1428 name="adjust_dwarf2_addr",
1429 params=[("CORE_ADDR", "pc")],
1430 predefault="default_adjust_dwarf2_addr",
1431 invalid=False,
1434 Function(
1435 comment="""
1436 Adjust the address updated by a line entry in a backend-specific way.
1437 Normally this hook is supposed to return the address passed unchanged,
1438 however in the case of inconsistencies in these records, this hook can
1439 be used to fix them up in the required manner. This is currently used
1440 by the MIPS backend to make sure all line addresses in compressed code
1441 are presented with the ISA bit set, which is not always the case. This
1442 in turn ensures breakpoint addresses are correctly matched against the
1443 stop PC.
1444 """,
1445 type="CORE_ADDR",
1446 name="adjust_dwarf2_line",
1447 params=[("CORE_ADDR", "addr"), ("int", "rel")],
1448 predefault="default_adjust_dwarf2_line",
1449 invalid=False,
1452 Value(
1453 type="int",
1454 name="cannot_step_breakpoint",
1455 predefault="0",
1456 invalid=False,
1459 Value(
1460 comment="""
1461 See comment in target.h about continuable, steppable and
1462 non-steppable watchpoints.
1463 """,
1464 type="int",
1465 name="have_nonsteppable_watchpoint",
1466 predefault="0",
1467 invalid=False,
1470 Function(
1471 type="type_instance_flags",
1472 name="address_class_type_flags",
1473 params=[("int", "byte_size"), ("int", "dwarf2_addr_class")],
1474 predicate=True,
1475 invalid=True,
1478 Method(
1479 type="const char *",
1480 name="address_class_type_flags_to_name",
1481 params=[("type_instance_flags", "type_flags")],
1482 predicate=True,
1483 invalid=True,
1486 Method(
1487 comment="""
1488 Execute vendor-specific DWARF Call Frame Instruction. OP is the instruction.
1489 FS are passed from the generic execute_cfa_program function.
1490 """,
1491 type="bool",
1492 name="execute_dwarf_cfa_vendor_op",
1493 params=[("gdb_byte", "op"), ("struct dwarf2_frame_state *", "fs")],
1494 predefault="default_execute_dwarf_cfa_vendor_op",
1495 invalid=False,
1498 Method(
1499 comment="""
1500 Return the appropriate type_flags for the supplied address class.
1501 This function should return true if the address class was recognized and
1502 type_flags was set, false otherwise.
1503 """,
1504 type="bool",
1505 name="address_class_name_to_type_flags",
1506 params=[("const char *", "name"), ("type_instance_flags *", "type_flags_ptr")],
1507 predicate=True,
1508 invalid=True,
1511 Method(
1512 comment="""
1513 Is a register in a group
1514 """,
1515 type="int",
1516 name="register_reggroup_p",
1517 params=[("int", "regnum"), ("const struct reggroup *", "reggroup")],
1518 predefault="default_register_reggroup_p",
1519 invalid=False,
1522 Function(
1523 comment="""
1524 Fetch the pointer to the ith function argument.
1525 """,
1526 type="CORE_ADDR",
1527 name="fetch_pointer_argument",
1528 params=[
1529 ("frame_info_ptr", "frame"),
1530 ("int", "argi"),
1531 ("struct type *", "type"),
1533 predicate=True,
1534 invalid=True,
1537 Method(
1538 comment="""
1539 Iterate over all supported register notes in a core file. For each
1540 supported register note section, the iterator must call CB and pass
1541 CB_DATA unchanged. If REGCACHE is not NULL, the iterator can limit
1542 the supported register note sections based on the current register
1543 values. Otherwise it should enumerate all supported register note
1544 sections.
1545 """,
1546 type="void",
1547 name="iterate_over_regset_sections",
1548 params=[
1549 ("iterate_over_regset_sections_cb *", "cb"),
1550 ("void *", "cb_data"),
1551 ("const struct regcache *", "regcache"),
1553 predicate=True,
1554 invalid=True,
1557 Method(
1558 comment="""
1559 Create core file notes
1560 """,
1561 type="gdb::unique_xmalloc_ptr<char>",
1562 name="make_corefile_notes",
1563 params=[("bfd *", "obfd"), ("int *", "note_size")],
1564 predicate=True,
1565 invalid=True,
1568 Method(
1569 comment="""
1570 Find core file memory regions
1571 """,
1572 type="int",
1573 name="find_memory_regions",
1574 params=[("find_memory_region_ftype", "func"), ("void *", "data")],
1575 predicate=True,
1576 invalid=True,
1579 Method(
1580 comment="""
1581 Given a bfd OBFD, segment ADDRESS and SIZE, create a memory tag section to be dumped to a core file
1582 """,
1583 type="asection *",
1584 name="create_memtag_section",
1585 params=[("bfd *", "obfd"), ("CORE_ADDR", "address"), ("size_t", "size")],
1586 predicate=True,
1587 invalid=True,
1590 Method(
1591 comment="""
1592 Given a memory tag section OSEC, fill OSEC's contents with the appropriate tag data
1593 """,
1594 type="bool",
1595 name="fill_memtag_section",
1596 params=[("asection *", "osec")],
1597 predicate=True,
1598 invalid=True,
1601 Method(
1602 comment="""
1603 Decode a memory tag SECTION and return the tags of type TYPE contained in
1604 the memory range [ADDRESS, ADDRESS + LENGTH).
1605 If no tags were found, return an empty vector.
1606 """,
1607 type="gdb::byte_vector",
1608 name="decode_memtag_section",
1609 params=[
1610 ("bfd_section *", "section"),
1611 ("int", "type"),
1612 ("CORE_ADDR", "address"),
1613 ("size_t", "length"),
1615 predicate=True,
1616 invalid=True,
1619 Method(
1620 comment="""
1621 Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
1622 core file into buffer READBUF with length LEN. Return the number of bytes read
1623 (zero indicates failure).
1624 failed, otherwise, return the red length of READBUF.
1625 """,
1626 type="ULONGEST",
1627 name="core_xfer_shared_libraries",
1628 params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1629 predicate=True,
1630 invalid=True,
1633 Method(
1634 comment="""
1635 Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
1636 libraries list from core file into buffer READBUF with length LEN.
1637 Return the number of bytes read (zero indicates failure).
1638 """,
1639 type="ULONGEST",
1640 name="core_xfer_shared_libraries_aix",
1641 params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1642 predicate=True,
1643 invalid=True,
1646 Method(
1647 comment="""
1648 How the core target converts a PTID from a core file to a string.
1649 """,
1650 type="std::string",
1651 name="core_pid_to_str",
1652 params=[("ptid_t", "ptid")],
1653 predicate=True,
1654 invalid=True,
1657 Method(
1658 comment="""
1659 How the core target extracts the name of a thread from a core file.
1660 """,
1661 type="const char *",
1662 name="core_thread_name",
1663 params=[("struct thread_info *", "thr")],
1664 predicate=True,
1665 invalid=True,
1668 Method(
1669 comment="""
1670 Read offset OFFSET of TARGET_OBJECT_SIGNAL_INFO signal information
1671 from core file into buffer READBUF with length LEN. Return the number
1672 of bytes read (zero indicates EOF, a negative value indicates failure).
1673 """,
1674 type="LONGEST",
1675 name="core_xfer_siginfo",
1676 params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1677 predicate=True,
1678 invalid=True,
1681 Value(
1682 comment="""
1683 BFD target to use when generating a core file.
1684 """,
1685 type="const char *",
1686 name="gcore_bfd_target",
1687 predicate=True,
1688 predefault="0",
1689 invalid=True,
1690 printer="pstring (gdbarch->gcore_bfd_target)",
1693 Value(
1694 comment="""
1695 If the elements of C++ vtables are in-place function descriptors rather
1696 than normal function pointers (which may point to code or a descriptor),
1697 set this to one.
1698 """,
1699 type="int",
1700 name="vtable_function_descriptors",
1701 predefault="0",
1702 invalid=False,
1705 Value(
1706 comment="""
1707 Set if the least significant bit of the delta is used instead of the least
1708 significant bit of the pfn for pointers to virtual member functions.
1709 """,
1710 type="int",
1711 name="vbit_in_delta",
1712 predefault="0",
1713 invalid=False,
1716 Function(
1717 comment="""
1718 Advance PC to next instruction in order to skip a permanent breakpoint.
1719 """,
1720 type="void",
1721 name="skip_permanent_breakpoint",
1722 params=[("struct regcache *", "regcache")],
1723 predefault="default_skip_permanent_breakpoint",
1724 invalid=False,
1727 Value(
1728 comment="""
1729 The maximum length of an instruction on this architecture in bytes.
1730 """,
1731 type="ULONGEST",
1732 name="max_insn_length",
1733 predicate=True,
1734 predefault="0",
1735 invalid=True,
1738 Method(
1739 comment="""
1740 Copy the instruction at FROM to TO, and make any adjustments
1741 necessary to single-step it at that address.
1743 REGS holds the state the thread's registers will have before
1744 executing the copied instruction; the PC in REGS will refer to FROM,
1745 not the copy at TO. The caller should update it to point at TO later.
1747 Return a pointer to data of the architecture's choice to be passed
1748 to gdbarch_displaced_step_fixup.
1750 For a general explanation of displaced stepping and how GDB uses it,
1751 see the comments in infrun.c.
1753 The TO area is only guaranteed to have space for
1754 gdbarch_max_insn_length (arch) bytes, so this function must not
1755 write more bytes than that to that area.
1757 If you do not provide this function, GDB assumes that the
1758 architecture does not support displaced stepping.
1760 If the instruction cannot execute out of line, return NULL. The
1761 core falls back to stepping past the instruction in-line instead in
1762 that case.
1763 """,
1764 type="displaced_step_copy_insn_closure_up",
1765 name="displaced_step_copy_insn",
1766 params=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")],
1767 predicate=True,
1768 invalid=True,
1771 Method(
1772 comment="""
1773 Return true if GDB should use hardware single-stepping to execute a displaced
1774 step instruction. If false, GDB will simply restart execution at the
1775 displaced instruction location, and it is up to the target to ensure GDB will
1776 receive control again (e.g. by placing a software breakpoint instruction into
1777 the displaced instruction buffer).
1779 The default implementation returns false on all targets that provide a
1780 gdbarch_software_single_step routine, and true otherwise.
1781 """,
1782 type="bool",
1783 name="displaced_step_hw_singlestep",
1784 params=[],
1785 predefault="default_displaced_step_hw_singlestep",
1786 invalid=False,
1789 Method(
1790 comment="""
1791 Fix up the state resulting from successfully single-stepping a
1792 displaced instruction, to give the result we would have gotten from
1793 stepping the instruction in its original location.
1795 REGS is the register state resulting from single-stepping the
1796 displaced instruction.
1798 CLOSURE is the result from the matching call to
1799 gdbarch_displaced_step_copy_insn.
1801 If you provide gdbarch_displaced_step_copy_insn.but not this
1802 function, then GDB assumes that no fixup is needed after
1803 single-stepping the instruction.
1805 For a general explanation of displaced stepping and how GDB uses it,
1806 see the comments in infrun.c.
1807 """,
1808 type="void",
1809 name="displaced_step_fixup",
1810 params=[
1811 ("struct displaced_step_copy_insn_closure *", "closure"),
1812 ("CORE_ADDR", "from"),
1813 ("CORE_ADDR", "to"),
1814 ("struct regcache *", "regs"),
1816 predicate=True,
1817 predefault="NULL",
1818 invalid=True,
1821 Method(
1822 comment="""
1823 Prepare THREAD for it to displaced step the instruction at its current PC.
1825 Throw an exception if any unexpected error happens.
1826 """,
1827 type="displaced_step_prepare_status",
1828 name="displaced_step_prepare",
1829 params=[("thread_info *", "thread"), ("CORE_ADDR &", "displaced_pc")],
1830 predicate=True,
1831 invalid=True,
1834 Method(
1835 comment="""
1836 Clean up after a displaced step of THREAD.
1837 """,
1838 type="displaced_step_finish_status",
1839 name="displaced_step_finish",
1840 params=[("thread_info *", "thread"), ("gdb_signal", "sig")],
1841 predefault="NULL",
1842 invalid="(! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)",
1845 Function(
1846 comment="""
1847 Return the closure associated to the displaced step buffer that is at ADDR.
1848 """,
1849 type="const displaced_step_copy_insn_closure *",
1850 name="displaced_step_copy_insn_closure_by_addr",
1851 params=[("inferior *", "inf"), ("CORE_ADDR", "addr")],
1852 predicate=True,
1853 invalid=True,
1856 Function(
1857 comment="""
1858 PARENT_INF has forked and CHILD_PTID is the ptid of the child. Restore the
1859 contents of all displaced step buffers in the child's address space.
1860 """,
1861 type="void",
1862 name="displaced_step_restore_all_in_ptid",
1863 params=[("inferior *", "parent_inf"), ("ptid_t", "child_ptid")],
1864 invalid=False,
1867 Method(
1868 comment="""
1869 Relocate an instruction to execute at a different address. OLDLOC
1870 is the address in the inferior memory where the instruction to
1871 relocate is currently at. On input, TO points to the destination
1872 where we want the instruction to be copied (and possibly adjusted)
1873 to. On output, it points to one past the end of the resulting
1874 instruction(s). The effect of executing the instruction at TO shall
1875 be the same as if executing it at FROM. For example, call
1876 instructions that implicitly push the return address on the stack
1877 should be adjusted to return to the instruction after OLDLOC;
1878 relative branches, and other PC-relative instructions need the
1879 offset adjusted; etc.
1880 """,
1881 type="void",
1882 name="relocate_instruction",
1883 params=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")],
1884 predicate=True,
1885 predefault="NULL",
1886 invalid=True,
1889 Function(
1890 comment="""
1891 Refresh overlay mapped state for section OSECT.
1892 """,
1893 type="void",
1894 name="overlay_update",
1895 params=[("struct obj_section *", "osect")],
1896 predicate=True,
1897 invalid=True,
1900 Method(
1901 type="const struct target_desc *",
1902 name="core_read_description",
1903 params=[("struct target_ops *", "target"), ("bfd *", "abfd")],
1904 predicate=True,
1905 invalid=True,
1908 Value(
1909 comment="""
1910 Set if the address in N_SO or N_FUN stabs may be zero.
1911 """,
1912 type="int",
1913 name="sofun_address_maybe_missing",
1914 predefault="0",
1915 invalid=False,
1918 Method(
1919 comment="""
1920 Parse the instruction at ADDR storing in the record execution log
1921 the registers REGCACHE and memory ranges that will be affected when
1922 the instruction executes, along with their current values.
1923 Return -1 if something goes wrong, 0 otherwise.
1924 """,
1925 type="int",
1926 name="process_record",
1927 params=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
1928 predicate=True,
1929 invalid=True,
1932 Method(
1933 comment="""
1934 Save process state after a signal.
1935 Return -1 if something goes wrong, 0 otherwise.
1936 """,
1937 type="int",
1938 name="process_record_signal",
1939 params=[("struct regcache *", "regcache"), ("enum gdb_signal", "signal")],
1940 predicate=True,
1941 invalid=True,
1944 Method(
1945 comment="""
1946 Signal translation: translate inferior's signal (target's) number
1947 into GDB's representation. The implementation of this method must
1948 be host independent. IOW, don't rely on symbols of the NAT_FILE
1949 header (the nm-*.h files), the host <signal.h> header, or similar
1950 headers. This is mainly used when cross-debugging core files ---
1951 "Live" targets hide the translation behind the target interface
1952 (target_wait, target_resume, etc.).
1953 """,
1954 type="enum gdb_signal",
1955 name="gdb_signal_from_target",
1956 params=[("int", "signo")],
1957 predicate=True,
1958 invalid=True,
1961 Method(
1962 comment="""
1963 Signal translation: translate the GDB's internal signal number into
1964 the inferior's signal (target's) representation. The implementation
1965 of this method must be host independent. IOW, don't rely on symbols
1966 of the NAT_FILE header (the nm-*.h files), the host <signal.h>
1967 header, or similar headers.
1968 Return the target signal number if found, or -1 if the GDB internal
1969 signal number is invalid.
1970 """,
1971 type="int",
1972 name="gdb_signal_to_target",
1973 params=[("enum gdb_signal", "signal")],
1974 predicate=True,
1975 invalid=True,
1978 Method(
1979 comment="""
1980 Extra signal info inspection.
1982 Return a type suitable to inspect extra signal information.
1983 """,
1984 type="struct type *",
1985 name="get_siginfo_type",
1986 params=[],
1987 predicate=True,
1988 invalid=True,
1991 Method(
1992 comment="""
1993 Record architecture-specific information from the symbol table.
1994 """,
1995 type="void",
1996 name="record_special_symbol",
1997 params=[("struct objfile *", "objfile"), ("asymbol *", "sym")],
1998 predicate=True,
1999 invalid=True,
2002 Method(
2003 comment="""
2004 Function for the 'catch syscall' feature.
2005 Get architecture-specific system calls information from registers.
2006 """,
2007 type="LONGEST",
2008 name="get_syscall_number",
2009 params=[("thread_info *", "thread")],
2010 predicate=True,
2011 invalid=True,
2014 Value(
2015 comment="""
2016 The filename of the XML syscall for this architecture.
2017 """,
2018 type="const char *",
2019 name="xml_syscall_file",
2020 predefault="0",
2021 invalid=False,
2022 printer="pstring (gdbarch->xml_syscall_file)",
2025 Value(
2026 comment="""
2027 Information about system calls from this architecture
2028 """,
2029 type="struct syscalls_info *",
2030 name="syscalls_info",
2031 predefault="0",
2032 invalid=False,
2033 printer="host_address_to_string (gdbarch->syscalls_info)",
2036 Value(
2037 comment="""
2038 SystemTap related fields and functions.
2039 A NULL-terminated array of prefixes used to mark an integer constant
2040 on the architecture's assembly.
2041 For example, on x86 integer constants are written as:
2043 $10 ;; integer constant 10
2045 in this case, this prefix would be the character `$'.
2046 """,
2047 type="const char *const *",
2048 name="stap_integer_prefixes",
2049 predefault="0",
2050 invalid=False,
2051 printer="pstring_list (gdbarch->stap_integer_prefixes)",
2054 Value(
2055 comment="""
2056 A NULL-terminated array of suffixes used to mark an integer constant
2057 on the architecture's assembly.
2058 """,
2059 type="const char *const *",
2060 name="stap_integer_suffixes",
2061 predefault="0",
2062 invalid=False,
2063 printer="pstring_list (gdbarch->stap_integer_suffixes)",
2066 Value(
2067 comment="""
2068 A NULL-terminated array of prefixes used to mark a register name on
2069 the architecture's assembly.
2070 For example, on x86 the register name is written as:
2072 %eax ;; register eax
2074 in this case, this prefix would be the character `%'.
2075 """,
2076 type="const char *const *",
2077 name="stap_register_prefixes",
2078 predefault="0",
2079 invalid=False,
2080 printer="pstring_list (gdbarch->stap_register_prefixes)",
2083 Value(
2084 comment="""
2085 A NULL-terminated array of suffixes used to mark a register name on
2086 the architecture's assembly.
2087 """,
2088 type="const char *const *",
2089 name="stap_register_suffixes",
2090 predefault="0",
2091 invalid=False,
2092 printer="pstring_list (gdbarch->stap_register_suffixes)",
2095 Value(
2096 comment="""
2097 A NULL-terminated array of prefixes used to mark a register
2098 indirection on the architecture's assembly.
2099 For example, on x86 the register indirection is written as:
2101 (%eax) ;; indirecting eax
2103 in this case, this prefix would be the charater `('.
2105 Please note that we use the indirection prefix also for register
2106 displacement, e.g., `4(%eax)' on x86.
2107 """,
2108 type="const char *const *",
2109 name="stap_register_indirection_prefixes",
2110 predefault="0",
2111 invalid=False,
2112 printer="pstring_list (gdbarch->stap_register_indirection_prefixes)",
2115 Value(
2116 comment="""
2117 A NULL-terminated array of suffixes used to mark a register
2118 indirection on the architecture's assembly.
2119 For example, on x86 the register indirection is written as:
2121 (%eax) ;; indirecting eax
2123 in this case, this prefix would be the charater `)'.
2125 Please note that we use the indirection suffix also for register
2126 displacement, e.g., `4(%eax)' on x86.
2127 """,
2128 type="const char *const *",
2129 name="stap_register_indirection_suffixes",
2130 predefault="0",
2131 invalid=False,
2132 printer="pstring_list (gdbarch->stap_register_indirection_suffixes)",
2135 Value(
2136 comment="""
2137 Prefix(es) used to name a register using GDB's nomenclature.
2139 For example, on PPC a register is represented by a number in the assembly
2140 language (e.g., `10' is the 10th general-purpose register). However,
2141 inside GDB this same register has an `r' appended to its name, so the 10th
2142 register would be represented as `r10' internally.
2143 """,
2144 type="const char *",
2145 name="stap_gdb_register_prefix",
2146 predefault="0",
2147 invalid=False,
2148 printer="pstring (gdbarch->stap_gdb_register_prefix)",
2151 Value(
2152 comment="""
2153 Suffix used to name a register using GDB's nomenclature.
2154 """,
2155 type="const char *",
2156 name="stap_gdb_register_suffix",
2157 predefault="0",
2158 invalid=False,
2159 printer="pstring (gdbarch->stap_gdb_register_suffix)",
2162 Method(
2163 comment="""
2164 Check if S is a single operand.
2166 Single operands can be:
2167 - Literal integers, e.g. `$10' on x86
2168 - Register access, e.g. `%eax' on x86
2169 - Register indirection, e.g. `(%eax)' on x86
2170 - Register displacement, e.g. `4(%eax)' on x86
2172 This function should check for these patterns on the string
2173 and return 1 if some were found, or zero otherwise. Please try to match
2174 as much info as you can from the string, i.e., if you have to match
2175 something like `(%', do not match just the `('.
2176 """,
2177 type="int",
2178 name="stap_is_single_operand",
2179 params=[("const char *", "s")],
2180 predicate=True,
2181 invalid=True,
2184 Method(
2185 comment="""
2186 Function used to handle a "special case" in the parser.
2188 A "special case" is considered to be an unknown token, i.e., a token
2189 that the parser does not know how to parse. A good example of special
2190 case would be ARM's register displacement syntax:
2192 [R0, #4] ;; displacing R0 by 4
2194 Since the parser assumes that a register displacement is of the form:
2196 <number> <indirection_prefix> <register_name> <indirection_suffix>
2198 it means that it will not be able to recognize and parse this odd syntax.
2199 Therefore, we should add a special case function that will handle this token.
2201 This function should generate the proper expression form of the expression
2202 using GDB's internal expression mechanism (e.g., `write_exp_elt_opcode'
2203 and so on). It should also return 1 if the parsing was successful, or zero
2204 if the token was not recognized as a special token (in this case, returning
2205 zero means that the special parser is deferring the parsing to the generic
2206 parser), and should advance the buffer pointer (p->arg).
2207 """,
2208 type="expr::operation_up",
2209 name="stap_parse_special_token",
2210 params=[("struct stap_parse_info *", "p")],
2211 predicate=True,
2212 invalid=True,
2215 Method(
2216 comment="""
2217 Perform arch-dependent adjustments to a register name.
2219 In very specific situations, it may be necessary for the register
2220 name present in a SystemTap probe's argument to be handled in a
2221 special way. For example, on i386, GCC may over-optimize the
2222 register allocation and use smaller registers than necessary. In
2223 such cases, the client that is reading and evaluating the SystemTap
2224 probe (ourselves) will need to actually fetch values from the wider
2225 version of the register in question.
2227 To illustrate the example, consider the following probe argument
2228 (i386):
2230 4@%ax
2232 This argument says that its value can be found at the %ax register,
2233 which is a 16-bit register. However, the argument's prefix says
2234 that its type is "uint32_t", which is 32-bit in size. Therefore, in
2235 this case, GDB should actually fetch the probe's value from register
2236 %eax, not %ax. In this scenario, this function would actually
2237 replace the register name from %ax to %eax.
2239 The rationale for this can be found at PR breakpoints/24541.
2240 """,
2241 type="std::string",
2242 name="stap_adjust_register",
2243 params=[
2244 ("struct stap_parse_info *", "p"),
2245 ("const std::string &", "regname"),
2246 ("int", "regnum"),
2248 predicate=True,
2249 invalid=True,
2252 Method(
2253 comment="""
2254 DTrace related functions.
2255 The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
2256 NARG must be >= 0.
2257 """,
2258 type="expr::operation_up",
2259 name="dtrace_parse_probe_argument",
2260 params=[("int", "narg")],
2261 predicate=True,
2262 invalid=True,
2265 Method(
2266 comment="""
2267 True if the given ADDR does not contain the instruction sequence
2268 corresponding to a disabled DTrace is-enabled probe.
2269 """,
2270 type="int",
2271 name="dtrace_probe_is_enabled",
2272 params=[("CORE_ADDR", "addr")],
2273 predicate=True,
2274 invalid=True,
2277 Method(
2278 comment="""
2279 Enable a DTrace is-enabled probe at ADDR.
2280 """,
2281 type="void",
2282 name="dtrace_enable_probe",
2283 params=[("CORE_ADDR", "addr")],
2284 predicate=True,
2285 invalid=True,
2288 Method(
2289 comment="""
2290 Disable a DTrace is-enabled probe at ADDR.
2291 """,
2292 type="void",
2293 name="dtrace_disable_probe",
2294 params=[("CORE_ADDR", "addr")],
2295 predicate=True,
2296 invalid=True,
2299 Value(
2300 comment="""
2301 True if the list of shared libraries is one and only for all
2302 processes, as opposed to a list of shared libraries per inferior.
2303 This usually means that all processes, although may or may not share
2304 an address space, will see the same set of symbols at the same
2305 addresses.
2306 """,
2307 type="int",
2308 name="has_global_solist",
2309 predefault="0",
2310 invalid=False,
2313 Value(
2314 comment="""
2315 On some targets, even though each inferior has its own private
2316 address space, the debug interface takes care of making breakpoints
2317 visible to all address spaces automatically. For such cases,
2318 this property should be set to true.
2319 """,
2320 type="int",
2321 name="has_global_breakpoints",
2322 predefault="0",
2323 invalid=False,
2326 Method(
2327 comment="""
2328 True if inferiors share an address space (e.g., uClinux).
2329 """,
2330 type="int",
2331 name="has_shared_address_space",
2332 params=[],
2333 predefault="default_has_shared_address_space",
2334 invalid=False,
2337 Method(
2338 comment="""
2339 True if a fast tracepoint can be set at an address.
2340 """,
2341 type="int",
2342 name="fast_tracepoint_valid_at",
2343 params=[("CORE_ADDR", "addr"), ("std::string *", "msg")],
2344 predefault="default_fast_tracepoint_valid_at",
2345 invalid=False,
2348 Method(
2349 comment="""
2350 Guess register state based on tracepoint location. Used for tracepoints
2351 where no registers have been collected, but there's only one location,
2352 allowing us to guess the PC value, and perhaps some other registers.
2353 On entry, regcache has all registers marked as unavailable.
2354 """,
2355 type="void",
2356 name="guess_tracepoint_registers",
2357 params=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
2358 predefault="default_guess_tracepoint_registers",
2359 invalid=False,
2362 Function(
2363 comment="""
2364 Return the "auto" target charset.
2365 """,
2366 type="const char *",
2367 name="auto_charset",
2368 params=[],
2369 predefault="default_auto_charset",
2370 invalid=False,
2373 Function(
2374 comment="""
2375 Return the "auto" target wide charset.
2376 """,
2377 type="const char *",
2378 name="auto_wide_charset",
2379 params=[],
2380 predefault="default_auto_wide_charset",
2381 invalid=False,
2384 Value(
2385 comment="""
2386 If non-empty, this is a file extension that will be opened in place
2387 of the file extension reported by the shared library list.
2389 This is most useful for toolchains that use a post-linker tool,
2390 where the names of the files run on the target differ in extension
2391 compared to the names of the files GDB should load for debug info.
2392 """,
2393 type="const char *",
2394 name="solib_symbols_extension",
2395 invalid=False,
2396 printer="pstring (gdbarch->solib_symbols_extension)",
2399 Value(
2400 comment="""
2401 If true, the target OS has DOS-based file system semantics. That
2402 is, absolute paths include a drive name, and the backslash is
2403 considered a directory separator.
2404 """,
2405 type="int",
2406 name="has_dos_based_file_system",
2407 predefault="0",
2408 invalid=False,
2411 Method(
2412 comment="""
2413 Generate bytecodes to collect the return address in a frame.
2414 Since the bytecodes run on the target, possibly with GDB not even
2415 connected, the full unwinding machinery is not available, and
2416 typically this function will issue bytecodes for one or more likely
2417 places that the return address may be found.
2418 """,
2419 type="void",
2420 name="gen_return_address",
2421 params=[
2422 ("struct agent_expr *", "ax"),
2423 ("struct axs_value *", "value"),
2424 ("CORE_ADDR", "scope"),
2426 predefault="default_gen_return_address",
2427 invalid=False,
2430 Method(
2431 comment="""
2432 Implement the "info proc" command.
2433 """,
2434 type="void",
2435 name="info_proc",
2436 params=[("const char *", "args"), ("enum info_proc_what", "what")],
2437 predicate=True,
2438 invalid=True,
2441 Method(
2442 comment="""
2443 Implement the "info proc" command for core files. Noe that there
2444 are two "info_proc"-like methods on gdbarch -- one for core files,
2445 one for live targets.
2446 """,
2447 type="void",
2448 name="core_info_proc",
2449 params=[("const char *", "args"), ("enum info_proc_what", "what")],
2450 predicate=True,
2451 invalid=True,
2454 Method(
2455 comment="""
2456 Iterate over all objfiles in the order that makes the most sense
2457 for the architecture to make global symbol searches.
2459 CB is a callback function passed an objfile to be searched. The iteration stops
2460 if this function returns nonzero.
2462 If not NULL, CURRENT_OBJFILE corresponds to the objfile being
2463 inspected when the symbol search was requested.
2464 """,
2465 type="void",
2466 name="iterate_over_objfiles_in_search_order",
2467 params=[
2468 ("iterate_over_objfiles_in_search_order_cb_ftype", "cb"),
2469 ("struct objfile *", "current_objfile"),
2471 predefault="default_iterate_over_objfiles_in_search_order",
2472 invalid=False,
2475 Value(
2476 comment="""
2477 Ravenscar arch-dependent ops.
2478 """,
2479 type="struct ravenscar_arch_ops *",
2480 name="ravenscar_ops",
2481 predefault="NULL",
2482 invalid=False,
2483 printer="host_address_to_string (gdbarch->ravenscar_ops)",
2486 Method(
2487 comment="""
2488 Return non-zero if the instruction at ADDR is a call; zero otherwise.
2489 """,
2490 type="int",
2491 name="insn_is_call",
2492 params=[("CORE_ADDR", "addr")],
2493 predefault="default_insn_is_call",
2494 invalid=False,
2497 Method(
2498 comment="""
2499 Return non-zero if the instruction at ADDR is a return; zero otherwise.
2500 """,
2501 type="int",
2502 name="insn_is_ret",
2503 params=[("CORE_ADDR", "addr")],
2504 predefault="default_insn_is_ret",
2505 invalid=False,
2508 Method(
2509 comment="""
2510 Return non-zero if the instruction at ADDR is a jump; zero otherwise.
2511 """,
2512 type="int",
2513 name="insn_is_jump",
2514 params=[("CORE_ADDR", "addr")],
2515 predefault="default_insn_is_jump",
2516 invalid=False,
2519 Method(
2520 comment="""
2521 Return true if there's a program/permanent breakpoint planted in
2522 memory at ADDRESS, return false otherwise.
2523 """,
2524 type="bool",
2525 name="program_breakpoint_here_p",
2526 params=[("CORE_ADDR", "address")],
2527 predefault="default_program_breakpoint_here_p",
2528 invalid=False,
2531 Method(
2532 comment="""
2533 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
2534 Return 0 if *READPTR is already at the end of the buffer.
2535 Return -1 if there is insufficient buffer for a whole entry.
2536 Return 1 if an entry was read into *TYPEP and *VALP.
2537 """,
2538 type="int",
2539 name="auxv_parse",
2540 params=[
2541 ("const gdb_byte **", "readptr"),
2542 ("const gdb_byte *", "endptr"),
2543 ("CORE_ADDR *", "typep"),
2544 ("CORE_ADDR *", "valp"),
2546 predicate=True,
2547 invalid=True,
2550 Method(
2551 comment="""
2552 Print the description of a single auxv entry described by TYPE and VAL
2553 to FILE.
2554 """,
2555 type="void",
2556 name="print_auxv_entry",
2557 params=[("struct ui_file *", "file"), ("CORE_ADDR", "type"), ("CORE_ADDR", "val")],
2558 predefault="default_print_auxv_entry",
2559 invalid=False,
2562 Method(
2563 comment="""
2564 Find the address range of the current inferior's vsyscall/vDSO, and
2565 write it to *RANGE. If the vsyscall's length can't be determined, a
2566 range with zero length is returned. Returns true if the vsyscall is
2567 found, false otherwise.
2568 """,
2569 type="int",
2570 name="vsyscall_range",
2571 params=[("struct mem_range *", "range")],
2572 predefault="default_vsyscall_range",
2573 invalid=False,
2576 Function(
2577 comment="""
2578 Allocate SIZE bytes of PROT protected page aligned memory in inferior.
2579 PROT has GDB_MMAP_PROT_* bitmask format.
2580 Throw an error if it is not possible. Returned address is always valid.
2581 """,
2582 type="CORE_ADDR",
2583 name="infcall_mmap",
2584 params=[("CORE_ADDR", "size"), ("unsigned", "prot")],
2585 predefault="default_infcall_mmap",
2586 invalid=False,
2589 Function(
2590 comment="""
2591 Deallocate SIZE bytes of memory at ADDR in inferior from gdbarch_infcall_mmap.
2592 Print a warning if it is not possible.
2593 """,
2594 type="void",
2595 name="infcall_munmap",
2596 params=[("CORE_ADDR", "addr"), ("CORE_ADDR", "size")],
2597 predefault="default_infcall_munmap",
2598 invalid=False,
2601 Method(
2602 comment="""
2603 Return string (caller has to use xfree for it) with options for GCC
2604 to produce code for this target, typically "-m64", "-m32" or "-m31".
2605 These options are put before CU's DW_AT_producer compilation options so that
2606 they can override it.
2607 """,
2608 type="std::string",
2609 name="gcc_target_options",
2610 params=[],
2611 predefault="default_gcc_target_options",
2612 invalid=False,
2615 Method(
2616 comment="""
2617 Return a regular expression that matches names used by this
2618 architecture in GNU configury triplets. The result is statically
2619 allocated and must not be freed. The default implementation simply
2620 returns the BFD architecture name, which is correct in nearly every
2621 case.
2622 """,
2623 type="const char *",
2624 name="gnu_triplet_regexp",
2625 params=[],
2626 predefault="default_gnu_triplet_regexp",
2627 invalid=False,
2630 Method(
2631 comment="""
2632 Return the size in 8-bit bytes of an addressable memory unit on this
2633 architecture. This corresponds to the number of 8-bit bytes associated to
2634 each address in memory.
2635 """,
2636 type="int",
2637 name="addressable_memory_unit_size",
2638 params=[],
2639 predefault="default_addressable_memory_unit_size",
2640 invalid=False,
2643 Value(
2644 comment="""
2645 Functions for allowing a target to modify its disassembler options.
2646 """,
2647 type="const char *",
2648 name="disassembler_options_implicit",
2649 predefault="0",
2650 invalid=False,
2651 printer="pstring (gdbarch->disassembler_options_implicit)",
2654 Value(
2655 type="char **",
2656 name="disassembler_options",
2657 predefault="0",
2658 invalid=False,
2659 printer="pstring_ptr (gdbarch->disassembler_options)",
2662 Value(
2663 type="const disasm_options_and_args_t *",
2664 name="valid_disassembler_options",
2665 predefault="0",
2666 invalid=False,
2667 printer="host_address_to_string (gdbarch->valid_disassembler_options)",
2670 Method(
2671 comment="""
2672 Type alignment override method. Return the architecture specific
2673 alignment required for TYPE. If there is no special handling
2674 required for TYPE then return the value 0, GDB will then apply the
2675 default rules as laid out in gdbtypes.c:type_align.
2676 """,
2677 type="ULONGEST",
2678 name="type_align",
2679 params=[("struct type *", "type")],
2680 predefault="default_type_align",
2681 invalid=False,
2684 Function(
2685 comment="""
2686 Return a string containing any flags for the given PC in the given FRAME.
2687 """,
2688 type="std::string",
2689 name="get_pc_address_flags",
2690 params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
2691 predefault="default_get_pc_address_flags",
2692 invalid=False,
2695 Method(
2696 comment="""
2697 Read core file mappings
2698 """,
2699 type="void",
2700 name="read_core_file_mappings",
2701 params=[
2702 ("struct bfd *", "cbfd"),
2703 ("read_core_file_mappings_pre_loop_ftype", "pre_loop_cb"),
2704 ("read_core_file_mappings_loop_ftype", "loop_cb"),
2706 predefault="default_read_core_file_mappings",
2707 invalid=False,