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