Add new 'z' format for print command.

  http://sourceware.org/ml/gdb-patches/2013-07/msg00235.html

gdb/ChangeLog

        * NEWS: Mention new 'z' formatter.
        * printcmd.c (print_scalar_formatted): Add new 'z' formatter.
        (_initialize_printcmd): Mention 'z' formatter in help text of the
        'x' command.

gdb/doc/ChangeLog

        * gdb.texinfo (Output Formats): Mention the new 'z' formatter.

gdb/testsuite/ChangeLog

        * gdb.base/printcmds.exp (test_print_int_arrays): Add tests for x,
        z, o, and t output formats.
        * gdb.base/display.exp: Use 'k' as an undefined format now that
        'z' is defined.
Resue 'z' formatter from mi register display code.

  http://sourceware.org/ml/gdb-patches/2013-07/msg00236.html

gdb/ChangeLog

        * mi/mi-main.c (output_register): Make MI 'r' format use standard
        'z' format code.  Remove error for optimized out values, standard
        code will handle these fine.

gdb/testsuite/ChangeLog

        * gdb.mi/mi-reg-undefined.exp: New file.
        * gdb.mi/mi-reg-undefined.c: Likewise.
        * gdb.mi/mi-reg-undefined.S: Likewise.
2013-07-25  Mark Kettenis  <kettenis@gnu.org>

        * hppabsd-tdep.c: Include "dwarf2-frame.h".
        (hppabsd_dwarf2_frame_init_reg): New function.
        (hppabsd_init_abi): Hook in the DWARF CFI frame unwinder.
2013-07-25  Mark Kettenis  <kettenis@gnu.org>

        * hppa-tdep.h (enum hppa_regnum): Add members for all space registers.
        * hppaobsd-tdep.c (HPPAOBSD_SIZEOF_GREGS): Add comment.
        (HPPANBSD_SIZEOF_GREGS): New define.
        (hppaobsd_supply_gregset): Handle additional registers.
        * hppabsd-nat.c (hppabsd_gregset_supplies_p): Adjust to indicate
        we provide more registers now.
        (hppabsd_supply_gregset): Supply additional registers.
        (hppabsd_collect_gregset): Collect additional registers.
don't call add_target for thread_db_ops

Right now, "help target" will include this line:

    target multi-thread -- Threads and pthreads support

However, it doesn't make sense to invoke "target multi-thread".

This patch fixes the problem by not registering the multi-thread
target.  add_target does some needed initialization of the target_ops,
so I broke this out into a new function.

It isn't clear to me whether this patch requires a test case or not.
I'm not sure whether there are other unregistered targets; but if
there are, it seems unlikely that we test for their absence from the
help.

Built and regtested on x86-64 Fedora 18.

	* linux-thread-db.c (init_thread_db_ops): Call
	complete_target_initialization.
	(_initialize_thread_db): Don't call add_target.
	* target.c (complete_target_initialization): New function.
	(add_target_with_completer): Call it.
	* target.h (complete_target_initialization): Declare.
remove pop_target

This patch fixes the target double-close problem (PR remote/15266),
and in the process removes pop_target entire (PR remote/15256).

The first issue is that pop_target calls target_close.  However, it
then calls unpush_target, which also calls target_close.  This means
targets must be able to be closed twice.  Not only is this strange,
but it also directly contradicts the contract of to_xclose targets.
(We currently have just a single such target, and it is never pushed;
but I plan to add more, and so this latent bug is triggered.)

The second issue is that it seems to me that calling pop_target is
often unsafe.  This is what cropped up in 15256, where the remote
target assumed that it could pop_target -- but there was another
target higher on the stack, leading to confusion.

But, it is always just as easy to call unpush_target as it is to call
pop_target; and it is also safer.  So, removing pop_target seemed like
an improvement.

Finally, this adds an assertion to target_close to ensure that no
currently-pushed target can be closed.

Built and regtested on x86-64 Fedora 18; both natively and using the
native-gdbserver board file.

	PR remote/15256, PR remote/15266:
	* bfd-target.c (target_bfd_reopen): Initialize to_magic.
	* monitor.c (monitor_detach): Use unpush_target.
	* remote-m32r-sdi.c (m32r_detach): Use unpush_target.
	* remote-mips.c (mips_detach): Use unpush_target.  Don't
	call mips_close.
	* remote-sim.c (gdbsim_detach): Use unpush_target.
	* target.c (pop_target): Remove.
	(pop_all_targets_above): Don't call target_close.
	(target_close): Assert that the target is unpushed.
	* target.h (pop_target): Don't declare.
	* tracepoint.c (tfile_open): Use unpush_target.
	* elf64-ppc.c (struct ppc64_elf_obj_tdata): Replace opd_relocs
	with a union.
	(opd_entry_value): Cache .opd section contents.
	(ppc64_elf_relocate_section): Adjust.
Correct MPX ChangeLog entries
Support Intel SHA

gas/

2013-07-25  Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* config/tc-i386.c (cpu_arch): Add .sha.
	* doc/c-i386.texi: Document sha/.sha.

gas/testsuite/

2013-07-25  Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* gas/i386/sha.d: New.
	* gas/i386/sha.s: New.
	* gas/i386/x86-64-sha.d: New.
	* gas/i386/x86-64-sha.s: New.
	* gas/i386/i386.exp: Run new SHA tests.

opcodes/

2013-07-25  Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

	* i386-dis.c (PREFIX enum): Add PREFIX_0F38C8, PREFIX_0F38C9,
	PREFIX_0F38CA, PREFIX_0F38CB, PREFIX_0F38CC, PREFIX_0F38CD,
	PREFIX_0F3ACC.
	(prefix_table): Updated.
	(three_byte_table): Likewise.
	* i386-gen.c (cpu_flag_init): Add CPU_SHA_FLAGS.
	(cpu_flags): Add CpuSHA.
	(i386_cpu_flags): Add cpusha.
	* i386-init.h: Regenerate.
	* i386-opc.h (CpuSHA): New.
	(CpuUnused): Restored.
	(i386_cpu_flags): Add cpusha.
	* i386-opc.tbl: Add SHA instructions.
	* i386-tbl.h: Regenerate.
opcodes/
2013-07-25  Aaro Koskinen  <aaro.koskinen@iki.fi>

	PR gas/15220
	* mips-opc.c (mips_builtin_opcodes): Fix wrong opcodes for
	Loongson 2F madd.ps, msub.ps, nmadd.ps and nmsub.ps.

gas/testsuite/
	* gas/mips/loongson-2f.d: Fix expected output for madd.ps,
	msub.ps, nmadd.ps and nmsub.ps.
	* linux-fork.h (detach_fork): Delete.