X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ffindvar.c;h=95cc58d83f8011f86cf4e9776edc42244ddc0523;hb=34877895ca38f74ae31bd65a6916560020d9d62b;hp=e89ee37ffc7e788e10e0c87494fcc190e646203a;hpb=0747795c085d3b2a35da6bb474f32c58ce1b70c8;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/findvar.c b/gdb/findvar.c index e89ee37ffc..95cc58d83f 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -32,7 +32,7 @@ #include "objfiles.h" #include "language.h" #include "dwarf2loc.h" -#include "common/selftest.h" +#include "gdbsupport/selftest.h" /* Basic byte-swapping routines. All 'extract' functions return a host-format integer from a target-format integer at ADDR which is @@ -218,7 +218,7 @@ store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr) bytes. If SOURCE_SIZE is greater than DEST_SIZE, then truncate the most significant bytes. If SOURCE_SIZE is less than DEST_SIZE then either sign or zero extended according to IS_SIGNED. Values are stored in memory with - endianess BYTE_ORDER. */ + endianness BYTE_ORDER. */ void copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source, @@ -309,7 +309,7 @@ CORE_ADDR unsigned_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + enum bfd_endian byte_order = type_byte_order (type); return extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order); } @@ -318,7 +318,7 @@ CORE_ADDR signed_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + enum bfd_endian byte_order = type_byte_order (type); return extract_signed_integer (buf, TYPE_LENGTH (type), byte_order); } @@ -329,7 +329,7 @@ void unsigned_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + enum bfd_endian byte_order = type_byte_order (type); store_unsigned_integer (buf, TYPE_LENGTH (type), byte_order, addr); } @@ -338,7 +338,7 @@ void address_to_signed_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + enum bfd_endian byte_order = type_byte_order (type); store_signed_integer (buf, TYPE_LENGTH (type), byte_order, addr); } @@ -446,7 +446,7 @@ follow_static_link (struct frame_info *frame, QUIT; /* If we don't know how to compute FRAME's base address, don't give up: - maybe the frame we are looking for is upper in the stace frame. */ + maybe the frame we are looking for is upper in the stack frame. */ if (framefunc != NULL && SYMBOL_BLOCK_OPS (framefunc) != NULL && SYMBOL_BLOCK_OPS (framefunc)->get_frame_base != NULL @@ -620,7 +620,7 @@ default_read_var_value (struct symbol *var, const struct block *var_block, /* Put the constant back in target format. */ v = allocate_value (type); store_signed_integer (value_contents_raw (v), TYPE_LENGTH (type), - gdbarch_byte_order (get_type_arch (type)), + type_byte_order (type), (LONGEST) SYMBOL_VALUE (var)); VALUE_LVAL (v) = not_lval; return v; @@ -840,7 +840,7 @@ default_value_from_register (struct gdbarch *gdbarch, struct type *type, an integral number of registers. Otherwise, you need to do some fiddling with the last register copied here for little endian machines. */ - if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG + if (type_byte_order (type) == BFD_ENDIAN_BIG && len < register_size (gdbarch, regnum)) /* Big-endian, and we want less than full size. */ set_value_offset (value, register_size (gdbarch, regnum) - len);