public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  users/jkratoch/dwarf5readelf: .
Date: Thu, 12 Jan 2017 17:45:00 -0000	[thread overview]
Message-ID: <20170112174530.49627.qmail@sourceware.org> (raw)

The branch, users/jkratoch/dwarf5readelf has been updated
       via  72fd5bdde06e30104d82167f4137d8931d855a9c (commit)
       via  70b6d66ecdd50daedb75677577f5fd3cc64d1f12 (commit)
       via  2425a30e406a0523020b7e70abb864a06a45bb97 (commit)
       via  620214f742f7816e2844e1bb7f78a7a684431927 (commit)
       via  3015c06465584a437261c65a397fbd8f1a71aae7 (commit)
       via  fde1b17d37fd5557a22948d500bb5f4b6ef5d089 (commit)
       via  ca1ca08b0893eb6ec530db0cc7e12537417244fa (commit)
       via  1181551ef0a9a7f611a3d1130d2b284280882870 (commit)
       via  d95014a2ef6e9aee927c13960fa37e509d46eb32 (commit)
       via  eed0b5b26320bfcdb858a6b889dffe4f037f814d (commit)
       via  6624f3a142811450fab7eed1f406c4a030c3c9be (commit)
       via  976e204b369fd01f9d35d87ea2cd07707c3a40cf (commit)
       via  1fa5f68bf38fc29f173990614db70fed1b66c0e0 (commit)
       via  9e65917652e994b0864b344bfa47014155d93100 (commit)
       via  4ad2da7317c11fbf09e8feb9948b446d30ba9ec2 (commit)
       via  f2e2d2f54b462db40efac449f4d7724ae4728fe5 (commit)
       via  c8b23b3f89fbb0ed28d6b78f775b0038d8604798 (commit)
       via  1ac32117f7224620f44ac966b5ca53df6e4fc5bd (commit)
       via  0cf082277804ba3747be70a4013019f68b92bb84 (commit)
       via  eb115069323087e15210c09e3b581be0f6fb5852 (commit)
       via  906768f970826102252e8cfd30ee72da71de29f7 (commit)
       via  bef155c3e8a995fcdb1c2ba5aba012eb653d9f30 (commit)
       via  192b62ce0b4bb5c61188f570e127a26d2c32f716 (commit)
       via  50315b21779d71c172eb98a786a9b8281622e407 (commit)
       via  fc4007c969ec4208fb7c7cee2f50211a9aa0f40f (commit)
       via  8dbcee674ea4a8daa55f880ad7ade96efca96951 (commit)
       via  13df46cc0f340253e8a7bd984d1e4f38f29eec2d (commit)
       via  06fc9bf7d92d0bc857f3e8c109686f36aea5509c (commit)
       via  830a493402da4a055bf2d34ab300a83305391095 (commit)
       via  4586d54305ed275bb909f3373a7372c02d7e579e (commit)
       via  59876f8f9f32081b2831aed83a03a815e8d85a97 (commit)
       via  97d83487d5fbffd04d68a049f97009e1df2562a3 (commit)
       via  9205649a38c609a42ba52680a316fceaa08c1543 (commit)
       via  74c49d454b81c84fcffbc090466e241bdefd2f3a (commit)
       via  16361ffbd145c877952f3c124c247460a6005d26 (commit)
       via  905f2ccab1b7070c7953e9f12de638e2dc147a9a (commit)
       via  64081434cce13f38288d82d3d31b6199e9deff4a (commit)
       via  59e9e83119a528f17afea89ee22195a95322c6d6 (commit)
       via  9de10f6d53dffbec12cec9843662d5764526983d (commit)
       via  2bd5759dcb71adfb26b1c7cf20b3b032af29b845 (commit)
       via  3b4e0e01f8b19269d720948ee2350cb753f8ede4 (commit)
       via  17a22718b113a220de121ef4211fc3990d9b1745 (commit)
       via  68cdc55720bbe34d9d844ef2a0c4d75fcab4bc99 (commit)
       via  1eba63835ea23cbae6059c076db985a47e39ce24 (commit)
       via  bde7b3e3a0d5e1f0b66730d692b21c98a8686f75 (commit)
       via  a7785f8c797183eb363e95c201343df67d8536c6 (commit)
       via  2865bfce3875fa16046b0a987d98ab19fc8bbb9a (commit)
       via  0e9dcc758786feaaaf5026c6e59af42b30a35d36 (commit)
       via  12a5cedd4f2c5b1f4e303efda6f8ac3e06eec944 (commit)
       via  788f258604773ccbe9ccba71f9b1725930324275 (commit)
       via  6cd67beaae58c9e870b79feea3cf74ffdf7a9b33 (commit)
       via  14b122bf1ce59f5f1b82f6e2a347f4ad89801f45 (commit)
       via  bf1ca3b9476185fb6e301d85e646f5d2af95e257 (commit)
       via  572a5524c1eb50d8064a44108fd0ef22a0e63bf8 (commit)
       via  396a78b6271c45410fc22c4bc7f8cff75da3d153 (commit)
       via  a88b13c7e36e8eb0a3bf772d508380682536c0da (commit)
       via  e9f0c3639f33dc76fcab1b9299209c29ef2ee26e (commit)
       via  6349f452e01ddb7a1e64b8a63c93a9c9abc95725 (commit)
       via  c0171de646ddd85bac9d4bb1ebdf601f7ba7eeab (commit)
       via  f18e226ff84f7fba9ce7197ed7a2969eba231b4d (commit)
       via  c57af3f12b91ca49adc2e06056f794cb09514897 (commit)
       via  60e600ec691255536ae53e365d0410ecf79bdea2 (commit)
       via  bf7da5b06ffbbaa40c8a2900727a791265f897ea (commit)
       via  2d38bcedc2f91692857d257e106dafc9269d8f1a (commit)
       via  07bc7329128028e6d3e2733c6d2ebd874367bcee (commit)
       via  6e7c365ee0ea2551f9f840b71081fdf759088b5e (commit)
       via  6ba0cd406511d3edbe643f5e599d79538febedc5 (commit)
       via  de2dc875c2ddb731741f3c326545ff91fd587dd5 (commit)
       via  4ecee2c47da3e91c0571683acb5cfb8400402663 (commit)
       via  37fce74fb42f45ec340962170a4b297beede733a (commit)
       via  53a0cca3bd0f6ae80b2d6fc34b2873046965c7f0 (commit)
       via  ff3724f5123b9d9c52a07f7c1a5d85852e666c48 (commit)
       via  0700aea50c7a77d7908868373d0f9644b0ece29c (commit)
       via  1bb44c9f567c75355c1b4417d88cda959e82a3a3 (commit)
       via  87ce03fdc5a94f48fe62580410a099c0a0f68ee0 (commit)
       via  ee0a3fb85b33b172f704796612c4487ea368d675 (commit)
       via  bf2a52fa2ac2c4486653993a765fd922b3cd64a6 (commit)
       via  f59fe7f8e3e55472e6fcfb06677ff4925dad1f64 (commit)
       via  80bd970a4b1388fc4373b3e087006e6c93d71f60 (commit)
       via  d1b3de2e43380a0c51772a40315cd2268573d985 (commit)
       via  3bb4338431288002c2225ff660e1500818684c16 (commit)
       via  abf5651e47c0396df58a37951bc03a349169c5f2 (commit)
       via  a68ff33e0dcb4733584265088030d12a31e740e4 (commit)
       via  0b67023188fef926357f0fd27e600195ab35727e (commit)
       via  52b232b366355b1d0a9d2721e55a6b2b96789b00 (commit)
       via  59a1e29d9e1fc7ed31e66d51899ada46e5dd9a56 (commit)
       via  fff53daefb7838b5718422c87946330e4a8288ce (commit)
       via  5edad15d7c1e6a2409102b3426b444d6ea98bdfc (commit)
       via  f129e49f4d07f4d36319ac757fdcf3a8ce7d605b (commit)
       via  e92372274e77fc0ce87f35a833de8a60d733580a (commit)
       via  7becfd03bad526c02216eeb5ec2bebae694b1af1 (commit)
       via  98461510d3a8cefa6603980294bfc647cddcab97 (commit)
       via  df2946549f60624503663cc6c28cd5a6ef0ab434 (commit)
       via  1a94eb29d0dd72e6c34bb2d32927c510d16e4c00 (commit)
       via  b972a0d61a8b6e1dc3f9baf93ef3e57c7bfb9715 (commit)
       via  07e8e62387eb914b29cbf79f468db89fa4e57b3f (commit)
       via  07ccf83cf5424d019ab091a7bac0fee26564e420 (commit)
       via  74def31dcd248441a49755721da81ca73d99c4fb (commit)
       via  f7fd19e2b83c06cf1590d2ac8d0e9fc1ea4739c2 (commit)
       via  f159cdb61155d699f5aff2a9fbad8b787a7fe10c (commit)
       via  eaa38cfd42fe323fb7868e676ced7419bc5eec12 (commit)
       via  a4fb5981b7ec3d4006e93141afb1d0da566bb97b (commit)
       via  694b382c67a4fc656f30acbc74776c5e9cb53622 (commit)
       via  a5ec5e3fe1b8fe1395c79ff29052edad91266a76 (commit)
       via  e294484ee7e8dea53d091443a0f24c7939ac15ed (commit)
       via  6ec11ab97ab47ec4a22118e5b1c77df567796002 (commit)
       via  cd6581da62c32a391f9a4c2c5d248a11aa6fa8f7 (commit)
       via  20b52c88ea31f8a0af60d6172ab0da5f2ad616ee (commit)
       via  98f02962fefbacf1b805e93fb7bddeb58ec6ff70 (commit)
       via  011561117eeaff00862eb5f465c3470f29e8a9a9 (commit)
       via  3254d32c4b47f17a7d609f25394fbfb2313f09ff (commit)
       via  4d74727a4a41e811950dcd0bed7bc6747a068886 (commit)
       via  a631dd7b79e7dd670995d2c9b58577b1d1a29795 (commit)
      from  8955e1475d36a84b6f8e47c86bfb1ddd4a00346d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 72fd5bdde06e30104d82167f4137d8931d855a9c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jan 12 18:36:26 2017 +0100

    .

commit 70b6d66ecdd50daedb75677577f5fd3cc64d1f12
Merge: 8955e14 2425a30
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jan 12 18:05:33 2017 +0100

    Merge remote-tracking branch 'gdb/master' into readelf

commit 2425a30e406a0523020b7e70abb864a06a45bb97
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jan 12 16:56:54 2017 +0000

    Add support for locating separate debug info files via the build-id method.
    
    	PR binutils/20876
    bfd	* opncls.c (find_separate_debug_file): Add include_dirs
    	parameter.  Only include the directory part of the bfd's filename
    	in search paths if include_dirs is true.  Add a couple of extra
    	locations for looking for debug files.
    	( bfd_follow_gnu_debuglink): Update invocation of
    	find_separate_debug_file.
    	(bfd_follow_gnu_debugaltlink): Likewise.
    	(get_build_id): New function: Finds the build-id of the given bfd.
    	(get_build_id_name): New function: Computes the name of the
    	separate debug info file for a bfd, based upon its build-id.
    	(check_build_id_file): New function: Checks to see if a separate
    	debug info file exists at the given location, and that its
    	build-id matches that of the original bfd.
    	(bfd_follow_build_id_debuglink): New function: Finds a separate
    	debug info file for a given bfd by using the build-id method.
    	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
    	method of locating a separate debug info file before using the
    	debuglink method.
    	* bfd-in2.h: Regenerate.
    
    binutils * NEWS: Mention the new feature.
    	* testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
    	New proc to test the location of separate debug info files using
    	the build-id method.

commit 620214f742f7816e2844e1bb7f78a7a684431927
Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>
Date:   Thu Jan 12 08:42:17 2017 -0800

    Enable Intel AVX512_VPOPCNTDQ instructions
    
    gas/
    
    2017-01-12  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
    
    	* config/tc-i386.c (cpu_arch): Add .avx512_vpopcntdq.
    	(cpu_noarch): Add noavx512_vpopcntdq.
    	* doc/c-i386.texi: Document avx512_vpopcntdq, noavx512_vpopcntdq.
    	* testsuite/gas/i386/i386.exp: Run AVX512_VPOPCNTDQ tests.
    	* testsuite/gas/i386/avx512_vpopcntdqd-intel.d: New file.
    	* testsuite/gas/i386/avx512_vpopcntdqd.d: Ditto.
    	* testsuite/gas/i386/avx512_vpopcntdqd.s: Ditto.
    	* testsuite/gas/i386/x86-64-avx512_vpopcntdqd-intel.d: Ditto.
    	* testsuite/gas/i386/x86-64-avx512_vpopcntdqd.d: Ditto.
    	* testsuite/gas/i386/x86-64-avx512_vpopcntdqd.s: Ditto.
    
    opcodes/
    
    2017-01-12  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
    
    	* i386-dis.c (enum): Add PREFIX_EVEX_0F3855, EVEX_W_0F3855_P_2.
    	* i386-dis-evex.h (evex_table): Updated.
    	* i386-gen.c (cpu_flag_init): Add CPU_AVX512_VPOPCNTDQ_FLAGS,
    	CPU_ANY_AVX512_VPOPCNTDQ_FLAGS. Update CPU_ANY_AVX512F_FLAGS.
    	(cpu_flags): Add CpuAVX512_VPOPCNTDQ.
    	* i386-opc.h (enum): (AVX512_VPOPCNTDQ): New.
    	(i386_cpu_flags): Add cpuavx512_vpopcntdq.
    	* i386-opc.tbl: Add Intel AVX512_VPOPCNTDQ instructions.
    	* i386-init.h: Regenerate.
    	* i386-tbl.h: Ditto.

commit 3015c06465584a437261c65a397fbd8f1a71aae7
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Jan 12 11:15:01 2017 -0500

    Update comment in remote_can_async_p
    
    I find this comment counter intuitive, and it probably predates the
    always-target-async change.  AFAIK, remote will always be async, unless
    the user explicitly prevents it with "maint set target-async off".
    
    gdb/ChangeLog:
    
    	* remote.c (remote_can_async_p): Update comment.

commit fde1b17d37fd5557a22948d500bb5f4b6ef5d089
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Jan 12 11:04:53 2017 -0500

    Update comment in linux_nat_can_async_p
    
    I think this comment is outdated.  Nowadays, linux-nat is always async,
    unless the user has explictly turned it off with
    "maint set target-async off".
    
    gdb/ChangeLog:
    
    	* linux-nat.c (linux_nat_can_async_p): Update comment.

commit ca1ca08b0893eb6ec530db0cc7e12537417244fa
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Jan 12 10:39:35 2017 -0500

    Remove dead serial_interface_lookup calls
    
    By inspecting the serial_add_interface calls, I found that the serial
    interface names that we have today are:
    
     - hardwire
     - terminal
     - pipe
     - tcp
     - event
    
     The calls to serial_interface_lookup with any other names are most
     likely leftovers which can be removed since these serial interfaces
     don't exist anymore.  The commits that removed the "pc" and "parallel"
     interfaces are respectively:
    
      cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a
    
    and
    
      e386d4d2fb55042f77d0557a0849ed2464aee7b3
    
    gdb/ChangeLog:
    
    	* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.

commit 1181551ef0a9a7f611a3d1130d2b284280882870
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jan 12 14:56:13 2017 +0000

    Prevent internal assembler errors if a stabs creation function builds an badly formatted input string.
    
    	* read.c (temp_ilp): New function.  Installs a temporary input
    	line pointer.
    	(restore_ilp): New function.  Restores the original input line
    	pointer.
    	* read.h (temp_ilp): Prototype.
    	(restore_ilp): Prototype.
    	* stabs.c (dot_func_p): Use bfd_boolean type.
    	(generate_asm_file): Use temp_ilp and restore_ilp.
    	(stabs_generate_asm_lineno): Likewise.
    	(stabs_generate_asm_endfunc): Likewise.

commit d95014a2ef6e9aee927c13960fa37e509d46eb32
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Jan 12 09:40:41 2017 +0000

    Return -1 on memory error in print_insn_msp430
    
    Disassemblers in opcodes return -1 on memory error, but msp430 doesn't
    follow this convention.  If I change GDB not to throw exception in
    disassemble_info.memory_error_func and rely on the return value of
    disassembler, I'll get the following output.
    
    (gdb) disassemble 0x0,+8
    Dump of assembler code from 0x0 to 0x8:
       0x00000000:  .word   0xffff; ????
       0x00000002:  .word   0xffff; ????
       0x00000004:  .word   0xffff; ????
       0x00000006:  .word   0xffff; ????
    End of assembler dump.
    
    This patch teaches print_insn_msp430 and its callees to return -1
    on memory error.
    
    opcodes:
    
    2017-01-12  Yao Qi  <yao.qi@linaro.org>
    
    	* msp430-dis.c (msp430_singleoperand): Return -1 if
    	msp430dis_opcode_signed returns false.
    	(msp430_doubleoperand): Likewise.
    	(msp430_branchinstr): Return -1 if
    	msp430dis_opcode_unsigned returns false.
    	(msp430x_calla_instr): Likewise.
    	(print_insn_msp430): Likewise.

commit eed0b5b26320bfcdb858a6b889dffe4f037f814d
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Thu Jan 12 00:00:25 2017 +0000

    Automatic date update in version.in

commit 6624f3a142811450fab7eed1f406c4a030c3c9be
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Wed Jan 11 13:42:24 2017 -0800

    Fix more compile errors with GCC 4.2.
    
    gold/
    	PR gold/21040
    	* x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
    	Remove unnecessary 'typename' keyword.
    	(Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::do_write): Likewise.

commit 976e204b369fd01f9d35d87ea2cd07707c3a40cf
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Wed Jan 11 11:47:27 2017 -0800

    Fix compile errors with GCC 4.2.
    
    gold/
    	PR gold/21040
    	* x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
    	Remove unnecessary 'typename' keyword.
    	(Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
    	* testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
    	declarations.

commit 1fa5f68bf38fc29f173990614db70fed1b66c0e0
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Wed Jan 11 11:26:26 2017 -0800

    Fix test cases to work for i386.
    
    gold/
    	PR gold/21039
    	* testsuite/script_test_13.sh: Adjust patterns to work for i386.
    	* testsuite/script_test_15a.sh: Likewise.
    	* testsuite/script_test_15b.sh: Likewise.
    	* testsuite/script_test_15c.sh: Likewise.

commit 9e65917652e994b0864b344bfa47014155d93100
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 11 09:16:44 2017 -0800

    x86-64: Correct unwind info for the BND PLT
    
    Since the BND PLT has
    
     230:	68 00 00 00 00       	pushq  $0x0
     235:	f2 e9 e5 ff ff ff    	bnd jmpq 220 <.plt>
     23b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
    
    instead of
    
     230:	ff 25 e2 0d 20 00    	jmpq   *0x200de2(%rip)        # 201018
    <func>
     236:	68 00 00 00 00       	pushq  $0x0
     23b:	e9 e0 ff ff ff       	jmpq   220 <.plt>
    
    its unwind info should be
    
    DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0;
    DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl;
    DW_OP_plus)
    
    bfd/
    
    	PR ld/21038
    	* elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
    	(elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
    	elf_x86_64_eh_frame_plt_got.
    	(elf_x86_64_size_dynamic_sections): Get unwind info from
    	elf_x86_64_bnd_arch_bed for the BND PLT.
    
    ld/
    
    	PR ld/21038
    	* testsuite/ld-x86-64/pr21038a.d: New file.
    	* testsuite/ld-x86-64/pr21038a.s: Likewise.
    	* testsuite/ld-x86-64/pr21038b.d: Likewise.
    	* testsuite/ld-x86-64/pr21038b.s: Likewise.
    	* testsuite/ld-x86-64/x86-64.exp: Run pr21038a and pr21038b.

commit 4ad2da7317c11fbf09e8feb9948b446d30ba9ec2
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Wed Jan 11 11:15:26 2017 -0500

    Fix typo in lookup_cmd_1 comment
    
    gdb/ChangeLog:
    
    	* cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.

commit f2e2d2f54b462db40efac449f4d7724ae4728fe5
Author: Jeremy Soller <jackpot51@gmail.com>
Date:   Wed Jan 11 15:05:53 2017 +0000

    Add support for x86/64 redox target.
    
    bfd	* config.bfd: Add entries for i686-redox and x86_64-redox.
    
    gas	* configure.tgt: Add entry for i386-redox.
    
    ld	* configure.tgt: Add entries for x86-redox and x86_64-redox.

commit c8b23b3f89fbb0ed28d6b78f775b0038d8604798
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 28 21:39:47 2016 -0700

    Add constructor and destructor to demangle_parse_info
    
    This adds a constructor and destructor to demangle_parse_info, and
    then changes all the users to use them.  This removes
    make_cleanup_cp_demangled_name_parse_free and its single use.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-type.c (typy_legacy_template_argument): Update.
    	* cp-support.h (struct demangle_parse_info) (demangle_parse_info,
    	~demangle_parse_info): Declare new members.
    	(cp_demangled_name_to_comp): Return unique_ptr.
    	(cp_demangled_name_parse_free)
    	(make_cleanup_cp_demangled_name_parse_free)
    	(cp_new_demangle_parse_info): Remove.
    	* cp-support.c (do_demangled_name_parse_free_cleanup)
    	(make_cleanup_cp_demangled_name_parse_free): Remove.
    	(inspect_type, cp_canonicalize_string_full)
    	(cp_canonicalize_string): Update.
    	(mangled_name_to_comp): Change return type.
    	(cp_class_name_from_physname, method_name_from_physname)
    	(cp_func_name, cp_remove_params): Update.
    	* cp-name-parser.y (demangle_parse_info): New constructor, from
    	cp_new_demangle_parse_info.
    	(~demangle_parse_info): New destructor, from
    	cp_demangled_name_parse_free.
    	(cp_merge_demangle_parse_infos): Update.
    	(cp_demangled_name_to_comp): Change return type.

commit 1ac32117f7224620f44ac966b5ca53df6e4fc5bd
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 28 21:11:53 2016 -0700

    Remove cleanups from execute_gdb_command
    
    This replaces a cleanup in execute_gdb_command with an instance of
    std::string.
    
    Testing showed that this originally missed a cleanup that was returned
    by prevent_dont_repeat.  This version of the patch changes
    prevent_dont_repeat to return a scoped_restore rather than a cleanup.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* top.c (prevent_dont_repeat): Change return type.
    	* python/python.c (execute_gdb_command): Use std::string.
    	Update.
    	* guile/guile.c (gdbscm_execute_gdb_command): Update.
    	* command.h (prevent_dont_repeat): Change return type.
    	* breakpoint.c (bpstat_do_actions_1): Update.

commit 0cf082277804ba3747be70a4013019f68b92bb84
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 21 21:04:59 2016 -0700

    Use scoped_value_mark in dwarf2_evaluate_loc_desc_full
    
    This changes dwarf2_evaluate_loc_desc_full to use scoped_value_mark.
    
    Note that this function previously called do_cleanup using the same
    cleanup multiple times.  I had thought this was buggy, but re-reading
    make_my_cleanup2 indicates that it is not.  Nevertheless it is
    surprising, and at least one of the calls (the one that is completely
    removed in this patch) seems to have been done under the assumption
    that it would still have some effect.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* value.h (scoped_value_mark::~scoped_value_mark): Call
    	free_to_mark.
    	(scoped_value_mark::free_to_mark): New method.
    	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
    	scoped_value_mark.

commit eb115069323087e15210c09e3b581be0f6fb5852
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 21 18:02:11 2016 -0700

    Add scoped_value_mark
    
    This adds a scoped_value_mark class, that records the value mark in
    the constructor and then calls value_free_to_mark in the destructor.
    It then updates various spots in gdb to use this class, rather than a
    cleanup.
    
    It would be better overall to replace "struct value *" with a
    shared_ptr, maybe eliminating the need for this class (watchpoints
    would perhaps need some new mechanism as well).  However, that's
    difficult to do.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-value.c (valpy_dereference, valpy_referenced_value)
    	(valpy_reference_value, valpy_const_value, valpy_get_address)
    	(valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
    	(valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
    	(valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
    	* dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
    	scoped_value_mark.
    	* dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
    	* value.h (scoped_value_mark): New class.

commit 906768f970826102252e8cfd30ee72da71de29f7
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 21 16:50:20 2016 -0700

    Remove make_cleanup_discard_psymtabs
    
    This removes make_cleanup_discard_psymtabs in favor of a new class.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
    	* psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
    	* psymtab.c (discard_psymtabs_upto): Remove.
    	(make_cleanup_discard_psymtabs): Remove.
    	(struct psymtab_state): Remove.

commit bef155c3e8a995fcdb1c2ba5aba012eb653d9f30
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 21 16:26:20 2016 -0700

    Introduce and use gdb::unlinker
    
    This introduces a new class, gdb::unlinker, that unlinks a file in the
    destructor.  The user of this class has the option to preserve the
    file instead, by calling the "keep" method.
    
    This patch then changes the spots in gdb that use unlink in a cleanup
    to use this class instead.  In one spot I went ahead and removed all
    the cleanups from the function.
    
    This fixes one latent bug -- do_bfd_delete_cleanup could refer to
    freed memory, by decref'ing the BFD before using its filename.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* record-full.c (record_full_save_cleanups): Remove.
    	(record_full_save): Use gdb::unlinker.
    	* gcore.c (do_bfd_delete_cleanup): Remove.
    	(gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
    	cleanups.
    	* dwarf2read.c (unlink_if_set): Remove.
    	(write_psymtabs_to_index): Use gdb::unlinker.
    	* common/gdb_unlinker.h: New file.

commit 192b62ce0b4bb5c61188f570e127a26d2c32f716
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 21 11:12:23 2016 -0700

    Use class to manage BFD reference counts
    
    This introduces a new specialization of gdb::ref_ptr that can be used
    to manage BFD reference counts.  Then it changes most places in gdb to
    use this new class, rather than explicit reference-counting or
    cleanups.  This patch removes make_cleanup_bfd_unref.
    
    If you look you will see a couple of spots using "release" where a use
    of gdb_bfd_ref_ptr would be cleaner.  These will be fixed in the next
    patch.
    
    I think this patch fixes some latent bugs.  For example, it seems to
    me that previously objfpy_add_separate_debug_file leaked a BFD.
    
    I'm not 100% certain that the macho_symfile_read_all_oso change is
    correct.  The existing code here is hard for me to follow.  One goal
    of this sort of automated reference counting, though, is to make it
    more difficult to make logic errors; so hopefully the code is clear
    now.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* windows-tdep.c (windows_xfer_shared_library): Update.
    	* windows-nat.c (windows_make_so): Update.
    	* utils.h (make_cleanup_bfd_unref): Remove.
    	* utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
    	* symfile.h (symfile_bfd_open)
    	(find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
    	* symfile.c (read_symbols, symbol_file_add)
    	(separate_debug_file_exists): Update.
    	(symfile_bfd_open): Return gdb_bfd_ref_ptr.
    	(generic_load, reread_symbols): Update.
    	* symfile-mem.c (symbol_file_add_from_memory): Update.
    	* spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
    	(spu_symbol_file_add_from_memory): Update.
    	* solist.h (struct target_so_ops) <bfd_open>: Return
    	gdb_bfd_ref_ptr.
    	(solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
    	* solib.c (solib_bfd_fopen, solib_bfd_open): Return
    	gdb_bfd_ref_ptr.
    	(solib_map_sections, reload_shared_libraries_1): Update.
    	* solib-svr4.c (enable_break): Update.
    	* solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
    	* solib-frv.c (enable_break2): Update.
    	* solib-dsbt.c (enable_break): Update.
    	* solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
    	gdb_bfd_ref_ptr.
    	(darwin_solib_get_all_image_info_addr_at_init): Update.
    	(darwin_bfd_open): Return gdb_bfd_ref_ptr.
    	* solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
    	* record-full.c (record_full_save): Update.
    	* python/py-objfile.c (objfpy_add_separate_debug_file): Update.
    	* procfs.c (insert_dbx_link_bpt_in_file): Update.
    	* minidebug.c (find_separate_debug_file_in_section): Return
    	gdb_bfd_ref_ptr.
    	* machoread.c (macho_add_oso_symfile): Change abfd to
    	gdb_bfd_ref_ptr.
    	(macho_symfile_read_all_oso): Update.
    	(macho_check_dsym): Return gdb_bfd_ref_ptr.
    	(macho_symfile_read): Update.
    	* jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
    	(jit_bfd_try_read_symtab): Update.
    	* gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
    	(gdb_bfd_openw, gdb_bfd_openr_iovec)
    	(gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
    	gdb_bfd_ref_ptr.
    	(gdb_bfd_ref_policy): New struct.
    	(gdb_bfd_ref_ptr): New typedef.
    	* gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
    	(gdb_bfd_openw, gdb_bfd_openr_iovec)
    	(gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
    	gdb_bfd_ref_ptr.
    	* gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
    	* gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
    	(gcore_command): Update.
    	* exec.c (exec_file_attach): Update.
    	* elfread.c (elf_symfile_read): Update.
    	* dwarf2read.c (dwarf2_get_dwz_file): Update.
    	(try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
    	(open_and_init_dwo_file): Update.
    	(open_dwp_file): Return gdb_bfd_ref_ptr.
    	(open_and_init_dwp_file): Update.
    	* corelow.c (core_open): Update.
    	* compile/compile-object-load.c (compile_object_load): Update.
    	* common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
    	* coffread.c (coff_symfile_read): Update.
    	* cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
    	gdb_bfd_ref_ptr.  Rename.
    	(dump_bfd_file, restore_command): Update.
    	* build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
    	* build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
    	(find_separate_debug_file_by_buildid): Update.

commit 50315b21779d71c172eb98a786a9b8281622e407
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 17:48:31 2016 -0700

    Add gdb_ref_ptr.h
    
    This adds a new gdb_ref_ptr.h, that implements a reference-counting
    smart pointer class, where the user of the class supplies a
    reference-counting policy object.
    
    This class will be used in the next patch, which changes most explicit
    BFD reference counts to use this new type.  Meanwhile, this patch
    changes gdbpy_ref to be a specialization of this new class.
    
    This change required adding new nullptr_t overloads some operators in
    gdb_ref_ptr.h.  I suspect this was needed because some Python header
    redefines NULL, but I'm not certain.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* common/gdb_ref_ptr.h: New file.
    	* python/py-ref.h (struct gdbpy_ref_policy): New.
    	(gdbpy_ref): Now a typedef.

commit fc4007c969ec4208fb7c7cee2f50211a9aa0f40f
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 13:20:32 2016 -0700

    Remove make_cleanup_htab_delete
    
    This removes make_cleanup_htab_delete in favor of destructors,
    building on an earlier patch that added the htab_up typedef.
    
    Testing revealed that more cleanup-removal work was needed in
    dwarf2loc.c, so this version of the patch changes code there to use
    unordered_set and vector, removing some more cleanups.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* utils.h (make_cleanup_htab_delete): Don't declare.
    	* utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
    	Remove.
    	* linespec.c (decode_compound_collector): Add constructor,
    	destructor.
    	(lookup_prefix_sym): Remove cleanup.
    	(symtab_collector): Add constructor, destructor.
    	(collect_symtabs_from_filename): Remove cleanup.
    	* disasm.c (do_mixed_source_and_assembly): Use htab_up.
    	* compile/compile-c-symbols.c (generate_c_for_variable_locations):
    	Use htab_up.
    	* gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
    	* dwarf2read.c (dw2_expand_symtabs_matching)
    	(dw2_map_symbol_filenames, dwarf_decode_macros)
    	(write_psymtabs_to_index): Use htab_up.
    	* dwarf2loc.c (func_verify_no_selftailcall)
    	(call_site_find_chain_1, func_verify_no_selftailcall)
    	(chain_candidate, call_site_find_chain_1): Use std::unordered_set,
    	std::vector, gdb::unique_xmalloc_ptr.
    	(call_sitep): Remove typedef.
    	(dwarf2_locexpr_baton_eval): Remove unused variable.

commit 8dbcee674ea4a8daa55f880ad7ade96efca96951
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 11:16:41 2016 -0700

    Remove make_cleanup_py_decref and make_cleanup_py_xdecref
    
    make_cleanup_py_decref and make_cleanup_py_xdecref are now unused, so
    this patch removes themm.  Future Python changes should use gdbpy_ref
    instead.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python-internal.h (make_cleanup_py_decref)
    	(make_cleanup_py_xdecref): Don't declare.
    	* python/py-utils.c (py_decref, make_cleanup_py_decref)
    	(py_xdecref, make_cleanup_py_xdecref): Remove.

commit 13df46cc0f340253e8a7bd984d1e4f38f29eec2d
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 11:04:40 2016 -0700

    Use gdbpy_ref rather than make_cleanup_py_decref
    
    This changes some spots in py-framefilter.c to use gdbpy_ref rather
    than make_cleanup_py_decref or make_cleanup_py_xdecref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
    	(py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.

commit 06fc9bf7d92d0bc857f3e8c109686f36aea5509c
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:57:28 2016 -0700

    Use gdbpy_ref in enumerate_args
    
    This changes enumerate_args to use gdbpy_ref, and gets rid of many
    gotos.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-framefilter.c (enumerate_args): Use gdbpy_ref.

commit 830a493402da4a055bf2d34ab300a83305391095
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:52:25 2016 -0700

    Use gdbpy_ref in py-utils.c
    
    This changes more places in py-utils.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-utils.c (unicode_to_encoded_string)
    	(python_string_to_target_string)
    	(python_string_to_target_python_string)
    	(python_string_to_host_string, gdbpy_obj_to_string)
    	(get_addr_from_python): Use gdbpy_ref.

commit 4586d54305ed275bb909f3373a7372c02d7e579e
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:48:51 2016 -0700

    Use gdbpy_ref in pyuw_object_attribute_to_pointer
    
    This changes pyuw_object_attribute_to_pointer to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
    	gdbpy_ref.

commit 59876f8f9f32081b2831aed83a03a815e8d85a97
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:46:23 2016 -0700

    Use gdbpy_ref in python.c
    
    This changes more places in python.c to use gdbpy_ref.
    
    Additionally, previously gdbpy_apply_type_printers would return
    EXT_LANG_RC_ERROR if a type printer returned None.  However, that
    doesn't seem correct to me; this patch changes it to return
    EXT_LANG_RC_NOP in this case.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (eval_python_command, gdbpy_decode_line)
    	(gdbpy_run_events, gdbpy_start_type_printers)
    	(gdbpy_apply_type_printers): Use gdbpy_ref.

commit 97d83487d5fbffd04d68a049f97009e1df2562a3
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:34:34 2016 -0700

    Use gdbpy_ref in py-param.c
    
    This changes py-param.c to use gdbpy_ref in a couple more spots.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-param.c (get_doc_string, compute_enum_values): Use
    	gdbpy_ref.

commit 9205649a38c609a42ba52680a316fceaa08c1543
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:31:17 2016 -0700

    Use gdbpy_ref in py-inferior.c
    
    This changes py-inferior.c to use gdbpy_ref in more places.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-inferior.c (find_thread_object, build_inferior_list):
    	Use gdbpy_ref.

commit 74c49d454b81c84fcffbc090466e241bdefd2f3a
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:27:59 2016 -0700

    Use gdbpy_ref in py_print_frame
    
    This changes py_print_frame to use gdbpy_ref in more places.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-framefilter.c (py_print_frame): Use gdbpy_ref.

commit 16361ffbd145c877952f3c124c247460a6005d26
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:25:29 2016 -0700

    Use gdbpy_ref in bpfinishpy_out_of_scope
    
    This changes bpfinishpy_out_of_scope to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
    	gdbpy_ref.

commit 905f2ccab1b7070c7953e9f12de638e2dc147a9a
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:23:08 2016 -0700

    Use gdbpy_ref in py-cmd.c
    
    This changes py-cmd.c to use gdbpy_ref in more places.  This also
    fixes a latent memory leak in cmdpy_completer_helper, which
    unnecessarily increfs the result of PyObject_CallMethodObjArgs.  This
    is not needed because that function returns a new reference.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
    	extra incref.
    	(cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
    	Use gdbpy_ref.

commit 64081434cce13f38288d82d3d31b6199e9deff4a
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:13:31 2016 -0700

    Use gdbpy_ref in gdbpy_breakpoint_cond_says_stop
    
    This changes gdbpy_breakpoint_cond_says_stop to use gdbpy_ref rather
    than explicit reference management.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
    	gdbpy_ref.

commit 59e9e83119a528f17afea89ee22195a95322c6d6
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 20 10:10:58 2016 -0700

    Use gdbpy_ref in archpy_disassemble
    
    This changes archpy_disassemble to use gdbpy_ref.  It also fixes a
    latent bug where archpy_disassemble was decref'ing the results of a
    all to PyArg_ParseTupleAndKeywords.  This is incorrect because
    PyArg_ParseTupleAndKeywords returns borrowed references.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
    	decref results of PyArg_ParseTupleAndKeywords.

commit 9de10f6d53dffbec12cec9843662d5764526983d
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 12:08:17 2016 -0700

    Change python_run_simple_file to use gdbpy_ref
    
    This changes python_run_simple_file to use gdbpy_ref and
    unique_xmalloc_ptr.  Thi fixes a latent bug in this function, where
    the error path previously ran the cleanups and then referred to one of
    the objects just freed.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (python_run_simple_file): Use
    	unique_xmalloc_ptr, gdbpy_ref.

commit 2bd5759dcb71adfb26b1c7cf20b3b032af29b845
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 12:07:16 2016 -0700

    Use gdbpy_ref in py-prettyprint.c
    
    This changes some spots in py-prettyprint.c to use gdbpy_ref.  It also
    changes push_dummy_python_frame to be a class, rather than having it
    create a cleanup.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-prettyprint.c (print_stack_unless_memory_error)
    	(print_string_repr, print_children): Use gdbpy_ref.
    	(dummy_python_frame): New class.
    	(dummy_python_frame::dummy_python_frame): Rename from
    	push_dummy_python_frame.
    	(py_restore_tstate): Remove.

commit 3b4e0e01f8b19269d720948ee2350cb753f8ede4
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:57:45 2016 -0700

    Use gdbpy_ref in py_print_frame
    
    This changes py_print_frame to use gdbpy_ref in a few spots.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-framefilter.c (py_print_frame): Use gdbpy_ref.

commit 17a22718b113a220de121ef4211fc3990d9b1745
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:53:50 2016 -0700

    Remove ensure_python_env
    
    All of gdb has been converted away from ensure_python_env and
    varobj_ensure_python_env now; so remove them.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (ensure_python_env, restore_python_env):
    	Remove.
    	* python/python-internal.h (ensure_python_env): Don't declare.
    	* varobj.h (varobj_ensure_python_env): Don't declare.
    	* varobj.c (varobj_ensure_python_env): Remove.

commit 68cdc55720bbe34d9d844ef2a0c4d75fcab4bc99
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:51:59 2016 -0700

    Use gdbpy_enter_varobj in varobj_value_get_print_value
    
    This changes the last function in varobj.c to use gdbpy_enter_varobj.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* varobj.c (varobj_value_get_print_value): Use
    	gdbpy_enter_varobj.

commit 1eba63835ea23cbae6059c076db985a47e39ce24
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:48:48 2016 -0700

    Change type of encoding argument to gdbpy_extract_lazy_string
    
    This changes gdbpy_extract_lazy_string's "encoding" argument to be a
    unique_xmalloc_ptr.  I chose this rather than std::string because it
    can sometimes be NULL.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-prettyprint.c (print_string_repr, print_children):
    	Update.
    	* python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
    	of "encoding".
    	* varobj.c (varobj_value_get_print_value): Update.
    	* python/python-internal.h (gdbpy_extract_lazy_string): Update.

commit bde7b3e3a0d5e1f0b66730d692b21c98a8686f75
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:37:52 2016 -0700

    Use gdbpy_enter_varobj in more of varobj.c
    
    This converts most of the remaining functions in varobj.c to use
    gdbpy_enter_varobj.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* varobj.c (varobj_get_display_hint)
    	(dynamic_varobj_has_child_method, install_new_value_visualizer)
    	(varobj_set_visualizer, free_variable): Use
    	gdbpy_enter_varobj.

commit a7785f8c797183eb363e95c201343df67d8536c6
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:32:05 2016 -0700

    Use gdbpy_enter in python.c
    
    This changes the last functions in python.c to use gdbpy_enter.  I
    split gdbpy_finish_initialization into two functions in order to avoid
    some "goto"s.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
    	(do_finish_initialization): New function.  Use gdbpy_ref.
    	(gdbpy_finish_initialization): Use gdbpy_enter.  Call
    	do_finish_initialization.

commit 2865bfce3875fa16046b0a987d98ab19fc8bbb9a
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:23:36 2016 -0700

    Use gdbpy_enter in py-param.c
    
    This converts the remaining functions in py-param.c to use
    gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-param.c (get_set_value, get_show_value): Use
    	gdbpy_enter, gdbpy_ref.

commit 0e9dcc758786feaaaf5026c6e59af42b30a35d36
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:15:46 2016 -0700

    Use gdbpy_enter in fnpy_call
    
    This changes fnpy_call to use gdbpy_enter and gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.

commit 12a5cedd4f2c5b1f4e303efda6f8ac3e06eec944
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 12 11:12:41 2016 -0700

    Use gdbpy_enter in cmdpy_function
    
    This changes cmdpy_function to use gdbpy_enter and gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.

commit 788f258604773ccbe9ccba71f9b1725930324275
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 20:14:32 2016 -0700

    Use gdbpy_enter_varobj in py-varobj.c
    
    This converts the remaining functions in py-varobj.c to use
    gdbpy_enter_varobj.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
    	Use gdbpy_enter_varobj.

commit 6cd67beaae58c9e870b79feea3cf74ffdf7a9b33
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 16:18:24 2016 -0700

    Introduce gdbpy_enter_varobj and use it
    
    This introduces gdbpy_enter_varobj, a subclass of gdbpy_enter; then
    changes one function in py-varobj.c to use it.  gdbpy_enter_varobj
    takes a varobj as an argument, similar to varobj_ensure_python_env.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* varobj.c (gdbpy_enter_varobj): New constructor.
    	* python/python-internal.h (gdbpy_enter_varobj): New class.
    	* python/py-varobj.c (py_varobj_get_iterator): Use
    	gdbpy_enter_varobj.

commit 14b122bf1ce59f5f1b82f6e2a347f4ad89801f45
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 15:47:39 2016 -0700

    Use gdbpy_enter in py-xmethod.c
    
    This changes the remaining functions in py-xmethod.c to use
    gdbpy_enter; using gdbpy_ref and unique_xmalloc_ptr as
    appropriate.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
    	gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
    	(gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
    	(gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
    	unique_xmalloc_ptr.
    	(gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.

commit bf1ca3b9476185fb6e301d85e646f5d2af95e257
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 15:35:24 2016 -0700

    Use gdbpy_ref in invoke_match_method
    
    Change invoke_match_method to use gdbpy_ref.
    I neglected to convert this function in my earlier series.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-xmethods.c (invoke_match_method): Use
    	gdbpy_ref.

commit 572a5524c1eb50d8064a44108fd0ef22a0e63bf8
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 15:34:55 2016 -0700

    Use gdbpy_enter in gdbpy_get_matching_xmethod_workers
    
    Change gdbpy_get_matching_xmethod_workers to use gdbpy_enter and
    gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
    	gdbpy_enter, gdbpy_ref.

commit 396a78b6271c45410fc22c4bc7f8cff75da3d153
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 15:15:01 2016 -0700

    Use gdbpy_enter in python_interactive_command
    
    This changes python_interactive_command to use gdbpy_enter.
    Previously this function was leaving a dangling cleanup -- this is
    sort of ok in a command function, but IMO it's still better to clean
    up.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (python_interactive_command): Use gdbpy_enter.

commit a88b13c7e36e8eb0a3bf772d508380682536c0da
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 15:13:49 2016 -0700

    Use gdbpy_enter in gdbpy_before_prompt_hook
    
    Change gdbpy_before_prompt_hook to use gdbpy_enter and gdbpy_ref.
    This also rearranges the function a tiny bit to make it more clear.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
    	gdbpy_ref.

commit e9f0c3639f33dc76fcab1b9299209c29ef2ee26e
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 11:38:22 2016 -0700

    Use gdbpy_enter in py-prettyprint.c
    
    Change py-prettyprint.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
    	gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.

commit 6349f452e01ddb7a1e64b8a63c93a9c9abc95725
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 8 11:11:55 2016 -0700

    Introduce htab_up and use gdbpy_enter in py-framefilter.c
    
    This introduces a new "htab_up" typedef, which is a std::unique_ptr
    that can call htab_delete.  Then it changes some code in
    py-framefilter.c to use both gdbpy_enter and the new htab_up.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* utils.h (htab_deleter): New struct.
    	(htab_up): New typedef.
    	* python/py-framefilter.c (gdbpy_apply_frame_filter): Use
    	gdbpy_enter, gdbpy_ref, htab_up.

commit c0171de646ddd85bac9d4bb1ebdf601f7ba7eeab
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 20:41:50 2016 -0700

    Use gdbpy_enter in py-unwind.c
    
    Change py-unwind.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-unwind.c (pending_frame_invalidate): Remove.
    	(pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.

commit f18e226ff84f7fba9ce7197ed7a2969eba231b4d
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:13:40 2016 -0700

    Use gdbpy_enter in py-xmethods.c
    
    Change the simple parts of py-xmethods.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
    	(gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.

commit c57af3f12b91ca49adc2e06056f794cb09514897
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:12:17 2016 -0700

    Use gdbpy_enter in py-type.c
    
    Change py-type.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-type.c (save_objfile_types): Use gdbpy_enter.

commit 60e600ec691255536ae53e365d0410ecf79bdea2
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:11:37 2016 -0700

    Use gdbpy_enter in python.c
    
    Change the simple parts of python.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (gdbpy_eval_from_control_command)
    	(gdbpy_source_script, gdbpy_run_events)
    	(gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
    	(gdbpy_free_type_printers, gdbpy_finish_initialization): Use
    	gdbpy_enter.

commit bf7da5b06ffbbaa40c8a2900727a791265f897ea
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:08:36 2016 -0700

    Use gdbpy_enter in py-progspace.c
    
    Change py-progspace.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-progspace.c (py_free_pspace): Use gdbpy_enter.

commit 2d38bcedc2f91692857d257e106dafc9269d8f1a
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:07:53 2016 -0700

    Use gdbpy_enter in py-objfile.c
    
    Change py-objfile.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-objfile.c (py_free_objfile): Use gdbpy_enter.

commit 07bc7329128028e6d3e2733c6d2ebd874367bcee
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:06:26 2016 -0700

    Use gdbpy_enter in py-inferior.c
    
    Change py-inferior.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-inferior.c (python_on_normal_stop, python_on_resume)
    	(python_on_inferior_call_pre, python_on_inferior_call_post)
    	(python_on_memory_change, python_on_register_change)
    	(python_inferior_exit, python_new_objfile, add_thread_object)
    	(delete_thread_object, py_free_inferior): Use gdbpy_enter.

commit 6e7c365ee0ea2551f9f840b71081fdf759088b5e
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:03:10 2016 -0700

    Use gdbpy_enter in py-finishbreakpoint.c
    
    Change py-finishbreakpoint.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
    	(bpfinishpy_handle_exit): Use gdbpy_enter.

commit 6ba0cd406511d3edbe643f5e599d79538febedc5
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 16:02:16 2016 -0700

    Use gdbpy_enter in py-cmd.c
    
    Change py-cmd.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-cmd.c (cmdpy_destroyer)
    	(cmdpy_completer_handle_brkchars, cmdpy_completer): Use
    	gdbpy_enter.

commit de2dc875c2ddb731741f3c326545ff91fd587dd5
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 15:59:41 2016 -0700

    Use gdbpy_enter in py-breakpoint.c
    
    Change py-breakpoint.c to use gdbpy_enter.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
    	gdbpy_enter.
    	(gdbpy_breakpoint_has_cond): Likewise.

commit 4ecee2c47da3e91c0571683acb5cfb8400402663
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Nov 7 15:56:57 2016 -0700

    Introduce gdbpy_enter
    
    This introduces gdbpy_enter, a class that can be used to acquire and
    release the Python GIL, and also set other Python-related globals used
    by gdb.  ensure_python_env is rewritten in terms of this new class.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (gdbpy_enter): New constructor.
    	(~gdbpy_enter): New destructor.
    	(restore_python_env, ensure_python_env): Rewrite.
    	* python/python-internal.h (gdbpy_enter): New class.

commit 37fce74fb42f45ec340962170a4b297beede733a
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:51:20 2016 -0700

    Use gdbpy_ref in gdbpy_lookup_symbol
    
    This changes gdbpy_lookup_symbol to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.

commit 53a0cca3bd0f6ae80b2d6fc34b2873046965c7f0
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:50:36 2016 -0700

    Use gdbpy_ref in py-value.c
    
    This changes a few functions in py-value.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-value.c (value_has_field, get_field_flag)
    	(get_field_type, valpy_getitem, convert_value_from_python): Use
    	gdbpy_ref.

commit ff3724f5123b9d9c52a07f7c1a5d85852e666c48
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:49:34 2016 -0700

    Use gdbpy_ref in python.c
    
    This changes a couple of functions in python.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
    	gdbpy_ref.

commit 0700aea50c7a77d7908868373d0f9644b0ece29c
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:37:01 2016 -0700

    Use gdbpy_ref in py-prettyprint.c
    
    This changes several functions in py-prettyprint.c to use
    gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-prettyprint.c (search_pp_list)
    	(find_pretty_printer_from_objfiles)
    	(find_pretty_printer_from_progspace)
    	(find_pretty_printer_from_gdb, find_pretty_printer)
    	(gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
    	gdbpy_ref.

commit 1bb44c9f567c75355c1b4417d88cda959e82a3a3
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:29:12 2016 -0700

    Use gdbpy_ref in call_doc_function
    
    This changes call_doc_function to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-param.c (call_doc_function): Use gdbpy_ref.

commit 87ce03fdc5a94f48fe62580410a099c0a0f68ee0
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:25:34 2016 -0700

    Use gdbpy_ref in py-linetable.c
    
    This changes some code in py-linetable.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-linetable.c (build_line_table_tuple_from_pcs)
    	(ltpy_get_all_source_lines): Use gdbpy_ref.

commit ee0a3fb85b33b172f704796612c4487ea368d675
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:25:31 2016 -0700

    Use gdbpy_ref in py-framefilter.c
    
    This changes some code in py-framefilter.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-framefilter.c (extract_sym, extract_value)
    	(get_py_iter_from_func, bootstrap_python_frame_filters): Use
    	gdbpy_ref.

commit bf2a52fa2ac2c4486653993a765fd922b3cd64a6
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:25:22 2016 -0700

    Use gdbpy_ref in gdbpy_breakpoints
    
    This changes gdbpy_breakpoints to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.

commit f59fe7f8e3e55472e6fcfb06677ff4925dad1f64
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:23:31 2016 -0700

    Use gdbpy_ref in gdbpy_inferiors
    
    This changes gdbpy_inferiors to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.

commit 80bd970a4b1388fc4373b3e087006e6c93d71f60
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:21:14 2016 -0700

    Use gdbpy_ref in py-function.c
    
    This changes some code in py-function.c to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-function.c (convert_values_to_python, fnpy_init): Use
    	gdbpy_ref.

commit d1b3de2e43380a0c51772a40315cd2268573d985
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 21:10:18 2016 -0700

    Use gdbpy_ref in gdbpy_string_to_argv
    
    This chanes gdbpy_string_to_argv to use gdbpy_ref.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.

commit 3bb4338431288002c2225ff660e1500818684c16
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 20:59:51 2016 -0700

    Use gdbpy_ref in py-type.c
    
    This changes py-type.c to use gdbpy_ref.
    This results in simpler logic and the removal of "goto"s.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-type.c (convert_field, make_fielditem, typy_fields)
    	(typy_range): Use gdbpy_ref.

commit abf5651e47c0396df58a37951bc03a349169c5f2
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 6 20:42:32 2016 -0700

    Change event code to use gdbpy_ref
    
    This changes the event code in the Python layer to use
    gdbpy_ref, simplifying the logic in many places.
    
    It also changes evpy_emit_event not to steal a reference to its
    argument.  This is simpler to do now that gdbpy_ref is in use;
    it's also a reasonable cleanup in its own right.  While doing this I
    realized that evpy_emit_event should not be calling gdbpy_print_stack
    (all the outermost callers do this if needed), so I removed this as
    well.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-threadevent.c (create_thread_event_object): Use
    	gdbpy_ref.
    	* python/py-stopevent.c (create_stop_event_object): Simplify.
    	(emit_stop_event): Use gdbpy_ref.
    	* python/py-signalevent.c (create_signal_event_object): Use
    	gdbpy_ref.
    	* python/py-newobjfileevent.c (create_new_objfile_event_object)
    	(emit_new_objfile_event, create_clear_objfiles_event_object)
    	(emit_clear_objfiles_event): Use gdbpy_ref.
    	* python/py-infevents.c (create_inferior_call_event_object)
    	(create_register_changed_event_object)
    	(create_memory_changed_event_object, emit_inferior_call_event)
    	(emit_memory_changed_event, emit_register_changed_event): Use
    	gdbpy_ref.
    	* python/py-exitedevent.c (create_exited_event_object)
    	(emit_exited_event): Use gdbpy_ref.
    	* python/py-event.h (evpy_emit_event): Remove
    	CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
    	* python/py-event.c (evpy_emit_event): Use gdbpy_ref.
    	* python/py-continueevent.c (emit_continue_event): Use
    	gdbpy_ref.
    	* python/py-breakpoint.c (gdbpy_breakpoint_created)
    	(gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
    	gdbpy_ref.
    	* python/py-bpevent.c (create_breakpoint_event_object): Use
    	gdbpy_ref.

commit a68ff33e0dcb4733584265088030d12a31e740e4
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Nov 5 13:43:23 2016 -0600

    Introduce py-ref.h
    
    This patch introduces class gdbpy_ref, which is a sort of smart
    pointer that owns a single Python reference to a PyObject.  This class
    acts a bit like unique_ptr, but also a bit like shared_ptr (in that
    copies do what you might expect); I considered going solely with
    unique_ptr but it seemed quite strange to have a unique_ptr that
    actually manages a shared resource.
    
    Subsequent patches use this new class to simplify logic in the Python
    layer.
    
    2017-01-10  Tom Tromey  <tom@tromey.com>
    
    	* python/py-ref.h: New file.

commit 0b67023188fef926357f0fd27e600195ab35727e
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Wed Jan 11 00:00:35 2017 +0000

    Automatic date update in version.in

commit 52b232b366355b1d0a9d2721e55a6b2b96789b00
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 10 14:18:11 2017 -0800

    i386/x32: Align .eh_frame section to 4 bytes
    
    .eh_frame section covering PLT sections should be aligned to 4 bytes
    for i386 and x32.
    
    bfd/
    
    	* elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
    	to 4 bytes.
    	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
    	.eh_frame section to 4 bytes for x32.
    	(elf_x86_64_check_relocs): Likewise.
    
    ld/
    
    	* testsuite/ld-x86-64/pr20830b.d: Updated.

commit 59a1e29d9e1fc7ed31e66d51899ada46e5dd9a56
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 10 13:57:39 2017 -0800

    X32: Place .plt.got section after .plt section
    
    This patch places .plt.got section after .plt section for x32.
    
    	* emulparams/elf32_x86_64.sh (TINY_READONLY_SECTION): New.
    	* testsuite/ld-x86-64/pr20830.d: Renamed to ...
    	* testsuite/ld-x86-64/pr20830a.d: This.  Updated.
    	* testsuite/ld-x86-64/pr20830b.d: New file.
    	* testsuite/ld-x86-64/x86-64.exp: Rename pr20830 to pr20830a.
    	Run pr20830b.

commit fff53daefb7838b5718422c87946330e4a8288ce
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 10 13:31:59 2017 -0800

    i386/x86-64: Add unwind info for .plt.got section
    
    When there are both PLT and GOT references to the same function symbol,
    linker combines GOTPLT and GOT slots into a single GOT slot and create
    an entry in .plt.got section for PLT access via the GOT slot.  This
    patch adds unwind info for .plt.got section.
    
    bfd/
    
    	PR ld/20830
    	* elf32-i386.c (elf_i386_eh_frame_plt_got): New.
    	(PLT_GOT_FDE_LENGTH): Likewise.
    	(elf_i386_plt_layout): Add eh_frame_plt_got and
    	eh_frame_plt_got_size.
    	(elf_i386_plt): Updated.
    	(elf_i386_link_hash_table): Add plt_got_eh_frame.
    	(elf_i386_check_relocs): Create .eh_frame section for .plt.got.
    	(elf_i386_size_dynamic_sections): Allocate and initialize
    	.eh_frame section for .plt.got.
    	(elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
    	.plt.got.
    	(elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
    	eh_frame_plt_got_size.
    	* elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
    	(PLT_GOT_FDE_LENGTH): Likewise.
    	(elf_x86_64_backend_data): Add eh_frame_plt_got and
    	eh_frame_plt_got_size.
    	(elf_x86_64_arch_bed): Updated.
    	(elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
    	eh_frame_plt_got_size.
    	(elf_x86_64_nacl_arch_bed): Likewise.
    	(elf_x86_64_link_hash_table): Add plt_got_eh_frame.
    	(elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
    	(elf_x86_64_size_dynamic_sections): Allocate and initialize
    	.eh_frame section for .plt.got.
    	(elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
    	for .plt.got.
    
    ld/
    
    	PR ld/20830
    	* testsuite/ld-i386/i386.exp: Run pr20830.
    	* testsuite/ld-x86-64/x86-64.exp: Likewise.
    	* testsuite/ld-i386/pr20830.d: New file.
    	* testsuite/ld-i386/pr20830.s: Likewise.
    	* testsuite/ld-x86-64/pr20830.d: Likewise.
    	* testsuite/ld-x86-64/pr20830.s: Likewise.

commit 5edad15d7c1e6a2409102b3426b444d6ea98bdfc
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 11 07:41:53 2017 +1030

    [GOLD] PowerPC64 TOC indirect to TOC relative code editing
    
    Doesn't yet trim off the unused TOC entries.
    
    	* powerpc.cc (class Powerpc_copy_relocs): New.
    	(Powerpc_copy_relocs::emit): New function.
    	(Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables.
    	(Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines.
    	(Powerpc_relobj::do_relocate_sections): New function.
    	(Powerpc_relobj::make_toc_relative): Likewise.
    	(Powerpc_relobj::do_find_special_sections): Stash away .rela.toc
    	and .toc too.
    	(ok_lo_toc_insn): Move earlier, and handle more insns.
    	(Target_powerpc::Scan::local): If optimizing toc accesses, set
    	no_toc_opt for entries we can't edit.  Check insn validity.
    	Emit "toc optimization is not supported" warning, downgraded
    	from error.
    	(Target_powerpc::Scan::global): Likewise.
    	(Target_powerpc::Relocate::relocate): Edit TOC indirect code
    	to TOC relative.  Don't emit "toc optimization is not supported"
    	error here.

commit f129e49f4d07f4d36319ac757fdcf3a8ce7d605b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 10 11:30:25 2017 -0800

    Don't use elf_i386_eh_frame_plt directly
    
    Use eh_frame_plt_size and eh_frame_plt from elf_i386_plt_layout for
    .eh_frame covering the .plt section.
    
    	* elf32-i386.c (elf_i386_size_dynamic_sections): Set
    	plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.

commit e92372274e77fc0ce87f35a833de8a60d733580a
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 10 10:54:39 2017 -0800

    i386: Pass -Wl,-R,tmpdir/-Wl --as-needed to $CC
    
    Since linker tests were changed to use $CC, instead of $LD, we need
    to pass -Wl,-R,tmpdir and -Wl,--as-needed to $CC.
    
    	* testsuite/ld-i386/i386.exp: Pass -Wl,-R,tmpdir to GCC driver.
    	* testsuite/ld-i386/tls.exp: Likewise.

commit 7becfd03bad526c02216eeb5ec2bebae694b1af1
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Jan 10 11:30:47 2017 -0500

    Change return type of ui_out redirect to void
    
    All implementations of redirect/do_redirect in the ui_out subsystem
    always return 0 (success).  We can therefore clean it up and make them
    return void.
    
    gdb/ChangeLog:
    
    	* cli-out.c (cli_ui_out::do_redirect): Change return type to
    	void.
    	* cli-out.h (cli_ui_out::do_redirect): Likewise.
    	* mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
    	* mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
    	* ui-out.c (ui_out::redirect): Likewise.
    	* ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
    	* cli/cli-logging.c (set_logging_redirect): Update call site of
    	ui_out::redirect.
    	(handle_redirections): Likewise.
    	* scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
    	* top.c (execute_command_to_string): Likewise.
    	* utils.c (do_ui_out_redirect_pop): Likewise.

commit 98461510d3a8cefa6603980294bfc647cddcab97
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Tue Jan 10 07:46:30 2017 -0800

    Refactor Sized_relobj_file::do_relocate_sections.
    
    gold/
    	* aarch64.cc (AArch64_relobj::do_relocate_sections): Call
    	Sized_relobj_file::relocate_section_range().
    	* arm.cc (Arm_relobj::do_relocate_sections): Likewise.
    	* object.h (Sized_relobj_file::relocate_section_range): New method.
    	* reloc.cc (Sized_relobj_file::do_relocate_sections): Move
    	implementation...
    	(Sized_relobj_file::relocate_section_range): ...to new method.

commit df2946549f60624503663cc6c28cd5a6ef0ab434
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Jan 10 10:16:26 2017 -0500

    Update help of the "frame" command
    
    The help message of the "frame" command states that nothing is printed
    if the command is executed from the command file or user-defined
    command.  My testing leads me to think that this is not true (at least
    today).
    
      (gdb) bt
      #0  bar (n=17) at test.c:9
      #1  0x00000000004006e0 in foo (v=17) at test.c:13
      #2  0x00000000004006f0 in main () at test.c:21
      (gdb) frame
      #0  bar (n=17) at test.c:9
      9	    baz(n);
      (gdb) define foo
      Type commands for definition of "foo".
      End with a line saying just "end".
      >frame 1
      >end
      (gdb) foo
      #1  0x00000000004006e0 in foo (v=17) at test.c:13
      13	    bar(v);
    
    This patch simply removes that bit from the help message.  I didn't find
    anything corresponding to this in the documentation that needs to be
    fixed.
    
    The behavior change corresponding to this documentation change was done
    in commit b00771232fab861fb31e42dfd5f6643ba1b43cc9.
    
    gdb/ChangeLog:
    
    	* stack.c (_initialize_stack): Update "frame" command help message.

commit 1a94eb29d0dd72e6c34bb2d32927c510d16e4c00
Author: Tristan Gingold <gingold@adacore.com>
Date:   Tue Jan 10 14:43:01 2017 +0100

    Fix sleb128-8 regressions.
    
    gas/
    	* testsuite/gas/all/sleb128-8.d: Adjust test.
    	* testsuite/gas/all/gas.exp (test_cond): Likewise.

commit b972a0d61a8b6e1dc3f9baf93ef3e57c7bfb9715
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Jan 10 11:45:12 2017 +0000

    Fix compile time warning about pointer comparison.
    
    	PR 21034
    	* stabs.c (parse_stab_members): Fix thinko checking for g++
    	version 1 stabs information.

commit 07e8e62387eb914b29cbf79f468db89fa4e57b3f
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Jan 10 11:28:36 2017 +0000

    Updated Swedish translations for GAS and LD

commit 07ccf83cf5424d019ab091a7bac0fee26564e420
Author: Graham Markall <graham.markall@embecosm.com>
Date:   Thu Dec 8 16:58:23 2016 +0000

    [ARC] Add new linker emulation for nps
    
    The arc700 nps variant uses some specific named sections to
    facilitate its CMEM based instructions, which operate on memory
    regions fixed at specific addresses.
    
    This commit adds the arclinux_nps emulation, which is based on the
    arclinux emulation. The new emulation uses the OTHER_SECTIONS
    variable in the emulation parameters script to provide symbols
    mapping to various locations in the CMEM space on nps.
    
    The accompanying test ensures that all symbols are provided at the
    correct address in the linker script.
    
    ld/ChangeLog:
    
      * Makefile.am: Add earclinux_nps.c target and add to
      ALL_EMULATION_SOURCES.
      * Makefile.in: Likewise, regenerated.
      * configure.tgt: Add arclinux_nps as an extra emulation for
      arc*-*-elf* and arc*-*-linux*.
      * emulparams/arc-nps.sh: New file.
      * emulparams/arclinux_nps.sh: New file.
      * testsuite/ld-arc/arclinux-nps.d,
      * testsuite/ld-arc/arclinux-nps.s: New test.

commit 74def31dcd248441a49755721da81ca73d99c4fb
Author: Tristan Gingold <gingold@adacore.com>
Date:   Mon Jan 9 15:50:32 2017 +0100

    This patch ensure same output for sleb128 with large number.
    
    gas/
    	* read.c (emit_leb128_expr): Extended unsigned big number for
    	sleb128.
    	* testsuite/gas/all/gas.exp (test_cond): Add sleb128-8 test.
    	* testsuite/gas/all/sleb128.d: New test.
    	* testsuite/gas/all/sleb128.s: New test source.

commit f7fd19e2b83c06cf1590d2ac8d0e9fc1ea4739c2
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Jan 10 10:28:20 2017 +1030

    [GOLD] Fix tests for powerpc64
    
    PowerPC64 defines .TOC. rather than _GLOBAL_OFFSET_TABLE_, and
    what's more, doesn't define it at all unless referenced.  For ELFv1
    ABI the symbol isn't normally referenced, so modify the test to accept
    .TOC. as a variant of _GLOBAL_OFFSET_TABLE_ and 0 or 1 occurrences.
    
    copy_test_relro as written doesn't need copy relocs on PowerPC64.
    PowerPC64 is always PIC.  So, modify copy_test_relro to test that the
    existing vars are in fact read-only directly by deliberately causing a
    sigsegv, and add another couple of vars that do cause copy relocs even
    when PIC.
    
    	* testsuite/ver_test_8.sh: Accept .TOC. in lieu of
    	_GLOBAL_OFFSET_TABLE_.  Allow zero count.
    	* testsuite/copy_test_relro_1.cc (c, q): New vars.
    	* testsuite/copy_test_relro.cc: Rewrite to test read-only
    	status of variables directly.  Reference new vars in
    	read-only data.

commit f159cdb61155d699f5aff2a9fbad8b787a7fe10c
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Jan 10 10:24:09 2017 +1030

    [GOLD] Add --secure-plt option for ppc32
    
    Added just to accept, and ignore.  gcc since 2015-10-21, when
    configured with --enable-secureplt passes this option to the linker.
    As powerpc gold cannot link --bss-plt code successfully, gold needs to
    accept the option or the gcc specs file needs to be changed.
    
    The patch also make gold detect --bss-plt code and error out rather
    than producing a binary that crashes.
    
    	* options.h: Add --secure-plt option.
    	* powerpc.cc (Target_powerpc::Scan::local): Detect and error
    	on -fPIC -mbss-plt code.
    	(Target_powerpc::Scan::global): Likewise.

commit eaa38cfd42fe323fb7868e676ced7419bc5eec12
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Tue Jan 10 00:00:22 2017 +0000

    Automatic date update in version.in

commit a4fb5981b7ec3d4006e93141afb1d0da566bb97b
Author: Jim Wilson <jim.wilson@linaro.org>
Date:   Mon Jan 9 15:44:57 2017 -0800

    Fix problems with the implementation of the uzp1 and uzp2 instructions.
    
    	sim/aarch64/
    	* simulator.c (do_vec_UZP): Rewrite.
    	sim/testsuite/sim/aarch64/
    	* uzp.s: New.

commit 694b382c67a4fc656f30acbc74776c5e9cb53622
Author: Antoine Tremblay <antoine.tremblay@ericsson.com>
Date:   Mon Jan 9 12:39:07 2017 -0500

    Fix inferior memory reading in GDBServer for arm/aarch32
    
    Before this patch, some functions would read the inferior memory with
    (*the_target)->read_memory, which returns the raw memory, rather than the
    shadowed memory.
    
    This is wrong since these functions do not expect to read a breakpoint
    instruction and can lead to invalid behavior.
    
    Use of raw memory in get_next_pcs_read_memory_unsigned_integer for example
    could lead to get_next_pc returning an invalid pc.
    
    Here's how this would happen:
    
    In non-stop:
    
    the user issues:
    
    thread 1
    step&
    thread 2
    step&
    thread 3
    step&
    
    In a similar way as non-stop-fair-events.exp (threads are looping).
    
    GDBServer:
    
     linux_resume is called
     GDBServer has pending events,
     threads are not resumed and single-step breakpoint for thread 1 not installed.
    
     linux_wait_1 is called with a pending event on thread 2 at pc A
     GDBServer handles the event and calls proceed_all_lwps
     This calls proceed_one_lwp and installs single-step breakpoints on all
     the threads that need one.
    
     Now since thread 1 needs to install a single-step breakpoint and is at pc B
     (different than thread 2), a step-over is not initiated and get_next_pc
     is called to figure out the next instruction from pc B.
    
     However it may just be that thread 3 as a single step breakpoint at pc
     B. And thus get_next_pc fails.
    
    This situation is tested with non-stop-fair-events.exp.
    
    In other words, single-step breakpoints are installed in proceed_one_lwp
    for each thread.  GDBserver proceeds two threads for resume_step, as
    requested by GDB, and the thread proceeded later may see the single-step
    breakpoints installed for the thread proceeded just now.
    
    Tested on gdbserver-native/-m{thumb,arm} no regressions.
    
    gdb/gdbserver/ChangeLog:
    
    	* linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
    	target_read_memory.
    	* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
    	(get_next_pcs_syscall_next_pc): Likewise.

commit a5ec5e3fe1b8fe1395c79ff29052edad91266a76
Author: Andrew Waterman <andrew@sifive.com>
Date:   Wed Dec 21 18:05:28 2016 -0800

    RISC-V/GAS: Support more relocs against constant addresses
    
    Previously, some pseudoinstructions like "call" only accepted
    symbolic addresses and rejected constant addresses with an
    esoteric internal error.  This patch enables them by deferring
    application of constant relocations to md_apply_fix, rather than
    eagerly applying them during instruction assembly.
    
    gas/ChangeLog
    
    2017-01-09  Andrew Waterman <andrew@sifive.com>
    
    	* config/tc-riscv.c (append_insn): Don't eagerly apply relocations
    	against constants.
    	(md_apply_fix): Mark relocations against constants as "done."

commit e294484ee7e8dea53d091443a0f24c7939ac15ed
Author: Andrew Waterman <andrew@sifive.com>
Date:   Wed Dec 21 12:47:13 2016 -0800

    RISC-V/GAS: Improve handling of invalid relocs
    
    TLS relocs against constants previously segfaulted, and illegal
    symbol subtractions were silently ignored.
    
    The previous behavior was to segfault.
    
    gas/ChangeLog
    
    2017-01-09  Andrew Waterman <andrew@sifive.com>
    
    	* config/tc-riscv.c (md_apply_fix): Report TLS relocations against
    	constants.  Report disallowed symbol subtractions.

commit 6ec11ab97ab47ec4a22118e5b1c77df567796002
Author: Palmer Dabbelt <palmer@dabbelt.com>
Date:   Thu Dec 29 17:29:53 2016 -0800

    Remove some custom sections from RISC-V's default linker scripts
    
    This was added so compressed loads could have smaller offsets for
    accessing the data section, but the result was that writable sections
    ended up in INITIAL_READONLY_SECTIONS.  This is a bad idea.  The fix is
    to just remove this micro-optimization.
    
    Thanks to Alan Morda for finding the problem!
    
    ld/ChangeLog
    
    2017-01-09  Palmer Dabbelt <palmer@dabbelt.com>
                Kito Cheng <kito.cheng@gmail.com>
    
            * emulparams/elf32lriscv-defs.sh (INITIAL_READONLY_SECTIONS):
            Removed.
            (SDATA_START_SYMBOLS): Likewise.

commit cd6581da62c32a391f9a4c2c5d248a11aa6fa8f7
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jan 9 16:49:48 2017 +0000

    Speed up objdump when displaying disassembly mixed with line number and source code information.
    
    bfd	* dwarf2.c (lookup_address_in_function_table): Return early if
    	there are no functions in the given comp unit, or if the high
    	address of the last function in the comp unit is less than the
    	desired address.
    
    binutils * objdump.c (display_file): Add new parameter 'last_file'.  If
    	last_file is true, do not call bfd_close at the end of the
    	function.
    	(main): Set the value of the last_file parameter when calling
    	display_file.

commit 20b52c88ea31f8a0af60d6172ab0da5f2ad616ee
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jan 9 10:11:50 2017 +0000

    Add Swedish translation for GAS.
    
    	* po/sv.po: New Swedish translation.
    	* configure.ac (ALL_LINGUAS): Add sv.
    	* configure: Regenerate.

commit 98f02962fefbacf1b805e93fb7bddeb58ec6ff70
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jan 9 09:27:46 2017 +0000

    Improve objdump's behaviour when it encounters a corrupt binary with an excessively large symbol table.
    
    	PR binutils/21013
    	* coffgen.c (_bfd_coff_get_external_symbols): Generate an error
    	message if there are too many symbols to load.

commit 011561117eeaff00862eb5f465c3470f29e8a9a9
Author: Andrew Waterman <andrew@sifive.com>
Date:   Mon Jan 9 09:22:33 2017 +0000

    RISC-V/GAS: Correct branch relaxation for weak symbols.
    
    	* config/tc-riscv.c (relaxed_branch_length): Use the long
    	sequence when the target is a weak symbol.

commit 3254d32c4b47f17a7d609f25394fbfb2313f09ff
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jan 9 10:46:23 2017 +1030

    [GOLD] Set sh_info of .rela.plt for powerpc
    
    	* powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
    	".rela.plt" at ".plt".

commit 4d74727a4a41e811950dcd0bed7bc6747a068886
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jan 9 12:08:00 2017 +1030

    .rela.dyn comment fix and add missing ChangeLog entry
    
    ChangeLog entry missed from commit dd90581873.
    
    	* readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
    	comment.

commit a631dd7b79e7dd670995d2c9b58577b1d1a29795
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Mon Jan 9 00:00:20 2017 +0000

    Automatic date update in version.in

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                      |   93 +
 bfd/bfd-in2.h                                      |    2 +
 bfd/coffgen.c                                      |    7 +-
 bfd/config.bfd                                     |   10 +
 bfd/dwarf2.c                                       |   12 +-
 bfd/elf32-i386.c                                   |  120 +-
 bfd/elf64-x86-64.c                                 |  178 +-
 bfd/opncls.c                                       |  373 +-
 bfd/version.h                                      |    2 +-
 binutils/ChangeLog                                 |   27 +
 binutils/ChangeLog-2016                            |    3 +
 binutils/NEWS                                      |    4 +
 binutils/deflex.l                                  |    2 +-
 binutils/objdump.c                                 |   22 +-
 binutils/readelf.c                                 |    4 +-
 binutils/stabs.c                                   |    2 +-
 binutils/testsuite/binutils-all/objdump.exp        |   80 +
 gas/ChangeLog                                      |   77 +
 gas/config/tc-i386.c                               |    3 +
 gas/config/tc-riscv.c                              |   16 +-
 gas/configure                                      |    2 +-
 gas/configure.ac                                   |    2 +-
 gas/configure.tgt                                  |    1 +
 gas/doc/c-i386.texi                                |    4 +-
 gas/po/sv.po                                       |19974 ++++++++++++++++++++
 gas/read.c                                         |   58 +-
 gas/read.h                                         |    2 +
 gas/stabs.c                                        |   47 +-
 gas/testsuite/gas/all/gas.exp                      |    1 +
 gas/testsuite/gas/all/sleb128-8.d                  |    7 +
 gas/testsuite/gas/all/sleb128-8.s                  |    2 +
 gas/testsuite/gas/i386/avx512_vpopcntdq-intel.d    |   68 +
 gas/testsuite/gas/i386/avx512_vpopcntdq.d          |   68 +
 gas/testsuite/gas/i386/avx512_vpopcntdq.s          |   63 +
 gas/testsuite/gas/i386/i386.exp                    |    4 +
 .../gas/i386/x86-64-avx512_vpopcntdq-intel.d       |   68 +
 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.d   |   68 +
 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.s   |   63 +
 gdb/ChangeLog                                      |  556 +
 gdb/breakpoint.c                                   |    2 +-
 gdb/build-id.c                                     |   30 +-
 gdb/build-id.h                                     |    6 +-
 gdb/cli-out.c                                      |    4 +-
 gdb/cli-out.h                                      |    2 +-
 gdb/cli/cli-decode.c                               |    2 +-
 gdb/cli/cli-dump.c                                 |   55 +-
 gdb/cli/cli-logging.c                              |   15 +-
 gdb/coffread.c                                     |    6 +-
 gdb/command.h                                      |    2 +-
 gdb/common/gdb_ref_ptr.h                           |  221 +
 gdb/common/gdb_unlinker.h                          |   60 +
 gdb/compile/compile-c-symbols.c                    |   11 +-
 gdb/compile/compile-object-load.c                  |   20 +-
 gdb/corelow.c                                      |   14 +-
 gdb/cp-name-parser.y                               |   39 +-
 gdb/cp-support.c                                   |   52 +-
 gdb/cp-support.h                                   |   11 +-
 gdb/disasm.c                                       |   14 +-
 gdb/dwarf2-frame.c                                 |    5 +-
 gdb/dwarf2loc.c                                    |  185 +-
 gdb/dwarf2read.c                                   |  270 +-
 gdb/elfread.c                                      |   17 +-
 gdb/exec.c                                         |   12 +-
 gdb/gcore.c                                        |   48 +-
 gdb/gcore.h                                        |    4 +-
 gdb/gdb_bfd.c                                      |   30 +-
 gdb/gdb_bfd.h                                      |   81 +-
 gdb/gdbserver/ChangeLog                            |    7 +
 gdb/gdbserver/linux-aarch32-low.c                  |    4 +-
 gdb/gdbserver/linux-arm-low.c                      |    5 +-
 gdb/gnu-v3-abi.c                                   |   12 +-
 gdb/guile/guile.c                                  |    2 +-
 gdb/guile/scm-ports.c                              |    6 +-
 gdb/jit.c                                          |   30 +-
 gdb/linespec.c                                     |   28 +-
 gdb/linux-nat.c                                    |    5 +-
 gdb/machoread.c                                    |   76 +-
 gdb/mi/mi-out.c                                    |    4 +-
 gdb/mi/mi-out.h                                    |    2 +-
 gdb/minidebug.c                                    |    8 +-
 gdb/procfs.c                                       |   11 +-
 gdb/psympriv.h                                     |   36 +-
 gdb/psymtab.c                                      |   38 -
 gdb/python/py-arch.c                               |   29 +-
 gdb/python/py-bpevent.c                            |   23 +-
 gdb/python/py-breakpoint.c                         |   47 +-
 gdb/python/py-cmd.c                                |  133 +-
 gdb/python/py-continueevent.c                      |    9 +-
 gdb/python/py-event.c                              |   28 +-
 gdb/python/py-event.h                              |    4 +-
 gdb/python/py-exitedevent.c                        |   49 +-
 gdb/python/py-finishbreakpoint.c                   |   17 +-
 gdb/python/py-framefilter.c                        |  311 +-
 gdb/python/py-function.c                           |   59 +-
 gdb/python/py-inferior.c                           |  115 +-
 gdb/python/py-infevents.c                          |  138 +-
 gdb/python/py-lazy-string.c                        |    9 +-
 gdb/python/py-linetable.c                          |   51 +-
 gdb/python/py-newobjfileevent.c                    |   52 +-
 gdb/python/py-objfile.c                            |    8 +-
 gdb/python/py-param.c                              |  104 +-
 gdb/python/py-prettyprint.c                        |  355 +-
 gdb/python/py-progspace.c                          |    4 +-
 gdb/{gcore.h => python/py-ref.h}                   |   34 +-
 gdb/python/py-signalevent.c                        |   27 +-
 gdb/python/py-stopevent.c                          |   54 +-
 gdb/python/py-symbol.c                             |   18 +-
 gdb/python/py-threadevent.c                        |   19 +-
 gdb/python/py-type.c                               |  206 +-
 gdb/python/py-unwind.c                             |   77 +-
 gdb/python/py-utils.c                              |   91 +-
 gdb/python/py-value.c                              |  105 +-
 gdb/python/py-varobj.c                             |   36 +-
 gdb/python/py-xmethods.c                           |  378 +-
 gdb/python/python-internal.h                       |   42 +-
 gdb/python/python.c                                |  447 +-
 gdb/record-full.c                                  |   54 +-
 gdb/remote.c                                       |    3 +-
 gdb/serial.c                                       |    6 +-
 gdb/solib-aix.c                                    |   65 +-
 gdb/solib-darwin.c                                 |   65 +-
 gdb/solib-dsbt.c                                   |   23 +-
 gdb/solib-frv.c                                    |   28 +-
 gdb/solib-spu.c                                    |   35 +-
 gdb/solib-svr4.c                                   |   31 +-
 gdb/solib.c                                        |   48 +-
 gdb/solist.h                                       |    7 +-
 gdb/spu-linux-nat.c                                |   38 +-
 gdb/stack.c                                        |    4 +-
 gdb/symfile-mem.c                                  |    7 +-
 gdb/symfile.c                                      |   81 +-
 gdb/symfile.h                                      |    5 +-
 gdb/top.c                                          |   13 +-
 gdb/ui-out.c                                       |    4 +-
 gdb/ui-out.h                                       |    4 +-
 gdb/utils.c                                        |   33 +-
 gdb/utils.h                                        |   14 +-
 gdb/value.h                                        |   32 +
 gdb/varobj.c                                       |   83 +-
 gdb/varobj.h                                       |    2 -
 gdb/windows-nat.c                                  |   19 +-
 gdb/windows-tdep.c                                 |    6 +-
 gold/ChangeLog                                     |   80 +
 gold/aarch64.cc                                    |    6 +-
 gold/arm.cc                                        |    6 +-
 gold/object.h                                      |    7 +
 gold/options.h                                     |    3 +
 gold/powerpc.cc                                    |  602 +-
 gold/reloc.cc                                      |   73 +-
 gold/testsuite/copy_test_relro.cc                  |   45 +-
 gold/testsuite/copy_test_relro_1.cc                |   14 +-
 gold/testsuite/script_test_13.sh                   |    2 +-
 gold/testsuite/script_test_15a.sh                  |    4 +-
 gold/testsuite/script_test_15b.sh                  |    4 +-
 gold/testsuite/script_test_15c.sh                  |    4 +-
 gold/testsuite/ver_test_8.sh                       |    6 +-
 gold/x86_64.cc                                     |   42 +-
 ld/ChangeLog                                       |   59 +
 ld/Makefile.am                                     |    6 +
 ld/Makefile.in                                     |    7 +
 ld/configure.tgt                                   |    8 +-
 ld/emulparams/arc-nps.sh                           |   78 +
 ld/emulparams/arclinux_nps.sh                      |    3 +
 ld/emulparams/elf32_x86_64.sh                      |    4 +
 ld/emulparams/elf32lriscv-defs.sh                  |   12 -
 ld/po/sv.po                                        | 2261 ++-
 ld/testsuite/ld-arc/arclinux-nps.d                 |   50 +
 ld/testsuite/ld-arc/arclinux-nps.s                 |   46 +
 ld/testsuite/ld-i386/i386.exp                      |    5 +-
 ld/testsuite/ld-i386/pr20830.d                     |   60 +
 ld/testsuite/ld-i386/pr20830.s                     |    8 +
 ld/testsuite/ld-i386/tls.exp                       |    6 +-
 ld/testsuite/ld-x86-64/pr20830.s                   |    8 +
 ld/testsuite/ld-x86-64/pr20830a.d                  |   72 +
 ld/testsuite/ld-x86-64/pr20830b.d                  |   60 +
 ld/testsuite/ld-x86-64/pr21038a.d                  |   71 +
 ld/testsuite/ld-x86-64/pr21038a.s                  |    8 +
 ld/testsuite/ld-x86-64/pr21038b.d                  |   64 +
 ld/testsuite/ld-x86-64/pr21038b.s                  |    7 +
 ld/testsuite/ld-x86-64/x86-64.exp                  |    4 +
 opcodes/ChangeLog                                  |   23 +
 opcodes/i386-dis-evex.h                            |   13 +-
 opcodes/i386-dis.c                                 |    2 +
 opcodes/i386-gen.c                                 |    7 +-
 opcodes/i386-init.h                                |  278 +-
 opcodes/i386-opc.h                                 |    3 +
 opcodes/i386-opc.tbl                               |   10 +-
 opcodes/i386-tbl.h                                 |10450 +++++-----
 opcodes/msp430-dis.c                               |  103 +-
 sim/aarch64/ChangeLog                              |    4 +
 sim/aarch64/simulator.c                            |   68 +-
 sim/testsuite/sim/aarch64/ChangeLog                |    4 +
 sim/testsuite/sim/aarch64/uzp.s                    |  214 +
 193 files changed, 32907 insertions(+), 9453 deletions(-)
 create mode 100644 gas/po/sv.po
 create mode 100644 gas/testsuite/gas/all/sleb128-8.d
 create mode 100644 gas/testsuite/gas/all/sleb128-8.s
 create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq-intel.d
 create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq.d
 create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq.s
 create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq-intel.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.s
 create mode 100644 gdb/common/gdb_ref_ptr.h
 create mode 100644 gdb/common/gdb_unlinker.h
 copy gdb/{gcore.h => python/py-ref.h} (54%)
 create mode 100644 ld/emulparams/arc-nps.sh
 create mode 100644 ld/emulparams/arclinux_nps.sh
 create mode 100644 ld/testsuite/ld-arc/arclinux-nps.d
 create mode 100644 ld/testsuite/ld-arc/arclinux-nps.s
 create mode 100644 ld/testsuite/ld-i386/pr20830.d
 create mode 100644 ld/testsuite/ld-i386/pr20830.s
 create mode 100644 ld/testsuite/ld-x86-64/pr20830.s
 create mode 100644 ld/testsuite/ld-x86-64/pr20830a.d
 create mode 100644 ld/testsuite/ld-x86-64/pr20830b.d
 create mode 100644 ld/testsuite/ld-x86-64/pr21038a.d
 create mode 100644 ld/testsuite/ld-x86-64/pr21038a.s
 create mode 100644 ld/testsuite/ld-x86-64/pr21038b.d
 create mode 100644 ld/testsuite/ld-x86-64/pr21038b.s
 create mode 100644 sim/testsuite/sim/aarch64/uzp.s

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f238d86..6705ae4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,96 @@
+2017-01-12  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/20876
+	* opncls.c (find_separate_debug_file): Add include_dirs
+	parameter.  Only include the directory part of the bfd's filename
+	in search paths if include_dirs is true.  Add a couple of extra
+	locations for looking for debug files.
+	( bfd_follow_gnu_debuglink): Update invocation of
+	find_separate_debug_file.
+	(bfd_follow_gnu_debugaltlink): Likewise.
+	(get_build_id): New function: Finds the build-id of the given bfd.
+	(get_build_id_name): New function: Computes the name of the
+	separate debug info file for a bfd, based upon its build-id.
+	(check_build_id_file): New function: Checks to see if a separate
+	debug info file exists at the given location, and that its
+	build-id matches that of the original bfd.
+	(bfd_follow_build_id_debuglink): New function: Finds a separate
+	debug info file for a given bfd by using the build-id method.
+	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
+	method of locating a separate debug info file before using the
+	debuglink method.
+	* bfd-in2.h: Regenerate.
+
+2017-01-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/21038
+	* elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
+	(elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
+	elf_x86_64_eh_frame_plt_got.
+	(elf_x86_64_size_dynamic_sections): Get unwind info from
+	elf_x86_64_bnd_arch_bed for the BND PLT.
+
+2017-01-11  Jeremy Soller  <jackpot51@gmail.com>
+
+	* config.bfd: Add entries for i686-redox and x86_64-redox.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
+	to 4 bytes.
+	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
+	.eh_frame section to 4 bytes for x32.
+	(elf_x86_64_check_relocs): Likewise.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/20830
+	* elf32-i386.c (elf_i386_eh_frame_plt_got): New.
+	(PLT_GOT_FDE_LENGTH): Likewise.
+	(elf_i386_plt_layout): Add eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_i386_plt): Updated.
+	(elf_i386_link_hash_table): Add plt_got_eh_frame.
+	(elf_i386_check_relocs): Create .eh_frame section for .plt.got.
+	(elf_i386_size_dynamic_sections): Allocate and initialize
+	.eh_frame section for .plt.got.
+	(elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
+	.plt.got.
+	(elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	* elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
+	(PLT_GOT_FDE_LENGTH): Likewise.
+	(elf_x86_64_backend_data): Add eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_x86_64_arch_bed): Updated.
+	(elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
+	eh_frame_plt_got_size.
+	(elf_x86_64_nacl_arch_bed): Likewise.
+	(elf_x86_64_link_hash_table): Add plt_got_eh_frame.
+	(elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
+	(elf_x86_64_size_dynamic_sections): Allocate and initialize
+	.eh_frame section for .plt.got.
+	(elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
+	for .plt.got.
+
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Set
+	plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
+
+2017-01-09  Nick Clifton  <nickc@redhat.com>
+
+	* dwarf2.c (lookup_address_in_function_table): Return early if
+	there are no functions in the given comp unit, or if the high
+	address of the last function in the comp unit is less than the
+	desired address.
+
+2017-01-09  Nick Clifton  <nickc@redhat.com>
+
+	PR binutils/21013
+	* coffgen.c (_bfd_coff_get_external_symbols): Generate an error
+	message if there are too many symbols to load.
+
 2017-01-04  James Clarke  <jrtc27@jrtc27.com>
 
 	* elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 2930089..80d60cb 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1121,6 +1121,8 @@ struct bfd_section *bfd_create_gnu_debuglink_section
 bfd_boolean bfd_fill_in_gnu_debuglink_section
    (bfd *abfd, struct bfd_section *sect, const char *filename);
 
+char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
+
 /* Extracted from libbfd.c.  */
 
 /* Byte swapping macros for user section data.  */
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index d2cc591..5a61f6d 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1643,7 +1643,12 @@ _bfd_coff_get_external_symbols (bfd *abfd)
 
   syms = bfd_malloc (size);
   if (syms == NULL)
-    return FALSE;
+    {
+      /* PR 21013: Provide an error message when the alloc fails.  */
+      _bfd_error_handler (_("%B: Not enough memory to allocate space for %lu symbols"),
+			  abfd, size);
+      return FALSE;
+    }
 
   if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
       || bfd_bread (syms, size, abfd) != size)
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 6b93b51..d824065 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -760,6 +760,11 @@ case "${targ}" in
     targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec"
     targ_archs="$targ_archs bfd_arm_arch"
     ;;
+  i[3-7]86-*-redox*)
+    targ_defvec=i386_elf32_vec
+    targ_selvecs=
+    targ64_selvecs=x86_64_elf64_vec
+    ;;
 #ifdef BFD64
   x86_64-*-cloudabi*)
     targ_defvec=x86_64_elf64_cloudabi_vec
@@ -817,6 +822,11 @@ case "${targ}" in
     targ_defvec=x86_64_elf64_vec
     want64=true
     ;;
+  x86_64-*-redox*)
+    targ_defvec=x86_64_elf64_vec
+    targ_selvecs=i386_elf32_vec
+    want64=true
+    ;;
 #endif
   i[3-7]86-*-lynxos*)
     targ_defvec=i386_elf32_vec
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index b477d27..3699587 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -2336,9 +2336,15 @@ lookup_address_in_function_table (struct comp_unit *unit,
   bfd_size_type low, high, mid, first;
   struct arange *arange;
 
+  if (number_of_functions == 0)
+    return FALSE;
+
   if (!build_lookup_funcinfo_table (unit))
     return FALSE;
 
+  if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr)
+    return FALSE;
+  
   /* Find the first function in the lookup table which may contain the
      specified address.  */
   low = 0;
@@ -3915,7 +3921,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
   msec = find_debug_info (debug_bfd, debug_sections, NULL);
   if (msec == NULL && abfd == debug_bfd)
     {
-      char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
+      char * debug_filename;
+
+      debug_filename = bfd_follow_build_id_debuglink (abfd, DEBUGDIR);
+      if (debug_filename == NULL)
+	debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
 
       if (debug_filename == NULL)
 	/* No dwarf2 info, and no gnu_debuglink to follow.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index e977dd7..0860ada 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -648,6 +648,32 @@ static const bfd_byte elf_i386_eh_frame_plt[] =
   DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
 };
 
+/* .eh_frame covering the .plt.got section.  */
+
+static const bfd_byte elf_i386_eh_frame_plt_got[] =
+{
+#define PLT_GOT_FDE_LENGTH		16
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x7c,				/* Data alignment factor */
+  8,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 4, 4,		/* DW_CFA_def_cfa: r4 (esp) ofs 4 */
+  DW_CFA_offset + 8, 1,		/* DW_CFA_offset: r8 (eip) at cfa-4 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_GOT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* the start of .plt.got goes here */
+  0, 0, 0, 0,			/* .plt.got size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
 struct elf_i386_plt_layout
 {
   /* The first entry in an absolute procedure linkage table looks like this.  */
@@ -679,6 +705,10 @@ struct elf_i386_plt_layout
   /* .eh_frame covering the .plt section.  */
   const bfd_byte *eh_frame_plt;
   unsigned int eh_frame_plt_size;
+
+  /* .eh_frame covering the .plt.got section.  */
+  const bfd_byte *eh_frame_plt_got;
+  unsigned int eh_frame_plt_got_size;
 };
 
 #define GET_PLT_ENTRY_SIZE(abfd) \
@@ -701,6 +731,8 @@ static const struct elf_i386_plt_layout elf_i386_plt =
     elf_i386_pic_plt_entry,             /* pic_plt_entry */
     elf_i386_eh_frame_plt,              /* eh_frame_plt */
     sizeof (elf_i386_eh_frame_plt),     /* eh_frame_plt_size */
+    elf_i386_eh_frame_plt_got,          /* eh_frame_plt_got */
+    sizeof (elf_i386_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 \f
 
@@ -850,6 +882,7 @@ struct elf_i386_link_hash_table
   asection *interp;
   asection *plt_eh_frame;
   asection *plt_got;
+  asection *plt_got_eh_frame;
 
   union
   {
@@ -2347,6 +2380,24 @@ do_size:
 					     htab->plt_got,
 					     plt_got_align))
 	    goto error_return;
+
+	  if (!info->no_ld_generated_unwind_info
+	      && htab->plt_got_eh_frame == NULL
+	      && get_elf_i386_backend_data (abfd)->plt->eh_frame_plt_got != NULL)
+	    {
+	      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+				| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+				| SEC_LINKER_CREATED);
+	      htab->plt_got_eh_frame
+		= bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+						      ".eh_frame",
+						      flags);
+	      if (htab->plt_got_eh_frame == NULL
+		  || !bfd_set_section_alignment (htab->elf.dynobj,
+						 htab->plt_got_eh_frame,
+						 2))
+		goto error_return;
+	    }
 	}
 
       if (r_type == R_386_GOT32X
@@ -3379,13 +3430,22 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 	htab->elf.sgotplt->size = 0;
     }
 
-
-  if (htab->plt_eh_frame != NULL
-      && htab->elf.splt != NULL
-      && htab->elf.splt->size != 0
-      && !bfd_is_abs_section (htab->elf.splt->output_section)
-      && _bfd_elf_eh_frame_present (info))
-    htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
+  if (_bfd_elf_eh_frame_present (info))
+    {
+      if (htab->plt_eh_frame != NULL
+	  && htab->elf.splt != NULL
+	  && htab->elf.splt->size != 0
+	  && !bfd_is_abs_section (htab->elf.splt->output_section))
+	htab->plt_eh_frame->size
+	  = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_size;
+
+      if (htab->plt_got_eh_frame != NULL
+	  && htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && !bfd_is_abs_section (htab->plt_got->output_section))
+	htab->plt_got_eh_frame->size
+	  = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got_size;
+    }
 
   /* We now have determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
@@ -3414,6 +3474,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 	       || s == htab->elf.igotplt
 	       || s == htab->plt_got
 	       || s == htab->plt_eh_frame
+	       || s == htab->plt_got_eh_frame
 	       || s == htab->elf.sdynbss
 	       || s == htab->elf.sdynrelro)
 	{
@@ -3468,12 +3529,24 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
   if (htab->plt_eh_frame != NULL
       && htab->plt_eh_frame->contents != NULL)
     {
-      memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
-	      sizeof (elf_i386_eh_frame_plt));
+      memcpy (htab->plt_eh_frame->contents,
+	      get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt,
+	      htab->plt_eh_frame->size);
       bfd_put_32 (dynobj, htab->elf.splt->size,
 		  htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
     }
 
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      memcpy (htab->plt_got_eh_frame->contents,
+	      get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got,
+	      htab->plt_got_eh_frame->size);
+      bfd_put_32 (dynobj, htab->plt_got->size,
+		  (htab->plt_got_eh_frame->contents
+		   + PLT_FDE_LEN_OFFSET));
+    }
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -5883,6 +5956,33 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
 	}
     }
 
+  /* Adjust .eh_frame for .plt.got section.  */
+  if (htab->plt_got_eh_frame != NULL
+      && htab->plt_got_eh_frame->contents != NULL)
+    {
+      if (htab->plt_got != NULL
+	  && htab->plt_got->size != 0
+	  && (htab->plt_got->flags & SEC_EXCLUDE) == 0
+	  && htab->plt_got->output_section != NULL
+	  && htab->plt_got_eh_frame->output_section != NULL)
+	{
+	  bfd_vma plt_start = htab->plt_got->output_section->vma;
+	  bfd_vma eh_frame_start = htab->plt_got_eh_frame->output_section->vma
+				   + htab->plt_got_eh_frame->output_offset
+				   + PLT_FDE_START_OFFSET;
+	  bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+			     htab->plt_got_eh_frame->contents
+			     + PLT_FDE_START_OFFSET);
+	}
+      if (htab->plt_got_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
+	{
+	  if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+						 htab->plt_got_eh_frame,
+						 htab->plt_got_eh_frame->contents))
+	    return FALSE;
+	}
+    }
+
   if (htab->elf.sgot && htab->elf.sgot->size > 0)
     elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
 
@@ -6426,6 +6526,8 @@ static const struct elf_i386_plt_layout elf_i386_nacl_plt =
     elf_i386_nacl_pic_plt_entry,	/* pic_plt_entry */
     elf_i386_nacl_eh_frame_plt,		/* eh_frame_plt */
     sizeof (elf_i386_nacl_eh_frame_plt),/* eh_frame_plt_size */
+    NULL,				/* eh_frame_plt_got */
+    0,					/* eh_frame_plt_got_size */
   };
 
 static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 36630f8..1fb865c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -659,6 +659,68 @@ static const bfd_byte elf_x86_64_eh_frame_plt[] =
   DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
 };
 
+/* .eh_frame covering the BND .plt section.  */
+
+static const bfd_byte elf_x86_64_eh_frame_bnd_plt[] =
+{
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x78,				/* Data alignment factor */
+  16,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 7, 8,		/* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
+  DW_CFA_offset + 16, 1,	/* DW_CFA_offset: r16 (rip) at cfa-8 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* R_X86_64_PC32 .plt goes here */
+  0, 0, 0, 0,			/* .plt size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_def_cfa_offset, 16,	/* DW_CFA_def_cfa_offset: 16 */
+  DW_CFA_advance_loc + 6,	/* DW_CFA_advance_loc: 6 to __PLT__+6 */
+  DW_CFA_def_cfa_offset, 24,	/* DW_CFA_def_cfa_offset: 24 */
+  DW_CFA_advance_loc + 10,	/* DW_CFA_advance_loc: 10 to __PLT__+16 */
+  DW_CFA_def_cfa_expression,	/* DW_CFA_def_cfa_expression */
+  11,				/* Block length */
+  DW_OP_breg7, 8,		/* DW_OP_breg7 (rsp): 8 */
+  DW_OP_breg16, 0,		/* DW_OP_breg16 (rip): 0 */
+  DW_OP_lit15, DW_OP_and, DW_OP_lit5, DW_OP_ge,
+  DW_OP_lit3, DW_OP_shl, DW_OP_plus,
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
+/* .eh_frame covering the .plt.got section.  */
+
+static const bfd_byte elf_x86_64_eh_frame_plt_got[] =
+{
+#define PLT_GOT_FDE_LENGTH		20
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x78,				/* Data alignment factor */
+  16,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 7, 8,		/* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
+  DW_CFA_offset + 16, 1,	/* DW_CFA_offset: r16 (rip) at cfa-8 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_GOT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* the start of .plt.got goes here */
+  0, 0, 0, 0,			/* .plt.got size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop,
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
 /* Architecture-specific backend data for x86-64.  */
 
 struct elf_x86_64_backend_data
@@ -693,6 +755,10 @@ struct elf_x86_64_backend_data
   /* .eh_frame covering the .plt section.  */
   const bfd_byte *eh_frame_plt;
   unsigned int eh_frame_plt_size;
+
+  /* .eh_frame covering the .plt.got section.  */
+  const bfd_byte *eh_frame_plt_got;
+  unsigned int eh_frame_plt_got_size;
 };
 
 #define get_elf_x86_64_arch_data(bed) \
@@ -721,6 +787,8 @@ static const struct elf_x86_64_backend_data elf_x86_64_arch_bed =
     6,                                  /* plt_lazy_offset */
     elf_x86_64_eh_frame_plt,            /* eh_frame_plt */
     sizeof (elf_x86_64_eh_frame_plt),   /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_plt_got,        /* eh_frame_plt_got */
+    sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 
 static const struct elf_x86_64_backend_data elf_x86_64_bnd_arch_bed =
@@ -737,8 +805,10 @@ static const struct elf_x86_64_backend_data elf_x86_64_bnd_arch_bed =
     1+6,                                /* plt_got_insn_size */
     11,                                 /* plt_plt_insn_end */
     0,                                  /* plt_lazy_offset */
-    elf_x86_64_eh_frame_plt,            /* eh_frame_plt */
-    sizeof (elf_x86_64_eh_frame_plt),   /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_bnd_plt,        /* eh_frame_plt */
+    sizeof (elf_x86_64_eh_frame_bnd_plt), /* eh_frame_plt_size */
+    elf_x86_64_eh_frame_plt_got,        /* eh_frame_plt_got */
+    sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */
   };
 
 #define	elf_backend_arch_data	&elf_x86_64_arch_bed
@@ -865,6 +935,7 @@ struct elf_x86_64_link_hash_table
   asection *plt_eh_frame;
   asection *plt_bnd;


hooks/post-receive
--
Repository for Project Archer.


                 reply	other threads:[~2017-01-12 17:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112174530.49627.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).