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 change 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")],
583 Generate a dummy frame_id for THIS_FRAME assuming that the frame is
584 a dummy frame. A dummy frame is created before an inferior call,
585 the frame_id returned here must match the frame_id that was built
586 for the inferior call. Usually this means the returned frame_id's
587 stack address should match the address returned by
588 gdbarch_push_dummy_call, and the returned frame_id's code address
589 should match the address at which the breakpoint was set in the dummy
592 type="struct frame_id",
594 params
=[("struct frame_info *", "this_frame")],
595 predefault
="default_dummy_id",
601 Implement DUMMY_ID and PUSH_DUMMY_CALL, then delete
602 deprecated_fp_regnum.
605 name
="deprecated_fp_regnum",
612 name
="push_dummy_call",
614 ("struct value *", "function"),
615 ("struct regcache *", "regcache"),
616 ("CORE_ADDR", "bp_addr"),
618 ("struct value **", "args"),
620 ("function_call_return_method", "return_method"),
621 ("CORE_ADDR", "struct_addr"),
629 name
="call_dummy_location",
630 predefault
="AT_ENTRY_POINT",
636 name
="push_dummy_code",
639 ("CORE_ADDR", "funaddr"),
640 ("struct value **", "args"),
642 ("struct type *", "value_type"),
643 ("CORE_ADDR *", "real_pc"),
644 ("CORE_ADDR *", "bp_addr"),
645 ("struct regcache *", "regcache"),
653 Return true if the code of FRAME is writable.
656 name
="code_of_frame_writable",
657 params
=[("struct frame_info *", "frame")],
658 predefault
="default_code_of_frame_writable",
664 name
="print_registers_info",
666 ("struct ui_file *", "file"),
667 ("struct frame_info *", "frame"),
671 predefault
="default_print_registers_info",
677 name
="print_float_info",
679 ("struct ui_file *", "file"),
680 ("struct frame_info *", "frame"),
681 ("const char *", "args"),
683 predefault
="default_print_float_info",
689 name
="print_vector_info",
691 ("struct ui_file *", "file"),
692 ("struct frame_info *", "frame"),
693 ("const char *", "args"),
701 MAP a GDB RAW register number onto a simulator register number. See
702 also include/...-sim.h.
705 name
="register_sim_regno",
706 params
=[("int", "reg_nr")],
707 predefault
="legacy_register_sim_regno",
713 name
="cannot_fetch_register",
714 params
=[("int", "regnum")],
715 predefault
="cannot_register_not",
721 name
="cannot_store_register",
722 params
=[("int", "regnum")],
723 predefault
="cannot_register_not",
729 Determine the address where a longjmp will land and save this address
730 in PC. Return nonzero on success.
732 FRAME corresponds to the longjmp frame.
735 name
="get_longjmp_target",
736 params
=[("struct frame_info *", "frame"), ("CORE_ADDR *", "pc")],
743 name
="believe_pcc_promotion",
749 name
="convert_register_p",
750 params
=[("int", "regnum"), ("struct type *", "type")],
751 predefault
="generic_convert_register_p",
757 name
="register_to_value",
759 ("struct frame_info *", "frame"),
761 ("struct type *", "type"),
762 ("gdb_byte *", "buf"),
763 ("int *", "optimizedp"),
764 ("int *", "unavailablep"),
771 name
="value_to_register",
773 ("struct frame_info *", "frame"),
775 ("struct type *", "type"),
776 ("const gdb_byte *", "buf"),
783 Construct a value representing the contents of register REGNUM in
784 frame FRAME_ID, interpreted as type TYPE. The routine needs to
785 allocate and return a struct value with all value attributes
786 (but not the value contents) filled in.
788 type="struct value *",
789 name
="value_from_register",
791 ("struct type *", "type"),
793 ("struct frame_id", "frame_id"),
795 predefault
="default_value_from_register",
801 name
="pointer_to_address",
802 params
=[("struct type *", "type"), ("const gdb_byte *", "buf")],
803 predefault
="unsigned_pointer_to_address",
809 name
="address_to_pointer",
810 params
=[("struct type *", "type"), ("gdb_byte *", "buf"), ("CORE_ADDR", "addr")],
811 predefault
="unsigned_address_to_pointer",
817 name
="integer_to_address",
818 params
=[("struct type *", "type"), ("const gdb_byte *", "buf")],
825 Return the return-value convention that will be used by FUNCTION
826 to return a value of type VALTYPE. FUNCTION may be NULL in which
827 case the return convention is computed based only on VALTYPE.
829 If READBUF is not NULL, extract the return value and save it in this buffer.
831 If WRITEBUF is not NULL, it contains a return value which will be
832 stored into the appropriate register. This can be used when we want
833 to force the value returned by a function (see the "return" command
836 type="enum return_value_convention",
839 ("struct value *", "function"),
840 ("struct type *", "valtype"),
841 ("struct regcache *", "regcache"),
842 ("gdb_byte *", "readbuf"),
843 ("const gdb_byte *", "writebuf"),
851 Return true if the return value of function is stored in the first hidden
852 parameter. In theory, this feature should be language-dependent, specified
853 by language and its ABI, such as C++. Unfortunately, compiler may
854 implement it to a target-dependent feature. So that we need such hook here
855 to be aware of this in GDB.
858 name
="return_in_first_hidden_param_p",
859 params
=[("struct type *", "type")],
860 predefault
="default_return_in_first_hidden_param_p",
866 name
="skip_prologue",
867 params
=[("CORE_ADDR", "ip")],
874 name
="skip_main_prologue",
875 params
=[("CORE_ADDR", "ip")],
882 On some platforms, a single function may provide multiple entry points,
883 e.g. one that is used for function-pointer calls and a different one
884 that is used for direct function calls.
885 In order to ensure that breakpoints set on the function will trigger
886 no matter via which entry point the function is entered, a platform
887 may provide the skip_entrypoint callback. It is called with IP set
888 to the main entry point of a function (as determined by the symbol table),
889 and should return the address of the innermost entry point, where the
890 actual breakpoint needs to be set. Note that skip_entrypoint is used
891 by GDB common code even when debugging optimized code, where skip_prologue
895 name
="skip_entrypoint",
896 params
=[("CORE_ADDR", "ip")],
904 params
=[("CORE_ADDR", "lhs"), ("CORE_ADDR", "rhs")],
910 type="const gdb_byte *",
911 name
="breakpoint_from_pc",
912 params
=[("CORE_ADDR *", "pcptr"), ("int *", "lenptr")],
913 predefault
="default_breakpoint_from_pc",
919 Return the breakpoint kind for this target based on *PCPTR.
922 name
="breakpoint_kind_from_pc",
923 params
=[("CORE_ADDR *", "pcptr")],
930 Return the software breakpoint from KIND. KIND can have target
931 specific meaning like the Z0 kind parameter.
932 SIZE is set to the software breakpoint's length in memory.
934 type="const gdb_byte *",
935 name
="sw_breakpoint_from_kind",
936 params
=[("int", "kind"), ("int *", "size")],
943 Return the breakpoint kind for this target based on the current
944 processor state (e.g. the current instruction mode on ARM) and the
945 *PCPTR. In default, it is gdbarch->breakpoint_kind_from_pc.
948 name
="breakpoint_kind_from_current_state",
949 params
=[("struct regcache *", "regcache"), ("CORE_ADDR *", "pcptr")],
950 predefault
="default_breakpoint_kind_from_current_state",
956 name
="adjust_breakpoint_address",
957 params
=[("CORE_ADDR", "bpaddr")],
964 name
="memory_insert_breakpoint",
965 params
=[("struct bp_target_info *", "bp_tgt")],
966 predefault
="default_memory_insert_breakpoint",
972 name
="memory_remove_breakpoint",
973 params
=[("struct bp_target_info *", "bp_tgt")],
974 predefault
="default_memory_remove_breakpoint",
980 name
="decr_pc_after_break",
986 A function can be addressed by either it's "pointer" (possibly a
987 descriptor address) or "entry point" (first executable instruction).
988 The method "convert_from_func_ptr_addr" converting the former to the
989 latter. gdbarch_deprecated_function_start_offset is being used to implement
990 a simplified subset of that functionality - the function's address
991 corresponds to the "function pointer" and the function's start
992 corresponds to the "function entry point" - and hence is redundant.
995 name
="deprecated_function_start_offset",
1001 Return the remote protocol register number associated with this
1002 register. Normally the identity mapping.
1005 name
="remote_register_number",
1006 params
=[("int", "regno")],
1007 predefault
="default_remote_register_number",
1013 Fetch the target specific address used to represent a load module.
1016 name
="fetch_tls_load_module_address",
1017 params
=[("struct objfile *", "objfile")],
1024 Return the thread-local address at OFFSET in the thread-local
1025 storage for the thread PTID and the shared library or executable
1026 file given by LM_ADDR. If that block of thread-local storage hasn't
1027 been allocated yet, this function may throw an error. LM_ADDR may
1028 be zero for statically linked multithreaded inferiors.
1031 name
="get_thread_local_address",
1032 params
=[("ptid_t", "ptid"), ("CORE_ADDR", "lm_addr"), ("CORE_ADDR", "offset")],
1039 name
="frame_args_skip",
1046 params
=[("struct frame_info *", "next_frame")],
1047 predefault
="default_unwind_pc",
1054 params
=[("struct frame_info *", "next_frame")],
1055 predefault
="default_unwind_sp",
1061 DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
1062 frame-base. Enable frame-base before frame-unwind.
1065 name
="frame_num_args",
1066 params
=[("struct frame_info *", "frame")],
1074 params
=[("CORE_ADDR", "address")],
1081 name
="stabs_argument_has_addr",
1082 params
=[("struct type *", "type")],
1083 predefault
="default_stabs_argument_has_addr",
1089 name
="frame_red_zone_size",
1095 name
="convert_from_func_ptr_addr",
1096 params
=[("CORE_ADDR", "addr"), ("struct target_ops *", "targ")],
1097 predefault
="convert_from_func_ptr_addr_identity",
1103 On some machines there are bits in addresses which are not really
1104 part of the address, but are used by the kernel, the hardware, etc.
1105 for special purposes. gdbarch_addr_bits_remove takes out any such bits so
1106 we get a "real" address such as one would find in a symbol table.
1107 This is used only for addresses of instructions, and even then I'm
1108 not sure it's used in all contexts. It exists to deal with there
1109 being a few stray bits in the PC which would mislead us, not as some
1110 sort of generic thing to handle alignment or segmentation (it's
1111 possible it should be in TARGET_READ_PC instead).
1114 name
="addr_bits_remove",
1115 params
=[("CORE_ADDR", "addr")],
1116 predefault
="core_addr_identity",
1122 On some machines, not all bits of an address word are significant.
1123 For example, on AArch64, the top bits of an address known as the "tag"
1124 are ignored by the kernel, the hardware, etc. and can be regarded as
1125 additional data associated with the address.
1128 name
="significant_addr_bit",
1134 Return a string representation of the memory tag TAG.
1137 name
="memtag_to_string",
1138 params
=[("struct value *", "tag")],
1139 predefault
="default_memtag_to_string",
1145 Return true if ADDRESS contains a tag and false otherwise. ADDRESS
1146 must be either a pointer or a reference type.
1149 name
="tagged_address_p",
1150 params
=[("struct value *", "address")],
1151 predefault
="default_tagged_address_p",
1157 Return true if the tag from ADDRESS matches the memory tag for that
1158 particular address. Return false otherwise.
1161 name
="memtag_matches_p",
1162 params
=[("struct value *", "address")],
1163 predefault
="default_memtag_matches_p",
1169 Set the tags of type TAG_TYPE, for the memory address range
1170 [ADDRESS, ADDRESS + LENGTH) to TAGS.
1171 Return true if successful and false otherwise.
1176 ("struct value *", "address"),
1177 ("size_t", "length"),
1178 ("const gdb::byte_vector &", "tags"),
1179 ("memtag_type", "tag_type"),
1181 predefault
="default_set_memtags",
1187 Return the tag of type TAG_TYPE associated with the memory address ADDRESS,
1188 assuming ADDRESS is tagged.
1190 type="struct value *",
1192 params
=[("struct value *", "address"), ("memtag_type", "tag_type")],
1193 predefault
="default_get_memtag",
1199 memtag_granule_size is the size of the allocation tag granule, for
1200 architectures that support memory tagging.
1201 This is 0 for architectures that do not support memory tagging.
1202 For a non-zero value, this represents the number of bytes of memory per tag.
1205 name
="memtag_granule_size",
1211 FIXME/cagney/2001-01-18: This should be split in two. A target method that
1212 indicates if the target needs software single step. An ISA method to
1215 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the
1216 target can single step. If not, then implement single step using breakpoints.
1218 Return a vector of addresses on which the software single step
1219 breakpoints should be inserted. NULL means software single step is
1221 Multiple breakpoints may be inserted for some instructions such as
1222 conditional branch. However, each implementation must always evaluate
1223 the condition and only put the breakpoint at the branch destination if
1224 the condition is true, so that we ensure forward progress when stepping
1225 past a conditional branch to self.
1227 type="std::vector<CORE_ADDR>",
1228 name
="software_single_step",
1229 params
=[("struct regcache *", "regcache")],
1236 Return non-zero if the processor is executing a delay slot and a
1237 further single-step is needed before the instruction finishes.
1240 name
="single_step_through_delay",
1241 params
=[("struct frame_info *", "frame")],
1248 FIXME: cagney/2003-08-28: Need to find a better way of selecting the
1249 disassembler. Perhaps objdump can handle it?
1253 params
=[("bfd_vma", "vma"), ("struct disassemble_info *", "info")],
1254 predefault
="default_print_insn",
1260 name
="skip_trampoline_code",
1261 params
=[("struct frame_info *", "frame"), ("CORE_ADDR", "pc")],
1262 predefault
="generic_skip_trampoline_code",
1268 If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
1269 evaluates non-zero, this is the address where the debugger will place
1270 a step-resume breakpoint to get us past the dynamic linker.
1273 name
="skip_solib_resolver",
1274 params
=[("CORE_ADDR", "pc")],
1275 predefault
="generic_skip_solib_resolver",
1281 Some systems also have trampoline code for returning from shared libs.
1284 name
="in_solib_return_trampoline",
1285 params
=[("CORE_ADDR", "pc"), ("const char *", "name")],
1286 predefault
="generic_in_solib_return_trampoline",
1292 Return true if PC lies inside an indirect branch thunk.
1295 name
="in_indirect_branch_thunk",
1296 params
=[("CORE_ADDR", "pc")],
1297 predefault
="default_in_indirect_branch_thunk",
1303 A target might have problems with watchpoints as soon as the stack
1304 frame of the current function has been destroyed. This mostly happens
1305 as the first action in a function's epilogue. stack_frame_destroyed_p()
1306 is defined to return a non-zero value if either the given addr is one
1307 instruction after the stack destroying instruction up to the trailing
1308 return instruction or if we can figure out that the stack frame has
1309 already been invalidated regardless of the value of addr. Targets
1310 which don't suffer from that problem could just let this functionality
1314 name
="stack_frame_destroyed_p",
1315 params
=[("CORE_ADDR", "addr")],
1316 predefault
="generic_stack_frame_destroyed_p",
1322 Process an ELF symbol in the minimal symbol table in a backend-specific
1323 way. Normally this hook is supposed to do nothing, however if required,
1324 then this hook can be used to apply tranformations to symbols that are
1325 considered special in some way. For example the MIPS backend uses it
1326 to interpret `st_other' information to mark compressed code symbols so
1327 that they can be treated in the appropriate manner in the processing of
1328 the main symbol table and DWARF-2 records.
1331 name
="elf_make_msymbol_special",
1332 params
=[("asymbol *", "sym"), ("struct minimal_symbol *", "msym")],
1339 name
="coff_make_msymbol_special",
1340 params
=[("int", "val"), ("struct minimal_symbol *", "msym")],
1341 predefault
="default_coff_make_msymbol_special",
1347 Process a symbol in the main symbol table in a backend-specific way.
1348 Normally this hook is supposed to do nothing, however if required,
1349 then this hook can be used to apply tranformations to symbols that
1350 are considered special in some way. This is currently used by the
1351 MIPS backend to make sure compressed code symbols have the ISA bit
1352 set. This in turn is needed for symbol values seen in GDB to match
1353 the values used at the runtime by the program itself, for function
1354 and label references.
1357 name
="make_symbol_special",
1358 params
=[("struct symbol *", "sym"), ("struct objfile *", "objfile")],
1359 predefault
="default_make_symbol_special",
1365 Adjust the address retrieved from a DWARF-2 record other than a line
1366 entry in a backend-specific way. Normally this hook is supposed to
1367 return the address passed unchanged, however if that is incorrect for
1368 any reason, then this hook can be used to fix the address up in the
1369 required manner. This is currently used by the MIPS backend to make
1370 sure addresses in FDE, range records, etc. referring to compressed
1371 code have the ISA bit set, matching line information and the symbol
1375 name
="adjust_dwarf2_addr",
1376 params
=[("CORE_ADDR", "pc")],
1377 predefault
="default_adjust_dwarf2_addr",
1383 Adjust the address updated by a line entry in a backend-specific way.
1384 Normally this hook is supposed to return the address passed unchanged,
1385 however in the case of inconsistencies in these records, this hook can
1386 be used to fix them up in the required manner. This is currently used
1387 by the MIPS backend to make sure all line addresses in compressed code
1388 are presented with the ISA bit set, which is not always the case. This
1389 in turn ensures breakpoint addresses are correctly matched against the
1393 name
="adjust_dwarf2_line",
1394 params
=[("CORE_ADDR", "addr"), ("int", "rel")],
1395 predefault
="default_adjust_dwarf2_line",
1401 name
="cannot_step_breakpoint",
1408 See comment in target.h about continuable, steppable and
1409 non-steppable watchpoints.
1412 name
="have_nonsteppable_watchpoint",
1418 type="type_instance_flags",
1419 name
="address_class_type_flags",
1420 params
=[("int", "byte_size"), ("int", "dwarf2_addr_class")],
1426 type="const char *",
1427 name
="address_class_type_flags_to_name",
1428 params
=[("type_instance_flags", "type_flags")],
1435 Execute vendor-specific DWARF Call Frame Instruction. OP is the instruction.
1436 FS are passed from the generic execute_cfa_program function.
1439 name
="execute_dwarf_cfa_vendor_op",
1440 params
=[("gdb_byte", "op"), ("struct dwarf2_frame_state *", "fs")],
1441 predefault
="default_execute_dwarf_cfa_vendor_op",
1447 Return the appropriate type_flags for the supplied address class.
1448 This function should return true if the address class was recognized and
1449 type_flags was set, false otherwise.
1452 name
="address_class_name_to_type_flags",
1453 params
=[("const char *", "name"), ("type_instance_flags *", "type_flags_ptr")],
1460 Is a register in a group
1463 name
="register_reggroup_p",
1464 params
=[("int", "regnum"), ("struct reggroup *", "reggroup")],
1465 predefault
="default_register_reggroup_p",
1471 Fetch the pointer to the ith function argument.
1474 name
="fetch_pointer_argument",
1476 ("struct frame_info *", "frame"),
1478 ("struct type *", "type"),
1486 Iterate over all supported register notes in a core file. For each
1487 supported register note section, the iterator must call CB and pass
1488 CB_DATA unchanged. If REGCACHE is not NULL, the iterator can limit
1489 the supported register note sections based on the current register
1490 values. Otherwise it should enumerate all supported register note
1494 name
="iterate_over_regset_sections",
1496 ("iterate_over_regset_sections_cb *", "cb"),
1497 ("void *", "cb_data"),
1498 ("const struct regcache *", "regcache"),
1506 Create core file notes
1508 type="gdb::unique_xmalloc_ptr<char>",
1509 name
="make_corefile_notes",
1510 params
=[("bfd *", "obfd"), ("int *", "note_size")],
1517 Find core file memory regions
1520 name
="find_memory_regions",
1521 params
=[("find_memory_region_ftype", "func"), ("void *", "data")],
1528 Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
1529 core file into buffer READBUF with length LEN. Return the number of bytes read
1530 (zero indicates failure).
1531 failed, otherwise, return the red length of READBUF.
1534 name
="core_xfer_shared_libraries",
1535 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1542 Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
1543 libraries list from core file into buffer READBUF with length LEN.
1544 Return the number of bytes read (zero indicates failure).
1547 name
="core_xfer_shared_libraries_aix",
1548 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1555 How the core target converts a PTID from a core file to a string.
1558 name
="core_pid_to_str",
1559 params
=[("ptid_t", "ptid")],
1566 How the core target extracts the name of a thread from a core file.
1568 type="const char *",
1569 name
="core_thread_name",
1570 params
=[("struct thread_info *", "thr")],
1577 Read offset OFFSET of TARGET_OBJECT_SIGNAL_INFO signal information
1578 from core file into buffer READBUF with length LEN. Return the number
1579 of bytes read (zero indicates EOF, a negative value indicates failure).
1582 name
="core_xfer_siginfo",
1583 params
=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")],
1590 BFD target to use when generating a core file.
1592 type="const char *",
1593 name
="gcore_bfd_target",
1597 printer
="pstring (gdbarch->gcore_bfd_target)",
1602 If the elements of C++ vtables are in-place function descriptors rather
1603 than normal function pointers (which may point to code or a descriptor),
1607 name
="vtable_function_descriptors",
1614 Set if the least significant bit of the delta is used instead of the least
1615 significant bit of the pfn for pointers to virtual member functions.
1618 name
="vbit_in_delta",
1625 Advance PC to next instruction in order to skip a permanent breakpoint.
1628 name
="skip_permanent_breakpoint",
1629 params
=[("struct regcache *", "regcache")],
1630 predefault
="default_skip_permanent_breakpoint",
1636 The maximum length of an instruction on this architecture in bytes.
1639 name
="max_insn_length",
1647 Copy the instruction at FROM to TO, and make any adjustments
1648 necessary to single-step it at that address.
1650 REGS holds the state the thread's registers will have before
1651 executing the copied instruction; the PC in REGS will refer to FROM,
1652 not the copy at TO. The caller should update it to point at TO later.
1654 Return a pointer to data of the architecture's choice to be passed
1655 to gdbarch_displaced_step_fixup.
1657 For a general explanation of displaced stepping and how GDB uses it,
1658 see the comments in infrun.c.
1660 The TO area is only guaranteed to have space for
1661 gdbarch_max_insn_length (arch) bytes, so this function must not
1662 write more bytes than that to that area.
1664 If you do not provide this function, GDB assumes that the
1665 architecture does not support displaced stepping.
1667 If the instruction cannot execute out of line, return NULL. The
1668 core falls back to stepping past the instruction in-line instead in
1671 type="displaced_step_copy_insn_closure_up",
1672 name
="displaced_step_copy_insn",
1673 params
=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")],
1680 Return true if GDB should use hardware single-stepping to execute a displaced
1681 step instruction. If false, GDB will simply restart execution at the
1682 displaced instruction location, and it is up to the target to ensure GDB will
1683 receive control again (e.g. by placing a software breakpoint instruction into
1684 the displaced instruction buffer).
1686 The default implementation returns false on all targets that provide a
1687 gdbarch_software_single_step routine, and true otherwise.
1690 name
="displaced_step_hw_singlestep",
1692 predefault
="default_displaced_step_hw_singlestep",
1698 Fix up the state resulting from successfully single-stepping a
1699 displaced instruction, to give the result we would have gotten from
1700 stepping the instruction in its original location.
1702 REGS is the register state resulting from single-stepping the
1703 displaced instruction.
1705 CLOSURE is the result from the matching call to
1706 gdbarch_displaced_step_copy_insn.
1708 If you provide gdbarch_displaced_step_copy_insn.but not this
1709 function, then GDB assumes that no fixup is needed after
1710 single-stepping the instruction.
1712 For a general explanation of displaced stepping and how GDB uses it,
1713 see the comments in infrun.c.
1716 name
="displaced_step_fixup",
1718 ("struct displaced_step_copy_insn_closure *", "closure"),
1719 ("CORE_ADDR", "from"),
1720 ("CORE_ADDR", "to"),
1721 ("struct regcache *", "regs"),
1730 Prepare THREAD for it to displaced step the instruction at its current PC.
1732 Throw an exception if any unexpected error happens.
1734 type="displaced_step_prepare_status",
1735 name
="displaced_step_prepare",
1736 params
=[("thread_info *", "thread"), ("CORE_ADDR &", "displaced_pc")],
1743 Clean up after a displaced step of THREAD.
1745 type="displaced_step_finish_status",
1746 name
="displaced_step_finish",
1747 params
=[("thread_info *", "thread"), ("gdb_signal", "sig")],
1749 invalid
="(! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)",
1754 Return the closure associated to the displaced step buffer that is at ADDR.
1756 type="const displaced_step_copy_insn_closure *",
1757 name
="displaced_step_copy_insn_closure_by_addr",
1758 params
=[("inferior *", "inf"), ("CORE_ADDR", "addr")],
1765 PARENT_INF has forked and CHILD_PTID is the ptid of the child. Restore the
1766 contents of all displaced step buffers in the child's address space.
1769 name
="displaced_step_restore_all_in_ptid",
1770 params
=[("inferior *", "parent_inf"), ("ptid_t", "child_ptid")],
1776 Relocate an instruction to execute at a different address. OLDLOC
1777 is the address in the inferior memory where the instruction to
1778 relocate is currently at. On input, TO points to the destination
1779 where we want the instruction to be copied (and possibly adjusted)
1780 to. On output, it points to one past the end of the resulting
1781 instruction(s). The effect of executing the instruction at TO shall
1782 be the same as if executing it at FROM. For example, call
1783 instructions that implicitly push the return address on the stack
1784 should be adjusted to return to the instruction after OLDLOC;
1785 relative branches, and other PC-relative instructions need the
1786 offset adjusted; etc.
1789 name
="relocate_instruction",
1790 params
=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")],
1798 Refresh overlay mapped state for section OSECT.
1801 name
="overlay_update",
1802 params
=[("struct obj_section *", "osect")],
1808 type="const struct target_desc *",
1809 name
="core_read_description",
1810 params
=[("struct target_ops *", "target"), ("bfd *", "abfd")],
1817 Set if the address in N_SO or N_FUN stabs may be zero.
1820 name
="sofun_address_maybe_missing",
1827 Parse the instruction at ADDR storing in the record execution log
1828 the registers REGCACHE and memory ranges that will be affected when
1829 the instruction executes, along with their current values.
1830 Return -1 if something goes wrong, 0 otherwise.
1833 name
="process_record",
1834 params
=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
1841 Save process state after a signal.
1842 Return -1 if something goes wrong, 0 otherwise.
1845 name
="process_record_signal",
1846 params
=[("struct regcache *", "regcache"), ("enum gdb_signal", "signal")],
1853 Signal translation: translate inferior's signal (target's) number
1854 into GDB's representation. The implementation of this method must
1855 be host independent. IOW, don't rely on symbols of the NAT_FILE
1856 header (the nm-*.h files), the host <signal.h> header, or similar
1857 headers. This is mainly used when cross-debugging core files ---
1858 "Live" targets hide the translation behind the target interface
1859 (target_wait, target_resume, etc.).
1861 type="enum gdb_signal",
1862 name
="gdb_signal_from_target",
1863 params
=[("int", "signo")],
1870 Signal translation: translate the GDB's internal signal number into
1871 the inferior's signal (target's) representation. The implementation
1872 of this method must be host independent. IOW, don't rely on symbols
1873 of the NAT_FILE header (the nm-*.h files), the host <signal.h>
1874 header, or similar headers.
1875 Return the target signal number if found, or -1 if the GDB internal
1876 signal number is invalid.
1879 name
="gdb_signal_to_target",
1880 params
=[("enum gdb_signal", "signal")],
1887 Extra signal info inspection.
1889 Return a type suitable to inspect extra signal information.
1891 type="struct type *",
1892 name
="get_siginfo_type",
1900 Record architecture-specific information from the symbol table.
1903 name
="record_special_symbol",
1904 params
=[("struct objfile *", "objfile"), ("asymbol *", "sym")],
1911 Function for the 'catch syscall' feature.
1912 Get architecture-specific system calls information from registers.
1915 name
="get_syscall_number",
1916 params
=[("thread_info *", "thread")],
1923 The filename of the XML syscall for this architecture.
1925 type="const char *",
1926 name
="xml_syscall_file",
1929 printer
="pstring (gdbarch->xml_syscall_file)",
1934 Information about system calls from this architecture
1936 type="struct syscalls_info *",
1937 name
="syscalls_info",
1940 printer
="host_address_to_string (gdbarch->syscalls_info)",
1945 SystemTap related fields and functions.
1946 A NULL-terminated array of prefixes used to mark an integer constant
1947 on the architecture's assembly.
1948 For example, on x86 integer constants are written as:
1950 $10 ;; integer constant 10
1952 in this case, this prefix would be the character `$'.
1954 type="const char *const *",
1955 name
="stap_integer_prefixes",
1958 printer
="pstring_list (gdbarch->stap_integer_prefixes)",
1963 A NULL-terminated array of suffixes used to mark an integer constant
1964 on the architecture's assembly.
1966 type="const char *const *",
1967 name
="stap_integer_suffixes",
1970 printer
="pstring_list (gdbarch->stap_integer_suffixes)",
1975 A NULL-terminated array of prefixes used to mark a register name on
1976 the architecture's assembly.
1977 For example, on x86 the register name is written as:
1979 %eax ;; register eax
1981 in this case, this prefix would be the character `%'.
1983 type="const char *const *",
1984 name
="stap_register_prefixes",
1987 printer
="pstring_list (gdbarch->stap_register_prefixes)",
1992 A NULL-terminated array of suffixes used to mark a register name on
1993 the architecture's assembly.
1995 type="const char *const *",
1996 name
="stap_register_suffixes",
1999 printer
="pstring_list (gdbarch->stap_register_suffixes)",
2004 A NULL-terminated array of prefixes used to mark a register
2005 indirection on the architecture's assembly.
2006 For example, on x86 the register indirection is written as:
2008 (%eax) ;; indirecting eax
2010 in this case, this prefix would be the charater `('.
2012 Please note that we use the indirection prefix also for register
2013 displacement, e.g., `4(%eax)' on x86.
2015 type="const char *const *",
2016 name
="stap_register_indirection_prefixes",
2019 printer
="pstring_list (gdbarch->stap_register_indirection_prefixes)",
2024 A NULL-terminated array of suffixes used to mark a register
2025 indirection on the architecture's assembly.
2026 For example, on x86 the register indirection is written as:
2028 (%eax) ;; indirecting eax
2030 in this case, this prefix would be the charater `)'.
2032 Please note that we use the indirection suffix also for register
2033 displacement, e.g., `4(%eax)' on x86.
2035 type="const char *const *",
2036 name
="stap_register_indirection_suffixes",
2039 printer
="pstring_list (gdbarch->stap_register_indirection_suffixes)",
2044 Prefix(es) used to name a register using GDB's nomenclature.
2046 For example, on PPC a register is represented by a number in the assembly
2047 language (e.g., `10' is the 10th general-purpose register). However,
2048 inside GDB this same register has an `r' appended to its name, so the 10th
2049 register would be represented as `r10' internally.
2051 type="const char *",
2052 name
="stap_gdb_register_prefix",
2055 printer
="pstring (gdbarch->stap_gdb_register_prefix)",
2060 Suffix used to name a register using GDB's nomenclature.
2062 type="const char *",
2063 name
="stap_gdb_register_suffix",
2066 printer
="pstring (gdbarch->stap_gdb_register_suffix)",
2071 Check if S is a single operand.
2073 Single operands can be:
2074 - Literal integers, e.g. `$10' on x86
2075 - Register access, e.g. `%eax' on x86
2076 - Register indirection, e.g. `(%eax)' on x86
2077 - Register displacement, e.g. `4(%eax)' on x86
2079 This function should check for these patterns on the string
2080 and return 1 if some were found, or zero otherwise. Please try to match
2081 as much info as you can from the string, i.e., if you have to match
2082 something like `(%', do not match just the `('.
2085 name
="stap_is_single_operand",
2086 params
=[("const char *", "s")],
2093 Function used to handle a "special case" in the parser.
2095 A "special case" is considered to be an unknown token, i.e., a token
2096 that the parser does not know how to parse. A good example of special
2097 case would be ARM's register displacement syntax:
2099 [R0, #4] ;; displacing R0 by 4
2101 Since the parser assumes that a register displacement is of the form:
2103 <number> <indirection_prefix> <register_name> <indirection_suffix>
2105 it means that it will not be able to recognize and parse this odd syntax.
2106 Therefore, we should add a special case function that will handle this token.
2108 This function should generate the proper expression form of the expression
2109 using GDB's internal expression mechanism (e.g., `write_exp_elt_opcode'
2110 and so on). It should also return 1 if the parsing was successful, or zero
2111 if the token was not recognized as a special token (in this case, returning
2112 zero means that the special parser is deferring the parsing to the generic
2113 parser), and should advance the buffer pointer (p->arg).
2115 type="expr::operation_up",
2116 name
="stap_parse_special_token",
2117 params
=[("struct stap_parse_info *", "p")],
2124 Perform arch-dependent adjustments to a register name.
2126 In very specific situations, it may be necessary for the register
2127 name present in a SystemTap probe's argument to be handled in a
2128 special way. For example, on i386, GCC may over-optimize the
2129 register allocation and use smaller registers than necessary. In
2130 such cases, the client that is reading and evaluating the SystemTap
2131 probe (ourselves) will need to actually fetch values from the wider
2132 version of the register in question.
2134 To illustrate the example, consider the following probe argument
2139 This argument says that its value can be found at the %ax register,
2140 which is a 16-bit register. However, the argument's prefix says
2141 that its type is "uint32_t", which is 32-bit in size. Therefore, in
2142 this case, GDB should actually fetch the probe's value from register
2143 %eax, not %ax. In this scenario, this function would actually
2144 replace the register name from %ax to %eax.
2146 The rationale for this can be found at PR breakpoints/24541.
2149 name
="stap_adjust_register",
2151 ("struct stap_parse_info *", "p"),
2152 ("const std::string &", "regname"),
2161 DTrace related functions.
2162 The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
2165 type="expr::operation_up",
2166 name
="dtrace_parse_probe_argument",
2167 params
=[("int", "narg")],
2174 True if the given ADDR does not contain the instruction sequence
2175 corresponding to a disabled DTrace is-enabled probe.
2178 name
="dtrace_probe_is_enabled",
2179 params
=[("CORE_ADDR", "addr")],
2186 Enable a DTrace is-enabled probe at ADDR.
2189 name
="dtrace_enable_probe",
2190 params
=[("CORE_ADDR", "addr")],
2197 Disable a DTrace is-enabled probe at ADDR.
2200 name
="dtrace_disable_probe",
2201 params
=[("CORE_ADDR", "addr")],
2208 True if the list of shared libraries is one and only for all
2209 processes, as opposed to a list of shared libraries per inferior.
2210 This usually means that all processes, although may or may not share
2211 an address space, will see the same set of symbols at the same
2215 name
="has_global_solist",
2222 On some targets, even though each inferior has its own private
2223 address space, the debug interface takes care of making breakpoints
2224 visible to all address spaces automatically. For such cases,
2225 this property should be set to true.
2228 name
="has_global_breakpoints",
2235 True if inferiors share an address space (e.g., uClinux).
2238 name
="has_shared_address_space",
2240 predefault
="default_has_shared_address_space",
2246 True if a fast tracepoint can be set at an address.
2249 name
="fast_tracepoint_valid_at",
2250 params
=[("CORE_ADDR", "addr"), ("std::string *", "msg")],
2251 predefault
="default_fast_tracepoint_valid_at",
2257 Guess register state based on tracepoint location. Used for tracepoints
2258 where no registers have been collected, but there's only one location,
2259 allowing us to guess the PC value, and perhaps some other registers.
2260 On entry, regcache has all registers marked as unavailable.
2263 name
="guess_tracepoint_registers",
2264 params
=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")],
2265 predefault
="default_guess_tracepoint_registers",
2271 Return the "auto" target charset.
2273 type="const char *",
2274 name
="auto_charset",
2276 predefault
="default_auto_charset",
2282 Return the "auto" target wide charset.
2284 type="const char *",
2285 name
="auto_wide_charset",
2287 predefault
="default_auto_wide_charset",
2293 If non-empty, this is a file extension that will be opened in place
2294 of the file extension reported by the shared library list.
2296 This is most useful for toolchains that use a post-linker tool,
2297 where the names of the files run on the target differ in extension
2298 compared to the names of the files GDB should load for debug info.
2300 type="const char *",
2301 name
="solib_symbols_extension",
2303 printer
="pstring (gdbarch->solib_symbols_extension)",
2308 If true, the target OS has DOS-based file system semantics. That
2309 is, absolute paths include a drive name, and the backslash is
2310 considered a directory separator.
2313 name
="has_dos_based_file_system",
2320 Generate bytecodes to collect the return address in a frame.
2321 Since the bytecodes run on the target, possibly with GDB not even
2322 connected, the full unwinding machinery is not available, and
2323 typically this function will issue bytecodes for one or more likely
2324 places that the return address may be found.
2327 name
="gen_return_address",
2329 ("struct agent_expr *", "ax"),
2330 ("struct axs_value *", "value"),
2331 ("CORE_ADDR", "scope"),
2333 predefault
="default_gen_return_address",
2339 Implement the "info proc" command.
2343 params
=[("const char *", "args"), ("enum info_proc_what", "what")],
2350 Implement the "info proc" command for core files. Noe that there
2351 are two "info_proc"-like methods on gdbarch -- one for core files,
2352 one for live targets.
2355 name
="core_info_proc",
2356 params
=[("const char *", "args"), ("enum info_proc_what", "what")],
2363 Iterate over all objfiles in the order that makes the most sense
2364 for the architecture to make global symbol searches.
2366 CB is a callback function where OBJFILE is the objfile to be searched,
2367 and CB_DATA a pointer to user-defined data (the same data that is passed
2368 when calling this gdbarch method). The iteration stops if this function
2371 CB_DATA is a pointer to some user-defined data to be passed to
2374 If not NULL, CURRENT_OBJFILE corresponds to the objfile being
2375 inspected when the symbol search was requested.
2378 name
="iterate_over_objfiles_in_search_order",
2380 ("iterate_over_objfiles_in_search_order_cb_ftype *", "cb"),
2381 ("void *", "cb_data"),
2382 ("struct objfile *", "current_objfile"),
2384 predefault
="default_iterate_over_objfiles_in_search_order",
2390 Ravenscar arch-dependent ops.
2392 type="struct ravenscar_arch_ops *",
2393 name
="ravenscar_ops",
2396 printer
="host_address_to_string (gdbarch->ravenscar_ops)",
2401 Return non-zero if the instruction at ADDR is a call; zero otherwise.
2404 name
="insn_is_call",
2405 params
=[("CORE_ADDR", "addr")],
2406 predefault
="default_insn_is_call",
2412 Return non-zero if the instruction at ADDR is a return; zero otherwise.
2416 params
=[("CORE_ADDR", "addr")],
2417 predefault
="default_insn_is_ret",
2423 Return non-zero if the instruction at ADDR is a jump; zero otherwise.
2426 name
="insn_is_jump",
2427 params
=[("CORE_ADDR", "addr")],
2428 predefault
="default_insn_is_jump",
2434 Return true if there's a program/permanent breakpoint planted in
2435 memory at ADDRESS, return false otherwise.
2438 name
="program_breakpoint_here_p",
2439 params
=[("CORE_ADDR", "address")],
2440 predefault
="default_program_breakpoint_here_p",
2446 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
2447 Return 0 if *READPTR is already at the end of the buffer.
2448 Return -1 if there is insufficient buffer for a whole entry.
2449 Return 1 if an entry was read into *TYPEP and *VALP.
2454 ("gdb_byte **", "readptr"),
2455 ("gdb_byte *", "endptr"),
2456 ("CORE_ADDR *", "typep"),
2457 ("CORE_ADDR *", "valp"),
2465 Print the description of a single auxv entry described by TYPE and VAL
2469 name
="print_auxv_entry",
2470 params
=[("struct ui_file *", "file"), ("CORE_ADDR", "type"), ("CORE_ADDR", "val")],
2471 predefault
="default_print_auxv_entry",
2477 Find the address range of the current inferior's vsyscall/vDSO, and
2478 write it to *RANGE. If the vsyscall's length can't be determined, a
2479 range with zero length is returned. Returns true if the vsyscall is
2480 found, false otherwise.
2483 name
="vsyscall_range",
2484 params
=[("struct mem_range *", "range")],
2485 predefault
="default_vsyscall_range",
2491 Allocate SIZE bytes of PROT protected page aligned memory in inferior.
2492 PROT has GDB_MMAP_PROT_* bitmask format.
2493 Throw an error if it is not possible. Returned address is always valid.
2496 name
="infcall_mmap",
2497 params
=[("CORE_ADDR", "size"), ("unsigned", "prot")],
2498 predefault
="default_infcall_mmap",
2504 Deallocate SIZE bytes of memory at ADDR in inferior from gdbarch_infcall_mmap.
2505 Print a warning if it is not possible.
2508 name
="infcall_munmap",
2509 params
=[("CORE_ADDR", "addr"), ("CORE_ADDR", "size")],
2510 predefault
="default_infcall_munmap",
2516 Return string (caller has to use xfree for it) with options for GCC
2517 to produce code for this target, typically "-m64", "-m32" or "-m31".
2518 These options are put before CU's DW_AT_producer compilation options so that
2519 they can override it.
2522 name
="gcc_target_options",
2524 predefault
="default_gcc_target_options",
2530 Return a regular expression that matches names used by this
2531 architecture in GNU configury triplets. The result is statically
2532 allocated and must not be freed. The default implementation simply
2533 returns the BFD architecture name, which is correct in nearly every
2536 type="const char *",
2537 name
="gnu_triplet_regexp",
2539 predefault
="default_gnu_triplet_regexp",
2545 Return the size in 8-bit bytes of an addressable memory unit on this
2546 architecture. This corresponds to the number of 8-bit bytes associated to
2547 each address in memory.
2550 name
="addressable_memory_unit_size",
2552 predefault
="default_addressable_memory_unit_size",
2558 Functions for allowing a target to modify its disassembler options.
2560 type="const char *",
2561 name
="disassembler_options_implicit",
2564 printer
="pstring (gdbarch->disassembler_options_implicit)",
2569 name
="disassembler_options",
2572 printer
="pstring_ptr (gdbarch->disassembler_options)",
2576 type="const disasm_options_and_args_t *",
2577 name
="valid_disassembler_options",
2580 printer
="host_address_to_string (gdbarch->valid_disassembler_options)",
2585 Type alignment override method. Return the architecture specific
2586 alignment required for TYPE. If there is no special handling
2587 required for TYPE then return the value 0, GDB will then apply the
2588 default rules as laid out in gdbtypes.c:type_align.
2592 params
=[("struct type *", "type")],
2593 predefault
="default_type_align",
2599 Return a string containing any flags for the given PC in the given FRAME.
2602 name
="get_pc_address_flags",
2603 params
=[("frame_info *", "frame"), ("CORE_ADDR", "pc")],
2604 predefault
="default_get_pc_address_flags",
2610 Read core file mappings
2613 name
="read_core_file_mappings",
2615 ("struct bfd *", "cbfd"),
2616 ("read_core_file_mappings_pre_loop_ftype", "pre_loop_cb"),
2617 ("read_core_file_mappings_loop_ftype", "loop_cb"),
2619 predefault
="default_read_core_file_mappings",