1 # Dynamic architecture support for GDB, the GNU debugger.
3 # Copyright (C) 1998-2022 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
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
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.
104 type="const struct bfd_arch_info *",
105 name
="bfd_arch_info",
106 printer
="gdbarch_bfd_arch_info (gdbarch)->printable_name",
110 type="enum bfd_endian",
115 type="enum bfd_endian",
116 name
="byte_order_for_code",
120 type="enum gdb_osabi",
125 type="const struct target_desc *",
127 printer
="host_address_to_string (gdbarch->target_desc)",
132 Number of bits in a short or unsigned short for the target machine.
136 predefault
="2*TARGET_CHAR_BIT",
142 Number of bits in an int or unsigned int for the target machine.
146 predefault
="4*TARGET_CHAR_BIT",
152 Number of bits in a long or unsigned long for the target machine.
156 predefault
="4*TARGET_CHAR_BIT",
162 Number of bits in a long long or unsigned long long for the target
166 name
="long_long_bit",
167 predefault
="2*gdbarch->long_bit",
173 The ABI default bit-size and format for "bfloat16", "half", "float", "double", and
174 "long double". These bit/format pairs should eventually be combined
175 into a single object. For the moment, just initialize them as a pair.
176 Each format describes both the big and little endian layouts (if
181 predefault
="2*TARGET_CHAR_BIT",
186 type="const struct floatformat **",
187 name
="bfloat16_format",
188 postdefault
="floatformats_bfloat16",
190 printer
="pformat (gdbarch->bfloat16_format)",
196 predefault
="2*TARGET_CHAR_BIT",
201 type="const struct floatformat **",
203 postdefault
="floatformats_ieee_half",
205 printer
="pformat (gdbarch->half_format)",
211 predefault
="4*TARGET_CHAR_BIT",
216 type="const struct floatformat **",
218 postdefault
="floatformats_ieee_single",
220 printer
="pformat (gdbarch->float_format)",
226 predefault
="8*TARGET_CHAR_BIT",
231 type="const struct floatformat **",
232 name
="double_format",
233 postdefault
="floatformats_ieee_double",
235 printer
="pformat (gdbarch->double_format)",
240 name
="long_double_bit",
241 predefault
="8*TARGET_CHAR_BIT",
246 type="const struct floatformat **",
247 name
="long_double_format",
248 postdefault
="floatformats_ieee_double",
250 printer
="pformat (gdbarch->long_double_format)",
255 The ABI default bit-size for "wchar_t". wchar_t is a built-in type
260 predefault
="4*TARGET_CHAR_BIT",
266 One if `wchar_t' is signed, zero if unsigned.
277 Returns the floating-point format to be used for values of length LENGTH.
278 NAME, if non-NULL, is the type name, which may be used to distinguish
279 different target formats of the same length.
281 type="const struct floatformat **",
282 name
="floatformat_for_type",
283 params
=[("const char *", "name"), ("int", "length")],
284 predefault
="default_floatformat_for_type",
290 For most targets, a pointer on the target and its representation as an
291 address in GDB have the same size and "look the same". For such a
292 target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
293 / addr_bit will be set from it.
295 If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably
296 also need to set gdbarch_dwarf2_addr_size, gdbarch_pointer_to_address and
297 gdbarch_address_to_pointer as well.
299 ptr_bit is the size of a pointer on the target
303 predefault
="gdbarch->int_bit",
309 addr_bit is the size of a target address as represented in gdb
314 postdefault
="gdbarch_ptr_bit (gdbarch)",
320 dwarf2_addr_size is the target address size as used in the Dwarf debug
321 info. For .debug_frame FDEs, this is supposed to be the target address
322 size from the associated CU header, and which is equivalent to the
323 DWARF2_ADDR_SIZE as defined by the target specific GCC back-end.
324 Unfortunately there is no good way to determine this value. Therefore
325 dwarf2_addr_size simply defaults to the target pointer size.
327 dwarf2_addr_size is not used for .eh_frame FDEs, which are generally
328 defined using the target's pointer size so far.
330 Note that dwarf2_addr_size only needs to be redefined by a target if the
331 GCC back-end defines a DWARF2_ADDR_SIZE other than the target pointer size,
332 and if Dwarf versions < 4 need to be supported.
335 name
="dwarf2_addr_size",
337 postdefault
="gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT",
343 One if `char' acts like `signed char', zero if `unsigned char'.
355 params
=[("readable_regcache *", "regcache")],
363 params
=[("struct regcache *", "regcache"), ("CORE_ADDR", "val")],
370 Function for getting target's idea of a frame pointer. FIXME: GDB's
371 whole scheme for dealing with "frames" and "frame pointers" needs a
375 name
="virtual_frame_pointer",
378 ("int *", "frame_regnum"),
379 ("LONGEST *", "frame_offset"),
381 predefault
="legacy_virtual_frame_pointer",
386 type="enum register_status",
387 name
="pseudo_register_read",
389 ("readable_regcache *", "regcache"),
390 ("int", "cookednum"),
391 ("gdb_byte *", "buf"),
399 Read a register into a new struct value. If the register is wholly
400 or partly unavailable, this should call mark_value_bytes_unavailable
401 as appropriate. If this is defined, then pseudo_register_read will
404 type="struct value *",
405 name
="pseudo_register_read_value",
406 params
=[("readable_regcache *", "regcache"), ("int", "cookednum")],
413 name
="pseudo_register_write",
415 ("struct regcache *", "regcache"),
416 ("int", "cookednum"),
417 ("const gdb_byte *", "buf"),
432 This macro gives the number of pseudo-registers that live in the
433 register namespace but do not get fetched or stored on the target.
434 These pseudo-registers may be aliases for other registers,
435 combinations of other registers, or they may be computed by GDB.
438 name
="num_pseudo_regs",
445 Assemble agent expression bytecode to collect pseudo-register REG.
446 Return -1 if something goes wrong, 0 otherwise.
449 name
="ax_pseudo_register_collect",
450 params
=[("struct agent_expr *", "ax"), ("int", "reg")],
457 Assemble agent expression bytecode to push the value of pseudo-register
458 REG on the interpreter stack.
459 Return -1 if something goes wrong, 0 otherwise.
462 name
="ax_pseudo_register_push_stack",
463 params
=[("struct agent_expr *", "ax"), ("int", "reg")],
470 Some architectures can display additional information for specific
472 UIOUT is the output stream where the handler will place information.
475 name
="report_signal_info",
476 params
=[("struct ui_out *", "uiout"), ("enum gdb_signal", "siggnal")],
483 GDB's standard (or well known) register numbers. These can map onto
484 a real register or a pseudo (computed) register or not be defined at
486 gdbarch_sp_regnum will hopefully be replaced by UNWIND_SP.
517 Convert stab register number (from `r' declaration) to a gdb REGNUM.
520 name
="stab_reg_to_regnum",
521 params
=[("int", "stab_regnr")],
522 predefault
="no_op_reg_to_regnum",
528 Provide a default mapping from a ecoff register number to a gdb REGNUM.
531 name
="ecoff_reg_to_regnum",
532 params
=[("int", "ecoff_regnr")],
533 predefault
="no_op_reg_to_regnum",
539 Convert from an sdb register number to an internal gdb register number.
542 name
="sdb_reg_to_regnum",
543 params
=[("int", "sdb_regnr")],
544 predefault
="no_op_reg_to_regnum",
550 Provide a default mapping from a DWARF2 register number to a gdb REGNUM.
551 Return -1 for bad REGNUM. Note: Several targets get this wrong.
554 name
="dwarf2_reg_to_regnum",
555 params
=[("int", "dwarf2_regnr")],
556 predefault
="no_op_reg_to_regnum",
562 name
="register_name",
563 params
=[("int", "regnr")],
570 Return the type of a register specified by the architecture. Only
571 the register cache should call this function directly; others should
574 type="struct type *",
575 name
="register_type",
576 params
=[("int", "reg_nr")],
582 Generate a dummy frame_id for THIS_FRAME assuming that the frame is
583 a dummy frame. A dummy frame is created before an inferior call,
584 the frame_id returned here must match the frame_id that was built
585 for the inferior call. Usually this means the returned frame_id's
586 stack address should match the address returned by
587 gdbarch_push_dummy_call, and the returned frame_id's code address
588 should match the address at which the breakpoint was set in the dummy
591 type="struct frame_id",
593 params
=[("struct frame_info *", "this_frame")],
594 predefault
="default_dummy_id",
600 Implement DUMMY_ID and PUSH_DUMMY_CALL, then delete
601 deprecated_fp_regnum.
604 name
="deprecated_fp_regnum",
611 name
="push_dummy_call",
613 ("struct value *", "function"),
614 ("struct regcache *", "regcache"),
615 ("CORE_ADDR", "bp_addr"),
617 ("struct value **", "args"),
619 ("function_call_return_method", "return_method"),
620 ("CORE_ADDR", "struct_addr"),
628 name
="call_dummy_location",
629 predefault
="AT_ENTRY_POINT",
635 name
="push_dummy_code",
638 ("CORE_ADDR", "funaddr"),
639 ("struct value **", "args"),
641 ("struct type *", "value_type"),
642 ("CORE_ADDR *", "real_pc"),
643 ("CORE_ADDR *", "bp_addr"),
644 ("struct regcache *", "regcache"),
652 Return true if the code of FRAME is writable.
655 name
="code_of_frame_writable",
656 params
=[("struct frame_info *", "frame")],
657 predefault
="default_code_of_frame_writable",
663 name
="print_registers_info",
665 ("struct ui_file *", "file"),
666 ("struct frame_info *", "frame"),
670 predefault
="default_print_registers_info",
676 name
="print_float_info",
678 ("struct ui_file *", "file"),
679 ("struct frame_info *", "frame"),
680 ("const char *", "args"),
682 predefault
="default_print_float_info",
688 name
="print_vector_info",
690 ("struct ui_file *", "file"),
691 ("struct frame_info *", "frame"),
692 ("const char *", "args"),
700 MAP a GDB RAW register number onto a simulator register number. See
701 also include/...-sim.h.
704 name
="register_sim_regno",
705 params
=[("int", "reg_nr")],
706 predefault
="legacy_register_sim_regno",
712 name
="cannot_fetch_register",
713 params
=[("int", "regnum")],
714 predefault
="cannot_register_not",
720 name
="cannot_store_register",
721 params
=[("int", "regnum")],
722 predefault
="cannot_register_not",
728 Determine the address where a longjmp will land and save this address
729 in PC. Return nonzero on success.
731 FRAME corresponds to the longjmp frame.
734 name
="get_longjmp_target",
735 params
=[("struct frame_info *", "frame"), ("CORE_ADDR *", "pc")],
742 name
="believe_pcc_promotion",
748 name
="convert_register_p",
749 params
=[("int", "regnum"), ("struct type *", "type")],
750 predefault
="generic_convert_register_p",
756 name
="register_to_value",
758 ("struct frame_info *", "frame"),
760 ("struct type *", "type"),
761 ("gdb_byte *", "buf"),
762 ("int *", "optimizedp"),
763 ("int *", "unavailablep"),
770 name
="value_to_register",
772 ("struct frame_info *", "frame"),
774 ("struct type *", "type"),
775 ("const gdb_byte *", "buf"),
782 Construct a value representing the contents of register REGNUM in
783 frame FRAME_ID, interpreted as type TYPE. The routine needs to
784 allocate and return a struct value with all value attributes
785 (but not the value contents) filled in.
787 type="struct value *",
788 name
="value_from_register",
790 ("struct type *", "type"),
792 ("struct frame_id", "frame_id"),
794 predefault
="default_value_from_register",
800 name
="pointer_to_address",
801 params
=[("struct type *", "type"), ("const gdb_byte *", "buf")],
802 predefault
="unsigned_pointer_to_address",
808 name
="address_to_pointer",
809 params
=[("struct type *", "type"), ("gdb_byte *", "buf"), ("CORE_ADDR", "addr")],
810 predefault
="unsigned_address_to_pointer",
816 name
="integer_to_address",
817 params
=[("struct type *", "type"), ("const gdb_byte *", "buf")],
824 Return the return-value convention that will be used by FUNCTION
825 to return a value of type VALTYPE. FUNCTION may be NULL in which
826 case the return convention is computed based only on VALTYPE.
828 If READBUF is not NULL, extract the return value and save it in this buffer.
830 If WRITEBUF is not NULL, it contains a return value which will be
831 stored into the appropriate register. This can be used when we want
832 to force the value returned by a function (see the "return" command
835 type="enum return_value_convention",
838 ("struct value *", "function"),
839 ("struct type *", "valtype"),
840 ("struct regcache *", "regcache"),
841 ("gdb_byte *", "readbuf"),
842 ("const gdb_byte *", "writebuf"),
850 Return true if the return value of function is stored in the first hidden
851 parameter. In theory, this feature should be language-dependent, specified
852 by language and its ABI, such as C++. Unfortunately, compiler may
853 implement it to a target-dependent feature. So that we need such hook here
854 to be aware of this in GDB.
857 name
="return_in_first_hidden_param_p",
858 params
=[("struct type *", "type")],
859 predefault
="default_return_in_first_hidden_param_p",
865 name
="skip_prologue",
866 params
=[("CORE_ADDR", "ip")],
873 name
="skip_main_prologue",
874 params
=[("CORE_ADDR", "ip")],
881 On some platforms, a single function may provide multiple entry points,
882 e.g. one that is used for function-pointer calls and a different one
883 that is used for direct function calls.
884 In order to ensure that breakpoints set on the function will trigger
885 no matter via which entry point the function is entered, a platform
886 may provide the skip_entrypoint callback. It is called with IP set
887 to the main entry point of a function (as determined by the symbol table),
888 and should return the address of the innermost entry point, where the
889 actual breakpoint needs to be set. Note that skip_entrypoint is used
890 by GDB common code even when debugging optimized code, where skip_prologue
894 name
="skip_entrypoint",
895 params
=[("CORE_ADDR", "ip")],
903 params
=[("CORE_ADDR", "lhs"), ("CORE_ADDR", "rhs")],
909 type="const gdb_byte *",
910 name
="breakpoint_from_pc",
911 params
=[("CORE_ADDR *", "pcptr"), ("int *", "lenptr")],
912 predefault
="default_breakpoint_from_pc",
918 Return the breakpoint kind for this target based on *PCPTR.
921 name
="breakpoint_kind_from_pc",
922 params
=[("CORE_ADDR *", "pcptr")],
929 Return the software breakpoint from KIND. KIND can have target
930 specific meaning like the Z0 kind parameter.
931 SIZE is set to the software breakpoint's length in memory.
933 type="const gdb_byte *",
934 name
="sw_breakpoint_from_kind",
935 params
=[("int", "kind"), ("int *", "size")],
942 Return the breakpoint kind for this target based on the current
943 processor state (e.g. the current instruction mode on ARM) and the
944 *PCPTR. In default, it is gdbarch->breakpoint_kind_from_pc.
947 name
="breakpoint_kind_from_current_state",
948 params
=[("struct regcache *", "regcache"), ("CORE_ADDR *", "pcptr")],
949 predefault
="default_breakpoint_kind_from_current_state",
955 name
="adjust_breakpoint_address",
956 params
=[("CORE_ADDR", "bpaddr")],
963 name
="memory_insert_breakpoint",
964 params
=[("struct bp_target_info *", "bp_tgt")],
965 predefault
="default_memory_insert_breakpoint",
971 name
="memory_remove_breakpoint",
972 params
=[("struct bp_target_info *", "bp_tgt")],
973 predefault
="default_memory_remove_breakpoint",
979 name
="decr_pc_after_break",
985 A function can be addressed by either it's "pointer" (possibly a
986 descriptor address) or "entry point" (first executable instruction).
987 The method "convert_from_func_ptr_addr" converting the former to the
988 latter. gdbarch_deprecated_function_start_offset is being used to implement
989 a simplified subset of that functionality - the function's address
990 corresponds to the "function pointer" and the function's start
991 corresponds to the "function entry point" - and hence is redundant.
994 name
="deprecated_function_start_offset",
1000 Return the remote protocol register number associated with this
1001 register. Normally the identity mapping.
1004 name
="remote_register_number",
1005 params
=[("int", "regno")],
1006 predefault
="default_remote_register_number",
1012 Fetch the target specific address used to represent a load module.
1015 name
="fetch_tls_load_module_address",
1016 params
=[("struct objfile *", "objfile")],
1023 Return the thread-local address at OFFSET in the thread-local
1024 storage for the thread PTID and the shared library or executable
1025 file given by LM_ADDR. If that block of thread-local storage hasn't
1026 been allocated yet, this function may throw an error. LM_ADDR may
1027 be zero for statically linked multithreaded inferiors.
1030 name
="get_thread_local_address",
1031 params
=[("ptid_t", "ptid"), ("CORE_ADDR", "lm_addr"), ("CORE_ADDR", "offset")],
1038 name
="frame_args_skip",
1045 params
=[("struct frame_info *", "next_frame")],
1046 predefault
="default_unwind_pc",
1053 params
=[("struct frame_info *", "next_frame")],
1054 predefault
="default_unwind_sp",
1060 DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
1061 frame-base. Enable frame-base before frame-unwind.
1064 name
="frame_num_args",
1065 params
=[("struct frame_info *", "frame")],
1073 params
=[("CORE_ADDR", "address")],
1080 name
="stabs_argument_has_addr",
1081 params
=[("struct type *", "type")],
1082 predefault
="default_stabs_argument_has_addr",
1088 name
="frame_red_zone_size",
1094 name
="convert_from_func_ptr_addr",
1095 params
=[("CORE_ADDR", "addr"), ("struct target_ops *", "targ")],
1096 predefault
="convert_from_func_ptr_addr_identity",
1102 On some machines there are bits in addresses which are not really
1103 part of the address, but are used by the kernel, the hardware, etc.
1104 for special purposes. gdbarch_addr_bits_remove takes out any such bits so
1105 we get a "real" address such as one would find in a symbol table.
1106 This is used only for addresses of instructions, and even then I'm
1107 not sure it's used in all contexts. It exists to deal with there
1108 being a few stray bits in the PC which would mislead us, not as some
1109 sort of generic thing to handle alignment or segmentation (it's
1110 possible it should be in TARGET_READ_PC instead).
1113 name
="addr_bits_remove",
1114 params
=[("CORE_ADDR", "addr")],
1115 predefault
="core_addr_identity",
1121 On some machines, not all bits of an address word are significant.
1122 For example, on AArch64, the top bits of an address known as the "tag"
1123 are ignored by the kernel, the hardware, etc. and can be regarded as
1124 additional data associated with the address.
1127 name
="significant_addr_bit",
1133 Return a string representation of the memory tag TAG.
1136 name
="memtag_to_string",
1137 params
=[("struct value *", "tag")],
1138 predefault
="default_memtag_to_string",
1144 Return true if ADDRESS contains a tag and false otherwise. ADDRESS
1145 must be either a pointer or a reference type.
1148 name
="tagged_address_p",
1149 params
=[("struct value *", "address")],
1150 predefault
="default_tagged_address_p",
1156 Return true if the tag from ADDRESS matches the memory tag for that
1157 particular address. Return false otherwise.
1160 name
="memtag_matches_p",
1161 params
=[("struct value *", "address")],
1162 predefault
="default_memtag_matches_p",
1168 Set the tags of type TAG_TYPE, for the memory address range
1169 [ADDRESS, ADDRESS + LENGTH) to TAGS.
1170 Return true if successful and false otherwise.
1175 ("struct value *", "address"),
1176 ("size_t", "length"),
1177 ("const gdb::byte_vector &", "tags"),
1178 ("memtag_type", "tag_type"),
1180 predefault
="default_set_memtags",
1186 Return the tag of type TAG_TYPE associated with the memory address ADDRESS,
1187 assuming ADDRESS is tagged.
1189 type="struct value *",
1191 params
=[("struct value *", "address"), ("memtag_type", "tag_type")],
1192 predefault
="default_get_memtag",
1198 memtag_granule_size is the size of the allocation tag granule, for
1199 architectures that support memory tagging.
1200 This is 0 for architectures that do not support memory tagging.
1201 For a non-zero value, this represents the number of bytes of memory per tag.
1204 name
="memtag_granule_size",
1210 FIXME/cagney/2001-01-18: This should be split in two. A target method that
1211 indicates if the target needs software single step. An ISA method to
1214 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the
1215 target can single step. If not, then implement single step using breakpoints.
1217 Return a vector of addresses on which the software single step
1218 breakpoints should be inserted. NULL means software single step is
1220 Multiple breakpoints may be inserted for some instructions such as
1221 conditional branch. However, each implementation must always evaluate
1222 the condition and only put the breakpoint at the branch destination if
1223 the condition is true, so that we ensure forward progress when stepping
1224 past a conditional branch to self.
1226 type="std::vector<CORE_ADDR>",
1227 name
="software_single_step",
1228 params
=[("struct regcache *", "regcache")],
1235 Return non-zero if the processor is executing a delay slot and a
1236 further single-step is needed before the instruction finishes.
1239 name
="single_step_through_delay",
1240 params
=[("struct frame_info *", "frame")],
1247 FIXME: cagney/2003-08-28: Need to find a better way of selecting the
1248 disassembler. Perhaps objdump can handle it?
1252 params
=[("bfd_vma", "vma"), ("struct disassemble_info *", "info")],
1253 predefault
="default_print_insn",
1259 name
="skip_trampoline_code",
1260 params
=[("struct frame_info *", "frame"), ("CORE_ADDR", "pc")],
1261 predefault
="generic_skip_trampoline_code",
1267 If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
1268 evaluates non-zero, this is the address where the debugger will place
1269 a step-resume breakpoint to get us past the dynamic linker.
1272 name
="skip_solib_resolver",
1273 params
=[("CORE_ADDR", "pc")],
1274 predefault
="generic_skip_solib_resolver",
1280 Some systems also have trampoline code for returning from shared libs.
1283 name
="in_solib_return_trampoline",
1284 params
=[("CORE_ADDR", "pc"), ("const char *", "name")],
1285 predefault
="generic_in_solib_return_trampoline",
1291 Return true if PC lies inside an indirect branch thunk.
1294 name
="in_indirect_branch_thunk",
1295 params
=[("CORE_ADDR", "pc")],
1296 predefault
="default_in_indirect_branch_thunk",
1302 A target might have problems with watchpoints as soon as the stack
1303 frame of the current function has been destroyed. This mostly happens
1304 as the first action in a function's epilogue. stack_frame_destroyed_p()
1305 is defined to return a non-zero value if either the given addr is one
1306 instruction after the stack destroying instruction up to the trailing
1307 return instruction or if we can figure out that the stack frame has
1308 already been invalidated regardless of the value of addr. Targets
1309 which don't suffer from that problem could just let this functionality
1313 name
="stack_frame_destroyed_p",
1314 params
=[("CORE_ADDR", "addr")],
1315 predefault
="generic_stack_frame_destroyed_p",
1321 Process an ELF symbol in the minimal symbol table in a backend-specific
1322 way. Normally this hook is supposed to do nothing, however if required,
1323 then this hook can be used to apply tranformations to symbols that are
1324 considered special in some way. For example the MIPS backend uses it
1325 to interpret `st_other' information to mark compressed code symbols so
1326 that they can be treated in the appropriate manner in the processing of
1327 the main symbol table and DWARF-2 records.
1330 name
="elf_make_msymbol_special",
1331 params
=[("asymbol *", "sym"), ("struct minimal_symbol *", "msym")],
1338 name
="coff_make_msymbol_special",
1339 params
=[("int", "val"), ("struct minimal_symbol *", "msym")],
1340 predefault
="default_coff_make_msymbol_special",
1346 Process a symbol in the main symbol table in a backend-specific way.
1347 Normally this hook is supposed to do nothing, however if required,
1348 then this hook can be used to apply tranformations to symbols that
1349 are considered special in some way. This is currently used by the
1350 MIPS backend to make sure compressed code symbols have the ISA bit
1351 set. This in turn is needed for symbol values seen in GDB to match
1352 the values used at the runtime by the program itself, for function
1353 and label references.
1356 name
="make_symbol_special",
1357 params
=[("struct symbol *", "sym"), ("struct objfile *", "objfile")],
1358 predefault
="default_make_symbol_special",
1364 Adjust the address retrieved from a DWARF-2 record other than a line
1365 entry in a backend-specific way. Normally this hook is supposed to
1366 return the address passed unchanged, however if that is incorrect for
1367 any reason, then this hook can be used to fix the address up in the
1368 required manner. This is currently used by the MIPS backend to make
1369 sure addresses in FDE, range records, etc. referring to compressed
1370 code have the ISA bit set, matching line information and the symbol
1374 name
="adjust_dwarf2_addr",
1375 params
=[("CORE_ADDR", "pc")],
1376 predefault
="default_adjust_dwarf2_addr",
1382 Adjust the address updated by a line entry in a backend-specific way.
1383 Normally this hook is supposed to return the address passed unchanged,
1384 however in the case of inconsistencies in these records, this hook can
1385 be used to fix them up in the required manner. This is currently used
1386 by the MIPS backend to make sure all line addresses in compressed code
1387 are presented with the ISA bit set, which is not always the case. This
1388 in turn ensures breakpoint addresses are correctly matched against the
1392 name
="adjust_dwarf2_line",
1393 params
=[("CORE_ADDR", "addr"), ("int", "rel")],
1394 predefault
="default_adjust_dwarf2_line",
1400 name
="cannot_step_breakpoint",
1407 See comment in target.h about continuable, steppable and
1408 non-steppable watchpoints.
1411 name
="have_nonsteppable_watchpoint",
1417 type="type_instance_flags",
1418 name
="address_class_type_flags",
1419 params
=[("int", "byte_size"), ("int", "dwarf2_addr_class")],
1425 type="const char *",
1426 name
="address_class_type_flags_to_name",
1427 params
=[("type_instance_flags", "type_flags")],
1434 Execute vendor-specific DWARF Call Frame Instruction. OP is the instruction.
1435 FS are passed from the generic execute_cfa_program function.
1438 name
="execute_dwarf_cfa_vendor_op",
1439 params
=[("gdb_byte", "op"), ("struct dwarf2_frame_state *", "fs")],
1440 predefault
="default_execute_dwarf_cfa_vendor_op",
1446 Return the appropriate type_flags for the supplied address class.
1447 This function should return true if the address class was recognized and
1448 type_flags was set, false otherwise.
1451 name
="address_class_name_to_type_flags",
1452 params
=[("const char *", "name"), ("type_instance_flags *", "type_flags_ptr")],
1459 Is a register in a group
1462 name
="register_reggroup_p",
1463 params
=[("int", "regnum"), ("const struct reggroup *", "reggroup")],
1464 predefault
="default_register_reggroup_p",
1470 Fetch the pointer to the ith function argument.
1473 name
="fetch_pointer_argument",
1475 ("struct frame_info *", "frame"),
1477 ("struct type *", "type"),
1485 Iterate over all supported register notes in a core file. For each
1486 supported register note section, the iterator must call CB and pass
1487 CB_DATA unchanged. If REGCACHE is not NULL, the iterator can limit
1488 the supported register note sections based on the current register
1489 values. Otherwise it should enumerate all supported register note
1493 name
="iterate_over_regset_sections",
1495 ("iterate_over_regset_sections_cb *", "cb"),
1496 ("void *", "cb_data"),
1497 ("const struct regcache *", "regcache"),
1505 Create core file notes
1507 type="gdb::unique_xmalloc_ptr<char>",
1508 name
="make_corefile_notes",
1509 params
=[("bfd *", "obfd"), ("int *", "note_size")],
1516 Find core file memory regions
1519 name
="find_memory_regions",
1520 params
=[("find_memory_region_ftype", "func"), ("void *", "data")],
1527 Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
1528 core file into buffer READBUF with length LEN. Return the number of bytes read
1529 (zero indicates failure).
1530 failed, otherwise, return the red length of READBUF.
1533 name
="core_xfer_shared_libraries",
1534 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1541 Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
1542 libraries list from core file into buffer READBUF with length LEN.
1543 Return the number of bytes read (zero indicates failure).
1546 name
="core_xfer_shared_libraries_aix",
1547 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1554 How the core target converts a PTID from a core file to a string.
1557 name
="core_pid_to_str",
1558 params
=[("ptid_t", "ptid")],
1565 How the core target extracts the name of a thread from a core file.
1567 type="const char *",
1568 name
="core_thread_name",
1569 params
=[("struct thread_info *", "thr")],
1576 Read offset OFFSET of TARGET_OBJECT_SIGNAL_INFO signal information
1577 from core file into buffer READBUF with length LEN. Return the number
1578 of bytes read (zero indicates EOF, a negative value indicates failure).
1581 name
="core_xfer_siginfo",
1582 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1589 BFD target to use when generating a core file.
1591 type="const char *",
1592 name
="gcore_bfd_target",
1596 printer
="pstring (gdbarch->gcore_bfd_target)",
1601 If the elements of C++ vtables are in-place function descriptors rather
1602 than normal function pointers (which may point to code or a descriptor),
1606 name
="vtable_function_descriptors",
1613 Set if the least significant bit of the delta is used instead of the least
1614 significant bit of the pfn for pointers to virtual member functions.
1617 name
="vbit_in_delta",
1624 Advance PC to next instruction in order to skip a permanent breakpoint.
1627 name
="skip_permanent_breakpoint",
1628 params
=[("struct regcache *", "regcache")],
1629 predefault
="default_skip_permanent_breakpoint",
1635 The maximum length of an instruction on this architecture in bytes.
1638 name
="max_insn_length",
1646 Copy the instruction at FROM to TO, and make any adjustments
1647 necessary to single-step it at that address.
1649 REGS holds the state the thread's registers will have before
1650 executing the copied instruction; the PC in REGS will refer to FROM,
1651 not the copy at TO. The caller should update it to point at TO later.
1653 Return a pointer to data of the architecture's choice to be passed
1654 to gdbarch_displaced_step_fixup.
1656 For a general explanation of displaced stepping and how GDB uses it,
1657 see the comments in infrun.c.
1659 The TO area is only guaranteed to have space for
1660 gdbarch_max_insn_length (arch) bytes, so this function must not
1661 write more bytes than that to that area.
1663 If you do not provide this function, GDB assumes that the
1664 architecture does not support displaced stepping.
1666 If the instruction cannot execute out of line, return NULL. The
1667 core falls back to stepping past the instruction in-line instead in
1670 type="displaced_step_copy_insn_closure_up",
1671 name
="displaced_step_copy_insn",
1672 params
=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")],
1679 Return true if GDB should use hardware single-stepping to execute a displaced
1680 step instruction. If false, GDB will simply restart execution at the
1681 displaced instruction location, and it is up to the target to ensure GDB will
1682 receive control again (e.g. by placing a software breakpoint instruction into
1683 the displaced instruction buffer).
1685 The default implementation returns false on all targets that provide a
1686 gdbarch_software_single_step routine, and true otherwise.
1689 name
="displaced_step_hw_singlestep",
1691 predefault
="default_displaced_step_hw_singlestep",
1697 Fix up the state resulting from successfully single-stepping a
1698 displaced instruction, to give the result we would have gotten from
1699 stepping the instruction in its original location.
1701 REGS is the register state resulting from single-stepping the
1702 displaced instruction.
1704 CLOSURE is the result from the matching call to
1705 gdbarch_displaced_step_copy_insn.
1707 If you provide gdbarch_displaced_step_copy_insn.but not this
1708 function, then GDB assumes that no fixup is needed after
1709 single-stepping the instruction.
1711 For a general explanation of displaced stepping and how GDB uses it,
1712 see the comments in infrun.c.
1715 name
="displaced_step_fixup",
1717 ("struct displaced_step_copy_insn_closure *", "closure"),
1718 ("CORE_ADDR", "from"),
1719 ("CORE_ADDR", "to"),
1720 ("struct regcache *", "regs"),
1729 Prepare THREAD for it to displaced step the instruction at its current PC.
1731 Throw an exception if any unexpected error happens.
1733 type="displaced_step_prepare_status",
1734 name
="displaced_step_prepare",
1735 params
=[("thread_info *", "thread"), ("CORE_ADDR &", "displaced_pc")],
1742 Clean up after a displaced step of THREAD.
1744 type="displaced_step_finish_status",
1745 name
="displaced_step_finish",
1746 params
=[("thread_info *", "thread"), ("gdb_signal", "sig")],
1748 invalid
="(! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)",
1753 Return the closure associated to the displaced step buffer that is at ADDR.
1755 type="const displaced_step_copy_insn_closure *",
1756 name
="displaced_step_copy_insn_closure_by_addr",
1757 params
=[("inferior *", "inf"), ("CORE_ADDR", "addr")],
1764 PARENT_INF has forked and CHILD_PTID is the ptid of the child. Restore the
1765 contents of all displaced step buffers in the child's address space.
1768 name
="displaced_step_restore_all_in_ptid",
1769 params
=[("inferior *", "parent_inf"), ("ptid_t", "child_ptid")],
1775 Relocate an instruction to execute at a different address. OLDLOC
1776 is the address in the inferior memory where the instruction to
1777 relocate is currently at. On input, TO points to the destination
1778 where we want the instruction to be copied (and possibly adjusted)
1779 to. On output, it points to one past the end of the resulting
1780 instruction(s). The effect of executing the instruction at TO shall
1781 be the same as if executing it at FROM. For example, call
1782 instructions that implicitly push the return address on the stack
1783 should be adjusted to return to the instruction after OLDLOC;
1784 relative branches, and other PC-relative instructions need the
1785 offset adjusted; etc.
1788 name
="relocate_instruction",
1789 params
=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")],
1797 Refresh overlay mapped state for section OSECT.
1800 name
="overlay_update",
1801 params
=[("struct obj_section *", "osect")],
1807 type="const struct target_desc *",
1808 name
="core_read_description",
1809 params
=[("struct target_ops *", "target"), ("bfd *", "abfd")],
1816 Set if the address in N_SO or N_FUN stabs may be zero.
1819 name
="sofun_address_maybe_missing",
1826 Parse the instruction at ADDR storing in the record execution log
1827 the registers REGCACHE and memory ranges that will be affected when
1828 the instruction executes, along with their current values.
1829 Return -1 if something goes wrong, 0 otherwise.
1832 name
="process_record",
1833 params
=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
1840 Save process state after a signal.
1841 Return -1 if something goes wrong, 0 otherwise.
1844 name
="process_record_signal",
1845 params
=[("struct regcache *", "regcache"), ("enum gdb_signal", "signal")],
1852 Signal translation: translate inferior's signal (target's) number
1853 into GDB's representation. The implementation of this method must
1854 be host independent. IOW, don't rely on symbols of the NAT_FILE
1855 header (the nm-*.h files), the host <signal.h> header, or similar
1856 headers. This is mainly used when cross-debugging core files ---
1857 "Live" targets hide the translation behind the target interface
1858 (target_wait, target_resume, etc.).
1860 type="enum gdb_signal",
1861 name
="gdb_signal_from_target",
1862 params
=[("int", "signo")],
1869 Signal translation: translate the GDB's internal signal number into
1870 the inferior's signal (target's) representation. The implementation
1871 of this method must be host independent. IOW, don't rely on symbols
1872 of the NAT_FILE header (the nm-*.h files), the host <signal.h>
1873 header, or similar headers.
1874 Return the target signal number if found, or -1 if the GDB internal
1875 signal number is invalid.
1878 name
="gdb_signal_to_target",
1879 params
=[("enum gdb_signal", "signal")],
1886 Extra signal info inspection.
1888 Return a type suitable to inspect extra signal information.
1890 type="struct type *",
1891 name
="get_siginfo_type",
1899 Record architecture-specific information from the symbol table.
1902 name
="record_special_symbol",
1903 params
=[("struct objfile *", "objfile"), ("asymbol *", "sym")],
1910 Function for the 'catch syscall' feature.
1911 Get architecture-specific system calls information from registers.
1914 name
="get_syscall_number",
1915 params
=[("thread_info *", "thread")],
1922 The filename of the XML syscall for this architecture.
1924 type="const char *",
1925 name
="xml_syscall_file",
1928 printer
="pstring (gdbarch->xml_syscall_file)",
1933 Information about system calls from this architecture
1935 type="struct syscalls_info *",
1936 name
="syscalls_info",
1939 printer
="host_address_to_string (gdbarch->syscalls_info)",
1944 SystemTap related fields and functions.
1945 A NULL-terminated array of prefixes used to mark an integer constant
1946 on the architecture's assembly.
1947 For example, on x86 integer constants are written as:
1949 $10 ;; integer constant 10
1951 in this case, this prefix would be the character `$'.
1953 type="const char *const *",
1954 name
="stap_integer_prefixes",
1957 printer
="pstring_list (gdbarch->stap_integer_prefixes)",
1962 A NULL-terminated array of suffixes used to mark an integer constant
1963 on the architecture's assembly.
1965 type="const char *const *",
1966 name
="stap_integer_suffixes",
1969 printer
="pstring_list (gdbarch->stap_integer_suffixes)",
1974 A NULL-terminated array of prefixes used to mark a register name on
1975 the architecture's assembly.
1976 For example, on x86 the register name is written as:
1978 %eax ;; register eax
1980 in this case, this prefix would be the character `%'.
1982 type="const char *const *",
1983 name
="stap_register_prefixes",
1986 printer
="pstring_list (gdbarch->stap_register_prefixes)",
1991 A NULL-terminated array of suffixes used to mark a register name on
1992 the architecture's assembly.
1994 type="const char *const *",
1995 name
="stap_register_suffixes",
1998 printer
="pstring_list (gdbarch->stap_register_suffixes)",
2003 A NULL-terminated array of prefixes used to mark a register
2004 indirection on the architecture's assembly.
2005 For example, on x86 the register indirection is written as:
2007 (%eax) ;; indirecting eax
2009 in this case, this prefix would be the charater `('.
2011 Please note that we use the indirection prefix also for register
2012 displacement, e.g., `4(%eax)' on x86.
2014 type="const char *const *",
2015 name
="stap_register_indirection_prefixes",
2018 printer
="pstring_list (gdbarch->stap_register_indirection_prefixes)",
2023 A NULL-terminated array of suffixes used to mark a register
2024 indirection on the architecture's assembly.
2025 For example, on x86 the register indirection is written as:
2027 (%eax) ;; indirecting eax
2029 in this case, this prefix would be the charater `)'.
2031 Please note that we use the indirection suffix also for register
2032 displacement, e.g., `4(%eax)' on x86.
2034 type="const char *const *",
2035 name
="stap_register_indirection_suffixes",
2038 printer
="pstring_list (gdbarch->stap_register_indirection_suffixes)",
2043 Prefix(es) used to name a register using GDB's nomenclature.
2045 For example, on PPC a register is represented by a number in the assembly
2046 language (e.g., `10' is the 10th general-purpose register). However,
2047 inside GDB this same register has an `r' appended to its name, so the 10th
2048 register would be represented as `r10' internally.
2050 type="const char *",
2051 name
="stap_gdb_register_prefix",
2054 printer
="pstring (gdbarch->stap_gdb_register_prefix)",
2059 Suffix used to name a register using GDB's nomenclature.
2061 type="const char *",
2062 name
="stap_gdb_register_suffix",
2065 printer
="pstring (gdbarch->stap_gdb_register_suffix)",
2070 Check if S is a single operand.
2072 Single operands can be:
2073 - Literal integers, e.g. `$10' on x86
2074 - Register access, e.g. `%eax' on x86
2075 - Register indirection, e.g. `(%eax)' on x86
2076 - Register displacement, e.g. `4(%eax)' on x86
2078 This function should check for these patterns on the string
2079 and return 1 if some were found, or zero otherwise. Please try to match
2080 as much info as you can from the string, i.e., if you have to match
2081 something like `(%', do not match just the `('.
2084 name
="stap_is_single_operand",
2085 params
=[("const char *", "s")],
2092 Function used to handle a "special case" in the parser.
2094 A "special case" is considered to be an unknown token, i.e., a token
2095 that the parser does not know how to parse. A good example of special
2096 case would be ARM's register displacement syntax:
2098 [R0, #4] ;; displacing R0 by 4
2100 Since the parser assumes that a register displacement is of the form:
2102 <number> <indirection_prefix> <register_name> <indirection_suffix>
2104 it means that it will not be able to recognize and parse this odd syntax.
2105 Therefore, we should add a special case function that will handle this token.
2107 This function should generate the proper expression form of the expression
2108 using GDB's internal expression mechanism (e.g., `write_exp_elt_opcode'
2109 and so on). It should also return 1 if the parsing was successful, or zero
2110 if the token was not recognized as a special token (in this case, returning
2111 zero means that the special parser is deferring the parsing to the generic
2112 parser), and should advance the buffer pointer (p->arg).
2114 type="expr::operation_up",
2115 name
="stap_parse_special_token",
2116 params
=[("struct stap_parse_info *", "p")],
2123 Perform arch-dependent adjustments to a register name.
2125 In very specific situations, it may be necessary for the register
2126 name present in a SystemTap probe's argument to be handled in a
2127 special way. For example, on i386, GCC may over-optimize the
2128 register allocation and use smaller registers than necessary. In
2129 such cases, the client that is reading and evaluating the SystemTap
2130 probe (ourselves) will need to actually fetch values from the wider
2131 version of the register in question.
2133 To illustrate the example, consider the following probe argument
2138 This argument says that its value can be found at the %ax register,
2139 which is a 16-bit register. However, the argument's prefix says
2140 that its type is "uint32_t", which is 32-bit in size. Therefore, in
2141 this case, GDB should actually fetch the probe's value from register
2142 %eax, not %ax. In this scenario, this function would actually
2143 replace the register name from %ax to %eax.
2145 The rationale for this can be found at PR breakpoints/24541.
2148 name
="stap_adjust_register",
2150 ("struct stap_parse_info *", "p"),
2151 ("const std::string &", "regname"),
2160 DTrace related functions.
2161 The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
2164 type="expr::operation_up",
2165 name
="dtrace_parse_probe_argument",
2166 params
=[("int", "narg")],
2173 True if the given ADDR does not contain the instruction sequence
2174 corresponding to a disabled DTrace is-enabled probe.
2177 name
="dtrace_probe_is_enabled",
2178 params
=[("CORE_ADDR", "addr")],
2185 Enable a DTrace is-enabled probe at ADDR.
2188 name
="dtrace_enable_probe",
2189 params
=[("CORE_ADDR", "addr")],
2196 Disable a DTrace is-enabled probe at ADDR.
2199 name
="dtrace_disable_probe",
2200 params
=[("CORE_ADDR", "addr")],
2207 True if the list of shared libraries is one and only for all
2208 processes, as opposed to a list of shared libraries per inferior.
2209 This usually means that all processes, although may or may not share
2210 an address space, will see the same set of symbols at the same
2214 name
="has_global_solist",
2221 On some targets, even though each inferior has its own private
2222 address space, the debug interface takes care of making breakpoints
2223 visible to all address spaces automatically. For such cases,
2224 this property should be set to true.
2227 name
="has_global_breakpoints",
2234 True if inferiors share an address space (e.g., uClinux).
2237 name
="has_shared_address_space",
2239 predefault
="default_has_shared_address_space",
2245 True if a fast tracepoint can be set at an address.
2248 name
="fast_tracepoint_valid_at",
2249 params
=[("CORE_ADDR", "addr"), ("std::string *", "msg")],
2250 predefault
="default_fast_tracepoint_valid_at",
2256 Guess register state based on tracepoint location. Used for tracepoints
2257 where no registers have been collected, but there's only one location,
2258 allowing us to guess the PC value, and perhaps some other registers.
2259 On entry, regcache has all registers marked as unavailable.
2262 name
="guess_tracepoint_registers",
2263 params
=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
2264 predefault
="default_guess_tracepoint_registers",
2270 Return the "auto" target charset.
2272 type="const char *",
2273 name
="auto_charset",
2275 predefault
="default_auto_charset",
2281 Return the "auto" target wide charset.
2283 type="const char *",
2284 name
="auto_wide_charset",
2286 predefault
="default_auto_wide_charset",
2292 If non-empty, this is a file extension that will be opened in place
2293 of the file extension reported by the shared library list.
2295 This is most useful for toolchains that use a post-linker tool,
2296 where the names of the files run on the target differ in extension
2297 compared to the names of the files GDB should load for debug info.
2299 type="const char *",
2300 name
="solib_symbols_extension",
2302 printer
="pstring (gdbarch->solib_symbols_extension)",
2307 If true, the target OS has DOS-based file system semantics. That
2308 is, absolute paths include a drive name, and the backslash is
2309 considered a directory separator.
2312 name
="has_dos_based_file_system",
2319 Generate bytecodes to collect the return address in a frame.
2320 Since the bytecodes run on the target, possibly with GDB not even
2321 connected, the full unwinding machinery is not available, and
2322 typically this function will issue bytecodes for one or more likely
2323 places that the return address may be found.
2326 name
="gen_return_address",
2328 ("struct agent_expr *", "ax"),
2329 ("struct axs_value *", "value"),
2330 ("CORE_ADDR", "scope"),
2332 predefault
="default_gen_return_address",
2338 Implement the "info proc" command.
2342 params
=[("const char *", "args"), ("enum info_proc_what", "what")],
2349 Implement the "info proc" command for core files. Noe that there
2350 are two "info_proc"-like methods on gdbarch -- one for core files,
2351 one for live targets.
2354 name
="core_info_proc",
2355 params
=[("const char *", "args"), ("enum info_proc_what", "what")],
2362 Iterate over all objfiles in the order that makes the most sense
2363 for the architecture to make global symbol searches.
2365 CB is a callback function passed an objfile to be searched. The iteration stops
2366 if this function returns nonzero.
2368 If not NULL, CURRENT_OBJFILE corresponds to the objfile being
2369 inspected when the symbol search was requested.
2372 name
="iterate_over_objfiles_in_search_order",
2374 ("iterate_over_objfiles_in_search_order_cb_ftype", "cb"),
2375 ("struct objfile *", "current_objfile"),
2377 predefault
="default_iterate_over_objfiles_in_search_order",
2383 Ravenscar arch-dependent ops.
2385 type="struct ravenscar_arch_ops *",
2386 name
="ravenscar_ops",
2389 printer
="host_address_to_string (gdbarch->ravenscar_ops)",
2394 Return non-zero if the instruction at ADDR is a call; zero otherwise.
2397 name
="insn_is_call",
2398 params
=[("CORE_ADDR", "addr")],
2399 predefault
="default_insn_is_call",
2405 Return non-zero if the instruction at ADDR is a return; zero otherwise.
2409 params
=[("CORE_ADDR", "addr")],
2410 predefault
="default_insn_is_ret",
2416 Return non-zero if the instruction at ADDR is a jump; zero otherwise.
2419 name
="insn_is_jump",
2420 params
=[("CORE_ADDR", "addr")],
2421 predefault
="default_insn_is_jump",
2427 Return true if there's a program/permanent breakpoint planted in
2428 memory at ADDRESS, return false otherwise.
2431 name
="program_breakpoint_here_p",
2432 params
=[("CORE_ADDR", "address")],
2433 predefault
="default_program_breakpoint_here_p",
2439 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
2440 Return 0 if *READPTR is already at the end of the buffer.
2441 Return -1 if there is insufficient buffer for a whole entry.
2442 Return 1 if an entry was read into *TYPEP and *VALP.
2447 ("gdb_byte **", "readptr"),
2448 ("gdb_byte *", "endptr"),
2449 ("CORE_ADDR *", "typep"),
2450 ("CORE_ADDR *", "valp"),
2458 Print the description of a single auxv entry described by TYPE and VAL
2462 name
="print_auxv_entry",
2463 params
=[("struct ui_file *", "file"), ("CORE_ADDR", "type"), ("CORE_ADDR", "val")],
2464 predefault
="default_print_auxv_entry",
2470 Find the address range of the current inferior's vsyscall/vDSO, and
2471 write it to *RANGE. If the vsyscall's length can't be determined, a
2472 range with zero length is returned. Returns true if the vsyscall is
2473 found, false otherwise.
2476 name
="vsyscall_range",
2477 params
=[("struct mem_range *", "range")],
2478 predefault
="default_vsyscall_range",
2484 Allocate SIZE bytes of PROT protected page aligned memory in inferior.
2485 PROT has GDB_MMAP_PROT_* bitmask format.
2486 Throw an error if it is not possible. Returned address is always valid.
2489 name
="infcall_mmap",
2490 params
=[("CORE_ADDR", "size"), ("unsigned", "prot")],
2491 predefault
="default_infcall_mmap",
2497 Deallocate SIZE bytes of memory at ADDR in inferior from gdbarch_infcall_mmap.
2498 Print a warning if it is not possible.
2501 name
="infcall_munmap",
2502 params
=[("CORE_ADDR", "addr"), ("CORE_ADDR", "size")],
2503 predefault
="default_infcall_munmap",
2509 Return string (caller has to use xfree for it) with options for GCC
2510 to produce code for this target, typically "-m64", "-m32" or "-m31".
2511 These options are put before CU's DW_AT_producer compilation options so that
2512 they can override it.
2515 name
="gcc_target_options",
2517 predefault
="default_gcc_target_options",
2523 Return a regular expression that matches names used by this
2524 architecture in GNU configury triplets. The result is statically
2525 allocated and must not be freed. The default implementation simply
2526 returns the BFD architecture name, which is correct in nearly every
2529 type="const char *",
2530 name
="gnu_triplet_regexp",
2532 predefault
="default_gnu_triplet_regexp",
2538 Return the size in 8-bit bytes of an addressable memory unit on this
2539 architecture. This corresponds to the number of 8-bit bytes associated to
2540 each address in memory.
2543 name
="addressable_memory_unit_size",
2545 predefault
="default_addressable_memory_unit_size",
2551 Functions for allowing a target to modify its disassembler options.
2553 type="const char *",
2554 name
="disassembler_options_implicit",
2557 printer
="pstring (gdbarch->disassembler_options_implicit)",
2562 name
="disassembler_options",
2565 printer
="pstring_ptr (gdbarch->disassembler_options)",
2569 type="const disasm_options_and_args_t *",
2570 name
="valid_disassembler_options",
2573 printer
="host_address_to_string (gdbarch->valid_disassembler_options)",
2578 Type alignment override method. Return the architecture specific
2579 alignment required for TYPE. If there is no special handling
2580 required for TYPE then return the value 0, GDB will then apply the
2581 default rules as laid out in gdbtypes.c:type_align.
2585 params
=[("struct type *", "type")],
2586 predefault
="default_type_align",
2592 Return a string containing any flags for the given PC in the given FRAME.
2595 name
="get_pc_address_flags",
2596 params
=[("frame_info *", "frame"), ("CORE_ADDR", "pc")],
2597 predefault
="default_get_pc_address_flags",
2603 Read core file mappings
2606 name
="read_core_file_mappings",
2608 ("struct bfd *", "cbfd"),
2609 ("read_core_file_mappings_pre_loop_ftype", "pre_loop_cb"),
2610 ("read_core_file_mappings_loop_ftype", "loop_cb"),
2612 predefault
="default_read_core_file_mappings",