daily update
target.h: Expands complete_target_initialization and add_target comments.

Expand a bit the comments to answer some questions I had when looking
at why a target of mine would not have some default methods set.

gdb/ChangeLog:

        * target.h (complete_target_initialization, add_target):
        Add comment.
read_cutu_die_from_dwo: Misc minor cleanups.

	* dwarf2read.c (read_cutu_die_from_dwo): Fix function comment.
	Remove unused local comp_dir_attr.  Assert exactly one of
	stub_comp_unit_die, stub_comp_dir is non-NULL.
* dwarf2read.c (read_str_index): Rename local dwo_name to objf_name.
Better overflow checking for powerpc64 relocations

R_PPC64_ADDR16 is used in three contexts:
- .short data relocation
- 16-bit signed insn fields, eg. addi
- 16-bit unsigned insn fields, eg. ori
In the first case we want to allow both signed and unsigned 16-bit
values, the latter two ought to error if the field exceeds the range
of values allowed for 16-bit signed and unsigned integers
respectively.  These conflicting requirements meant that ld had to
choose the least restrictive overflow checks, and thus it is possible
to construct testcases where an addi field overflows but is not
reported by ld.  Many relocations dealing with 16-bit insn fields have
this problem.  What's more, some relocations that are only ever used
for signed fields of instructions woodenly copied the lax overflow
checking of R_PPC64_ADDR16.

bfd/
	* elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
	for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
	R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
	R_PPC64_REL16 entries.  Use complain_overflow_dont for R_PPC64_TOC.
	(ppc64_elf_relocate_section): Modify overflow test for 16-bit
	fields in instructions to signed/unsigned according to whether
	the field takes a signed or unsigned value.
gold/
	* powerpc.cc (Powerpc_relocate_functions::Overflow_check): Add
	CHECK_UNSIGNED, CHECK_LOW_INSN, CHECK_HIGH_INSN.
	(Powerpc_relocate_functions::has_overflow_unsigned): New function.
	(Powerpc_relocate_functions::has_overflow_bitfield,
	overflowed): Use the above.
	(Target_powerpc::Relocate::relocate): Correct overflow checking
	for a number of relocations.  Modify overflow test for 16-bit
	fields in instructions to signed/unsigned according to whether
	the field takes a signed or unsigned value.
Better overflow checking for powerpc32 relocations

Similar to the powerpc64 patch, this improves overflow checking in
elf32-ppc.c.  Many reloc "howto" entries needed fixes, some just
cosmetic.

The patch also fixes the R_PPC_VLE_SDA21 reloc application code, which
was horribly broken.  In fact, it may still be broken since Power ISA
2.07 says e_li behaves as
   RT <- EXTS(li20 1:4 || li20 5:8 || li20 0 || li20 9:19)
where li20 is a field taken from bits 17..20, 11..15, 21..31 of the
instruction.  Freescale VLEPEM says differently, and I assume
correctly, that
   RT <- EXTS(li20 0:3 || li20 4:8 || li20 9:19)
The VLE_SDA21 relocation description matches this too.

Now the VLE_SDA21 relocation specifies in the case where e_addi16 is
converted to e_li for symbols in .PPC.EMB.sdata0 or .PPC.EMB.sbss0
(no base register), that the field is restricted to 16 bits, with the
sign bit being propagated to the top 4 bits.  I don't see the sense in
restricting the value like this, so have allowed the full 20 bit
signed value.  This of course is compatible with the reloc description
in that values in the 16 bit signed range will result in exactly the
same insn field as when the reloc description is followed to the
letter.

	* elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
	many relocations.  Correct bitsize and rightshift too for a number
	of VLE relocs.  Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
	Correct dst_mask on R_PPC_VLE_SDA21_LO.
	(ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
	(ppc_elf_relocate_section): Modify overflow test for 16-bit
	fields in instructions to signed/unsigned according to whether
	the field takes a signed or unsigned value.  Tidy vle split16 code.
	Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
daily update
daily update
Remove "hardware" from comments of "target_insert_breakpoint"

This function is for simple breakpoint.  So I post a patch to remove "hardware".

Thanks,
Hui

2014-03-10  Hui Zhu  <hui@codesourcery.com>

	* target.h (target_insert_breakpoint): Remove "hardware" from its
	comments.
[Ada] Full view of tagged type with ptype

When evaluating an expression, if it is of a tagged type, GDB reads
the tag in memory and deduces the full view. At parsing time, however,
this operation is done only in the case of OP_VAR_VALUE. ptype does
not go through a full evaluation of expressions so it may return some
odd results:

 (gdb) print c.menu_name
 $1 = 0x0
 (gdb) ptype $
 type = system.strings.string_access
 (gdb) ptype c.menu_name
 type = <void>

This change removes this peculiarity by extending the tag resolution
to UNOP_IND and STRUCTOP_STRUCT. As in the case of OP_VAR_VALUE, this
implies switching from EVAL_AVOID_SIDE_EFFECTS to EVAL_NORMAL when a
tagged type is dereferenced.

gdb/
	* ada-lang.c (ada_evaluate_subexp): Resolve tagged types to
	full view in the case of UNOP_IND and STRUCTOP_STRUCT.

gdb/testsuite/

	* gdb.ada/tagged_access: New testcase.
Minor style change in the previous commits' ChangeLog entry.
Missing space before '(' in ada-lang.c::ada_evaluate_subexp

gdb/ChangeLog:

        * ada-lang.c (ada_evaluate_subexp): Add missing space before '('
        in call to TYPE_CODE macro.
Remove bfd/ticoff.h (unused)

2013-12-03  Tristan Gingold  <gingold@adacore.com>

	* ticoff.h: Remove.
Allow target to set dynsym indexes.

2014-03-10  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* symtab.cc (Symbol_table::set_dynsym_indexes): Allow a target to set
	dynsym indexes.
	* target.h (Target::has_custom_set_dynsym_indexes): New function.
	(Target::do_has_custom_set_dynsym_indexes): New function.
	(Target::set_dynsym_indexes): New function.
	(Target::do_set_dynsym_indexes): New function.
Allow target to add custom dynamic table entries.

2014-03-10  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* output.cc (Output_data_dynamic::Dynamic_entry::write):
	Get the value of DYNAMIC_CUSTOM dynamic entry.
	* output.h (Output_data_dynamic::add_custom): New function.
	(Dynamic_entry::Dynamic_entry): New constructor for DYNAMIC_CUSTOM
	dynamic entry.
	(enum Dynamic_entry::Classification): Add DYNAMIC_CUSTOM.
	* target.h (Target::dynamic_tag_custom_value): New function.
	(Target::do_dynamic_tag_custom_value): New function.
Allow target to adjust dynamic symbol value.

2014-03-10  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* symtab.cc (Symbol_table::sized_write_globals): Allow a target to
	adjust dynamic symbol value.
	* target.h (Target::adjust_dyn_symbol): New function.
	(Target::do_adjust_dyn_symbol): New function.
Add explicit instantiations for Sized_symbol::init_output_data.

2014-03-10  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* symtab.cc (Sized_symbol<32>::init_output_data):
	Instantiate the template.
	(Sized_symbol<64>::init_output_data): Likewise.
Add function to set non-visibility part of st_other.

2014-03-10  Sasa Stankovic  <Sasa.Stankovic@imgtec.com>

gold/
	* symtab.h (Symbol::set_nonvis): New function.
daily update
sim: constify arg to sim_do_command

It is rare for people to want to modify the cmd arg.  In general, they
really shouldn't be, but a few still do.  For those who misbehave, dupe
the string locally so they can bang on it.