X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbarch.sh;h=a628f8c9e50e727cba3b10dc0986b9c5c3dc9019;hb=54ae186fb505f4873858ae56b2298c9471f9eaee;hp=8220788c72848ead99f3aeeaabd8a7979e233f51;hpb=05c547f629815fdd47930f9645269ea71c32373f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 8220788c72..a628f8c9e5 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -3,7 +3,7 @@ # Architecture commands for GDB, the GNU debugger. # # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008, 2009, 2010 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GDB. # @@ -363,12 +363,14 @@ v:int:long_bit:::8 * sizeof (long):4*TARGET_CHAR_BIT::0 # machine. v:int:long_long_bit:::8 * sizeof (LONGEST):2*gdbarch->long_bit::0 -# The ABI default bit-size and format for "float", "double", and "long -# double". These bit/format pairs should eventually be combined into -# a single object. For the moment, just initialize them as a pair. +# The ABI default bit-size and format for "half", "float", "double", and +# "long double". These bit/format pairs should eventually be combined +# into a single object. For the moment, just initialize them as a pair. # Each format describes both the big and little endian layouts (if # useful). +v:int:half_bit:::16:2*TARGET_CHAR_BIT::0 +v:const struct floatformat **:half_format:::::floatformats_ieee_half::pformat (gdbarch->half_format) v:int:float_bit:::8 * sizeof (float):4*TARGET_CHAR_BIT::0 v:const struct floatformat **:float_format:::::floatformats_ieee_single::pformat (gdbarch->float_format) v:int:double_bit:::8 * sizeof (double):8*TARGET_CHAR_BIT::0 @@ -382,14 +384,29 @@ v:const struct floatformat **:long_double_format:::::floatformats_ieee_double::p # / addr_bit will be set from it. # # If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably -# also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer -# as well. +# also need to set gdbarch_dwarf2_addr_size, gdbarch_pointer_to_address and +# gdbarch_address_to_pointer as well. # # ptr_bit is the size of a pointer on the target v:int:ptr_bit:::8 * sizeof (void*):gdbarch->int_bit::0 # addr_bit is the size of a target address as represented in gdb v:int:addr_bit:::8 * sizeof (void*):0:gdbarch_ptr_bit (gdbarch): # +# dwarf2_addr_size is the target address size as used in the Dwarf debug +# info. For .debug_frame FDEs, this is supposed to be the target address +# size from the associated CU header, and which is equivalent to the +# DWARF2_ADDR_SIZE as defined by the target specific GCC back-end. +# Unfortunately there is no good way to determine this value. Therefore +# dwarf2_addr_size simply defaults to the target pointer size. +# +# dwarf2_addr_size is not used for .eh_frame FDEs, which are generally +# defined using the target's pointer size so far. +# +# Note that dwarf2_addr_size only needs to be redefined by a target if the +# GCC back-end defines a DWARF2_ADDR_SIZE other than the target pointer size, +# and if Dwarf versions < 4 need to be supported. +v:int:dwarf2_addr_size:::sizeof (void*):0:gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT: +# # One if \`char' acts like \`signed char', zero if \`unsigned char'. v:int:char_signed:::1:-1:1 # @@ -400,7 +417,7 @@ F:void:write_pc:struct regcache *regcache, CORE_ADDR val:regcache, val # serious shakedown. m:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset:0:legacy_virtual_frame_pointer::0 # -M:void:pseudo_register_read:struct regcache *regcache, int cookednum, gdb_byte *buf:regcache, cookednum, buf +M:enum register_status:pseudo_register_read:struct regcache *regcache, int cookednum, gdb_byte *buf:regcache, cookednum, buf M:void:pseudo_register_write:struct regcache *regcache, int cookednum, const gdb_byte *buf:regcache, cookednum, buf # v:int:num_regs:::0:-1 @@ -410,6 +427,15 @@ v:int:num_regs:::0:-1 # combinations of other registers, or they may be computed by GDB. v:int:num_pseudo_regs:::0:0::0 +# Assemble agent expression bytecode to collect pseudo-register REG. +# Return -1 if something goes wrong, 0 otherwise. +M:int:ax_pseudo_register_collect:struct agent_expr *ax, int reg:ax, reg + +# Assemble agent expression bytecode to push the value of pseudo-register +# REG on the interpreter stack. +# Return -1 if something goes wrong, 0 otherwise. +M:int:ax_pseudo_register_push_stack:struct agent_expr *ax, int reg:ax, reg + # GDB's standard (or well known) register numbers. These can map onto # a real register or a pseudo (computed) register or not be defined at # all (-1). @@ -458,7 +484,7 @@ F:int:get_longjmp_target:struct frame_info *frame, CORE_ADDR *pc:frame, pc v:int:believe_pcc_promotion::::::: # m:int:convert_register_p:int regnum, struct type *type:regnum, type:0:generic_convert_register_p::0 -f:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf:frame, regnum, type, buf:0 +f:int:register_to_value:struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep:frame, regnum, type, buf, optimizedp, unavailablep:0 f:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf:frame, regnum, type, buf:0 # Construct a value representing the contents of register REGNUM in # frame FRAME, interpreted as type TYPE. The routine needs to @@ -595,13 +621,6 @@ F:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct ty # name SECT_NAME and size SECT_SIZE. M:const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size -# When creating core dumps, some systems encode the PID in addition -# to the LWP id in core file register section names. In those cases, the -# "XXX" in ".reg/XXX" is encoded as [LWPID << 16 | PID]. This setting -# is set to true for such architectures; false if "XXX" represents an LWP -# or thread id with no special encoding. -v:int:core_reg_section_encodes_pid:::0:0::0 - # Supported register notes in a core file. v:struct core_regset_section *:core_regset_sections:const char *name, int len::::::host_address_to_string (gdbarch->core_regset_sections) @@ -609,8 +628,7 @@ v:struct core_regset_section *:core_regset_sections:const char *name, int len::: # core file into buffer READBUF with length LEN. M:LONGEST:core_xfer_shared_libraries:gdb_byte *readbuf, ULONGEST offset, LONGEST len:readbuf, offset, len -# How the core_stratum layer converts a PTID from a core file to a -# string. +# How the core target converts a PTID from a core file to a string. M:char *:core_pid_to_str:ptid_t ptid:ptid # BFD target to use when generating a core file. @@ -708,6 +726,19 @@ m:void:displaced_step_free_closure:struct displaced_step_closure *closure:closur # see the comments in infrun.c. m:CORE_ADDR:displaced_step_location:void:::NULL::(! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn) +# Relocate an instruction to execute at a different address. OLDLOC +# is the address in the inferior memory where the instruction to +# relocate is currently at. On input, TO points to the destination +# where we want the instruction to be copied (and possibly adjusted) +# to. On output, it points to one past the end of the resulting +# instruction(s). The effect of executing the instruction at TO shall +# be the same as if executing it at FROM. For example, call +# instructions that implicitly push the return address on the stack +# should be adjusted to return to the instruction after OLDLOC; +# relative branches, and other PC-relative instructions need the +# offset adjusted; etc. +M:void:relocate_instruction:CORE_ADDR *to, CORE_ADDR from:to, from::NULL + # Refresh overlay mapped state for section OSECT. F:void:overlay_update:struct obj_section *osect:osect @@ -864,7 +895,7 @@ cat <bfd_arch_info == NULL) fprintf_unfiltered (log, "\n\tbfd_arch_info"); - /* Check those that need to be defined for the given multi-arch level. */ + /* Check those that need to be defined for the given multi-arch level. */ EOF function_list | while do_read do @@ -1500,7 +1532,7 @@ do printf " /* Skip verify of ${function}, invalid_p == 0 */\n" elif class_is_predicate_p then - printf " /* Skip verify of ${function}, has predicate */\n" + printf " /* Skip verify of ${function}, has predicate. */\n" # FIXME: See do_read for potential simplification elif [ -n "${invalid_p}" -a -n "${postdefault}" ] then @@ -1540,7 +1572,7 @@ EOF printf "\n" printf "\n" cat <next) { if (bfd_architecture == (*curr)->bfd_architecture) internal_error (__FILE__, __LINE__, - _("gdbarch: Duplicate registraration of architecture (%s)"), + _("gdbarch: Duplicate registration " + "of architecture (%s)"), bfd_arch_info->printable_name); } /* log it */ @@ -1977,7 +2011,7 @@ gdbarch_find_by_info (struct gdbarch_info info) defaults. */ gdbarch_info_fill (&info); - /* Must have found some sort of architecture. */ + /* Must have found some sort of architecture. */ gdb_assert (info.bfd_arch_info != NULL); if (gdbarch_debug)