X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fdwarf2read.c;h=7ed425397b79a2a7feacb32750689b706f87b305;hb=e17a4113357102b55cfa5b80557d590a46a43300;hp=03c7855115408c35f979df02d4fea8aa742ce16f;hpb=5af949e350b923403600c1da34774b49a77c925c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 03c7855115..7ed425397b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -8076,6 +8076,8 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym, { struct objfile *objfile = cu->objfile; struct comp_unit_head *cu_header = &cu->header; + enum bfd_endian byte_order = bfd_big_endian (objfile->obfd) ? + BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE; struct dwarf_block *blk; switch (attr->form) @@ -8091,7 +8093,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym, /* NOTE: cagney/2003-05-09: In-lined store_address call with it's body - store_unsigned_integer. */ store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, - DW_ADDR (attr)); + DW_ADDR (attr), byte_order); SYMBOL_CLASS (sym) = LOC_CONST_BYTES; break; case DW_FORM_string: