Commit Graph

95052 Commits

Author SHA1 Message Date
claziss db1e1b45b4 [ARC] Add Tag_ARC_ATR_version.
Add a new tag (Tag_ARC_ATR_version) used to indicate if current
attributes are interpreted in GNU way. This attribute is used by
Synopsys custom compiler to correctly identify and interpret the
object attributes section as generated by GNU tools.

gas/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* config/tc-arc.c (arc_set_public_attributes): Add
	Tag_ARC_ATR_version.
	(arc_convert_symbolic_attribute): Likewise.
	* testsuite/gas/arc/attr-arc600.d: Update test.
	* testsuite/gas/arc/attr-arc600_mul32x16.d: Likewise.
	* testsuite/gas/arc/attr-arc600_norm.d: Likewise.
	* testsuite/gas/arc/attr-arc601.d: Likewise.
	* testsuite/gas/arc/attr-arc601_mul32x16.d: Likewise.
	* testsuite/gas/arc/attr-arc601_mul64.d: Likewise.
	* testsuite/gas/arc/attr-arc601_norm.d: Likewise.
	* testsuite/gas/arc/attr-arc700.d: Likewise.
	* testsuite/gas/arc/attr-arcem.d: Likewise.
	* testsuite/gas/arc/attr-archs.d: Likewise.
	* testsuite/gas/arc/attr-autodetect-1.d: Likewise.
	* testsuite/gas/arc/attr-cpu-a601.d: Likewise.
	* testsuite/gas/arc/attr-cpu-a700.d: Likewise.
	* testsuite/gas/arc/attr-cpu-em.d: Likewise.
	* testsuite/gas/arc/attr-cpu-hs.d: Likewise.
	* testsuite/gas/arc/attr-em.d: Likewise.
	* testsuite/gas/arc/attr-em4.d: Likewise.
	* testsuite/gas/arc/attr-em4_dmips.d: Likewise.
	* testsuite/gas/arc/attr-em4_fpuda.d: Likewise.
	* testsuite/gas/arc/attr-em4_fpus.d: Likewise.
	* testsuite/gas/arc/attr-hs.d: Likewise.
	* testsuite/gas/arc/attr-hs34.d: Likewise.
	* testsuite/gas/arc/attr-hs38.d: Likewise.
	* testsuite/gas/arc/attr-hs38_linux.d: Likewise.
	* testsuite/gas/arc/attr-mul64.d: Likewise.
	* testsuite/gas/arc/attr-name.d: Likewise.
	* testsuite/gas/arc/attr-nps400.d: Likewise.
	* testsuite/gas/arc/attr-override-mcpu.d: Likewise.
	* testsuite/gas/arc/attr-quarkse_em.d: Likewise.

bfd/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* elf32-arc.c (arc_elf_merge_attributes): Handle
	Tag_ARC_ATR_version.

binutils/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* readelf.c (display_arc_attribute): Print Tag_ARC_ATR_version.

include/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* elf/arc.h (Tag_ARC_ATR_version): New tag.

ld/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* testsuite/ld-arc/attr-merge-0.d: Update test.
	* testsuite/ld-arc/attr-merge-1.d: Likewise.
	* testsuite/ld-arc/attr-merge-2.d: Likewise.
	* testsuite/ld-arc/attr-merge-3.d: Likewise.
	* testsuite/ld-arc/attr-merge-5.d: Likewise.
2018-08-06 16:41:32 +03:00
claziss b6523c37fb [ARC] Update handling AUX-registers.
Update aux-registers data-base, and accept aux-registers names with
upper/lowercase names.

opcode/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* arc-regs.h: Update aux-registers.

gas/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/tc-arc.c (find_opcode_match): Accept uppercase aux-regs
	names.
	* testsuite/gas/arc/ld2.d: Update test.
	* testsuite/gas/arc/taux.d: Likewise.
	* testsuite/gas/arc/taux.s: Likewise.

include/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* opcode/arc.h (ARC_OPCODE_ARCV1): Define.
2018-08-06 16:41:32 +03:00
Rainer Orth 821a26825b Remove unused variables in procfs.c etc.
The recent patch to enable -Wunused-variable uncovered a couple of
instances in Solaris-specific files:

/vol/src/gnu/gdb/hg/master/dist/gdb/proc-api.c: In function ‘void _initialize_proc_api()’:
/vol/src/gnu/gdb/hg/master/dist/gdb/proc-api.c:422:28: error: unused variable ‘c’ [-Werror=unused-variable]
   struct cmd_list_element *c;
                            ^

/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In function ‘void procfs_init_inferior(target_ops*, int)’:
/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:2895:12: error: unused variable ‘signals’ [-Werror=unused-variable]
   sigset_t signals;
            ^~~~~~~
/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In member function ‘virtual char* procfs_target::make_corefile_notes(bfd*, int*)’:
/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:3845:19: error: unused variable ‘old_chain’ [-Werror=unused-variable]
   struct cleanup *old_chain;
                   ^~~~~~~~~
/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:3847:18: error: unused variable ‘fpregs’ [-Werror=unused-variable]
   gdb_fpregset_t fpregs;
                  ^~~~~~

Fixed as follows.  Tested on amd64-pc-solaris2.11, installed as obvious.

	* proc-api.c (_initialize_proc_api): Remove c, unused.
	* procfs.c (procfs_init_inferior): Remove signals, unused.
	(procfs_target::make_corefile_notes): Remove old_chain, fpregs,
	unused.
2018-08-06 13:54:34 +02:00
Andrew Burgess 5bd18990b0 gdb: Only run scheduler-locking tests if feature is supported
Not all targets support scheduler-locking.  Add a check to see if the
taraget supports scheduler locking, and if it doesn't, don't run the
scheduler-locking tests that will otherwise fail.

There are actually a set of tests that try to use scheduler-locking
however, in most of these cases the test will not be run on smaller
targets (those that might not support threads and scheduler-locking)
due to the targets lack of support for threads, or some other larger
feature.

In the gdb.mi/mi-cmd-param-changed.exp test though, there's no
dependence on threads, or any other larger feature, and so, for the
small target I was using the test would otherwise try to run, only to
fail due to lack of support for scheduler-locking.

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (target_supports_scheduler_locking): New proc.
	* gdb.mi/mi-cmd-param-changed.exp: Only run scheduler locking
	tests if the target supports scheduler locking.
2018-08-06 08:52:08 +01:00
Andrew Burgess 9534733755 gdb: Avoid using W_STOPCODE(0) as this is ambiguous on MIPS
The MIPS target supports 127 signals, and this can create an ambiguity
in process wait statuses.  A status value of 0x007f could potentially
indicate a process that has exited with signal 127, or a process that
has stopped with signal 0.

In uClibc-ng the interpretation of 0x007f is that the process has
exited with signal 127 rather than stopped with signal 0, and so,
WIFSTOPPED (W_STOPCODE (0)) will be false rather than true as it would
be on most other platforms.

Given that it's pretty easy to avoid using W_STOPCODE (0), lets do that.

gdb/ChangeLog:

	* linux-nat.c (linux_nat_target::follow_fork): Avoid using
	'W_STOPCODE (0)' as this could be ambiguous.
2018-08-06 08:49:39 +01:00
Jan Beulich e968fc9b63 x86: fold RegEip/RegRip and RegEiz/RegRiz
This allows to simplify the code in a number of places.
2018-08-06 08:34:36 +02:00
GDB Administrator b01474366f Automatic date update in version.in 2018-08-06 00:00:27 +00:00
H.J. Lu 99c2d522f7 x86: Update assembler tests for non-ELF targets
evex-no-scale.s has ELF directive:

.section .probe, "", @progbits

and non-ELF targets may pad text sections.

	* testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
	evex-no-scale-64 only for ELF targets.
	* testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".
	* testsuite/gas/i386/prefix64.s: Likewise.
	* testsuite/gas/i386/prefix32.l: Updated.
	* testsuite/gas/i386/prefix64.l: Likewise.
2018-08-05 10:05:52 -07:00
Alan Modra 05d0e962f0 R_PPC64_REL24_NOTOC support
R_PPC64_REL24_NOTOC is used on calls like "bl foo@notoc" to tell the
linker that linkage stubs for PLT calls or long branches can't use r2
for pic addressing.  Instead, new stubs that generate pc-relative
addresses are used.  One complication is that pc-relative offsets to
the PLT may need to be 64-bit in large programs, in contrast to the
toc-relative addressing used by older PLT linkage stubs where a 32-bit
offset is sufficient until the PLT itself exceeds 2G in size.

.eh_frame info to cover the _notoc stubs is yet to be implemented.

bfd/
	* elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
	(ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
	(SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
	(ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
	(ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
	(ppc_stub_type): Add ppc_stub_long_branch_notoc,
	ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
	ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
	ppc_stub_plt_call_both.
	(is_branch_reloc): Add R_PPC64_REL24_NOTOC.
	(build_offset, size_offset): New functions.
	(plt_stub_size): Support plt_call_notoc and plt_call_both.
	(ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
	(toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
	(ppc64_elf_size_stubs): Likewise, and new stubs.
	(ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
	* reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
gas/
	* config/tc-ppc.c (ppc_elf_suffix): Support @notoc.
	(ppc_force_relocation, ppc_fix_adjustable): Handle REL24_NOTOC.
ld/
	* testsuite/ld-powerpc/ext.d,
	* testsuite/ld-powerpc/ext.s,
	* testsuite/ld-powerpc/ext.lnk,
	* testsuite/ld-powerpc/notoc.d,
	* testsuite/ld-powerpc/notoc.s: New tests.
	* testsuite/ld-powerpc/powerpc.exp: Run them.
2018-08-05 12:11:51 +09:30
Alan Modra 3f6ff4799b Lose _r2off in powerpc64 stub names
Not a lot is conveyed by putting _r2off in a stub symbol that can't be
seen by inspecting the stub code or the toc restoring instruction
immediately after a call via such a stub.  Also, we don't distinguish
plt_call stub symbols from plt_call_r2save stub symbols, so this patch
makes long branch and plt branch stub symbols consistent with that
decision.

bfd/
	* elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
ld/
	* testsuite/ld-powerpc/elfv2exe.d: Adjust for stub symbol change.
	* testsuite/ld-powerpc/tocopt6.d: Likewise.
2018-08-05 10:33:07 +09:30
GDB Administrator 1a6204c9a7 Automatic date update in version.in 2018-08-05 00:01:09 +00:00
Tom de Vries 3fbbcf473a [gdb/testsuite] Fix regexp in py-rbreak.exp
This fails for me on openSUSE leap 15.0:
...
FAIL: gdb.python/py-rbreak.exp: check number of returned breakpoints is 11
...

The rbreak "" command expects 11 breaks, but I see two extra for
__libc_csu_fini and __libc_csu_init:
...
Breakpoint 13 at 0x4005b0: file elf-init.c, line 106.^M
Breakpoint 14 at 0x400540: file elf-init.c, line 68.^M
...

This patch fixes the failing test by excluding functions starting with an
underscore.

Tested on x86_64-linux.

2018-08-04  Tom de Vries  <tdevries@suse.de>

	* gdb.python/py-rbreak.exp: Fix rbreak regexp.
2018-08-04 11:40:18 +02:00
GDB Administrator 5e7f20ca9a Automatic date update in version.in 2018-08-04 00:00:33 +00:00
H.J. Lu 39aac631ba x32: Align the .note.gnu.property section to 4 bytes
The .note.gnu.property section should be aligned to 4 bytes for x32.

	* testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
	align .note.gnu.property section if __64_bit__ is undefined.
2018-08-03 15:47:26 -07:00
Sergio Durigan Junior 425699f52d Fix thinko when deciding whether to disable TCP's Nagle algorithm
This patch fixes a thinko that happened when I was implementing the
IPv6 support on GDB/gdbserver.  On certain situations, it is necessary
to disable TCP's Nagle algorithm (NODELAY).  For obvious reasons, this
only applies when we are dealing with a TCP connection.

While implementing the IPv6 patch, I noticed that the net_open
function (on gdb/ser-tcp.c) kept a flag indicating whether the
connection type was UDP or TCP.  I eliminated that flag, and started
using the 'struct addrinfo *' related to the successful connection
directly.  However, I made a mistake:

  if (success_ainfo->ai_socktype == IPPROTO_TCP)
                     ^^^^^^^^^^^
    {
      /* Disable Nagle algorithm.  Needed in some cases.  */
      int tmp = 1;

      setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY,
		  (char *) &tmp, sizeof (tmp));
    }

The 'ai_socktype' field specifies the socket type (SOCK_STREAM or
SOCK_DGRAM), and not the protocol.  This test was always failing, and
the Nagle algorithm was never being disabled.

The obvious fix is to use the 'ai_protocol' field.  This is what this
patch does.

Huge "thank you" to Joel Brobecker who reported the regression (he was
experiencing an unusual delay while debugging a bare-metal program
running under QEMU) and helped me set up a proper reproducer for the
bug.

gdb/ChangeLog:
2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>

	* ser-tcp.c (net_open): Fix thinko when deciding whether to
	disable TCP's Nagle algorithm (use "ai_protocol" instead of
	"ai_socktype").
2018-08-03 18:04:38 -04:00
Nick Clifton 4aae6e5abd Improve objcopy's ability to merge build notes.
* objcopy.c (merge_gnu_build_notes): Delete empty notes.  Merge
	identical function notes.
2018-08-03 17:08:11 +01:00
Dimitar Dimitrov 2688aab226 Update PRU assembler to corect hardware register numbering for DWARF.
A small rework of the PRU GCC port exposed that CIE data alignment is
erroneously set to 4 for PRU in GAS. In fact PRU stack must be aligned to 1.
Set the macro to -1, to allow output from GCC to be assembled without errors.

Also, while at it, set DWARF2 HW register numbering to follow latest

	* config/tc-pru.c (pru_regname_to_dw2regnum): Return the starting HW
	byte-register number.
	(pru_frame_initial_instructions): Use byte-numbering for FP index.
	* config/tc-pru.h (DWARF2_DEFAULT_RETURN_COLUMN): Use number from
	latest GCC.
	(DWARF2_CIE_DATA_ALIGNMENT): Set to -1.
2018-08-03 10:02:39 +01:00
Jan Beulich dbf8be89ed x86: drop NoRex64 from {,v}pmov{s,z}x*
They're pointless with IgnoreSize also specified, and even more so when
no Qword operand exists.
2018-08-03 09:30:58 +02:00
Jan Beulich c48dadc9a8 x86: drop "mem" operand type attribute
No template specifies this bit, so there's no point recording it in the
templates. Use a flags[] bit instead.
2018-08-03 09:30:02 +02:00
GDB Administrator 3ed12f02a2 Automatic date update in version.in 2018-08-03 00:00:43 +00:00
Jim Wilson 13755f406d RISC-V: Fix TLS and --gc-sections conflict.
bfd/
	* elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
	add SEC_LINKER_CREATED flag.
2018-08-02 16:13:49 -07:00
Tom Tromey 3e1d3d8c24 Allow "info address" of a template parameter
PR symtab/16842 shows that gdb will crash when the user tries to
invoke "info address" of a template parameter.

The bug here is that dwarf2read.c does not set the symtab on the
template parameter symbols.  This is pedantically correct, given that
the template symbols do not appear in a symtab.  However, gdb
primarily uses the symtab backlink to find the symbol's objfile.  So,
this patch simply sets the symtab on these symbols.

Tested by the buildbot.

gdb/ChangeLog
2018-08-02  Tom Tromey  <tom@tromey.com>

	PR symtab/16842.
	* dwarf2read.c (read_func_scope): Set symtab on template parameter
	symbols.
	(process_structure_scope): Likewise.

gdb/testsuite/ChangeLog
2018-08-02  Tom Tromey  <tom@tromey.com>

	PR symtab/16842.
	* gdb.cp/temargs.exp: Test "info address" of a template
	parameter.
2018-08-02 16:12:42 -06:00
Xavier Roirand 1584354913 Fix kill issue leading to zombie process on MacOS Sierra
Starting with MacOS version Sierra, the gdb kill command
seems to work but inferior remains as zombie on the host.
Notice that, as zombie process, the inferior is not killable
by the user, nor by root.

The kill signal gdb sent to the inferior is not handled
in gdb as a signal sent by gdb thus no reply is made and
the process remains (since MacOS does not "release" the
inferior because no reply have been made to the signal
message).

This patch fixes this problem.

gdb/ChangeLog
2018-08-02  Xavier Roirand  <roirand@adacore.com>

	PR gdb/22629:
        * darwin-nat.c (darwin_kill_inferior): Fix handling of
        kill inferior.
2018-08-02 15:08:45 -06:00
Tom Tromey b5bddbbbbc Check results of get_darwin_inferior
I noticed that the existing kill-detach-inferiors-cmd.exp test was
causing gdb to crash on macOS 10.13.  The bug was that an inferior
that hadn't yet been started would cause get_darwin_inferior to return
NULL, and this was not checked.

I went through the places calling get_darwin_inferior and added checks
where appropriate.  This makes the test get a bit further.  Not all of
these spots are exercised by the test, but they seem safe enough in
any case.

gdb/ChangeLog
2018-08-02  Tom Tromey  <tom@tromey.com>

	* darwin-nat.c (find_inferior_task_it, darwin_find_thread)
	(darwin_suspend_inferior, darwin_resume_inferior)
	(darwin_decode_notify_message, darwin_resume_inferior_threads)
	(darwin_check_new_threads): Check result of get_darwin_inferior.
2018-08-02 15:08:44 -06:00
Simon Marchi 8094f49a4d Backport gettext fixes to get rid of warnings on macOS
Two fixes were committed recently to the gettext repo in order to make
gdb build warning-free on macOS.  This patch backports them both:

  - Make the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE.
    113893dce80358a4ae0d9463ce73c5670c81cf0c
    http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=113893dce80358a4ae0d9463ce73c5670c81cf0c

  - Enable the format_arg attribute also on clang on Mac OS X.
    bd6a52241c7c83c90e043ace2082a2508d273f55
    http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=bd6a52241c7c83c90e043ace2082a2508d273f55

intl/ChangeLog:

	* libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, gettext, dgettext,
	dcgettext, ngettext, dngettext, dcngettext): Backport changes
	from upstream gettext.
2018-08-02 14:56:02 -04:00
Nick Clifton 8a28fa1b4b Disable the PR12982 test for HPPA targets.
PR 23463
	* testsuite/ld-plugin/pr12982.d: Revert previous delta.
	* testsuite/ld-plugin/lto.exp: Skip the pr12982 test for HPPA
	targets.
2018-08-02 16:37:12 +01:00
H.J. Lu d0042c6ed3 ifunc.exp: Always build static_nonifunc_prog
Since static_nonifunc_prog isn't linked against libc.a, we can always
build it.

	* testsuite/ld-ifunc/ifunc.exp: Always build static_nonifunc_prog.
2018-08-02 05:42:53 -07:00
H.J. Lu 36a900f483 Add a testcase for PR binutils/23460
Add a testcase to limit open files to 16 for AR with plugin.  Before

commit 103da91bc0
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Aug 1 14:34:41 2018 +0100

    Close resource leaks in the BFD library's plugin handler.

it failed with:

../binutils/ar: tmpdir/pr23460f.o: plugin needed to handle lto object

	PR binutils/23460
	* testsuite/ld-plugin/lto.exp: Run the PR binutils/23460 test.
	* testsuite/ld-plugin/pr23460a.c: New file.
	* testsuite/ld-plugin/pr23460b.c: Likewise.
	* testsuite/ld-plugin/pr23460c.c: Likewise.
	* testsuite/ld-plugin/pr23460d.c: Likewise.
	* testsuite/ld-plugin/pr23460e.c: Likewise.
	* testsuite/ld-plugin/pr23460f.c: Likewise.
2018-08-02 05:00:59 -07:00
GDB Administrator 09a8cc152b Automatic date update in version.in 2018-08-02 00:00:31 +00:00
Roland McGrath c198a1ecf8 Fix spurious check-ld failures on aarch64-elf
ld/
	* testsuite/ld-aarch64/ifunc-1-local.d: Adjust regexps to match
	the offsets emitted by aarch64-elf configurations.
	* testsuite/ld-aarch64/ifunc-1.d: Likewise.
	* testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
	* testsuite/ld-aarch64/ifunc-2.d: Likewise.
	* testsuite/ld-aarch64/ifunc-21.d: Likewise.
	* testsuite/ld-aarch64/ifunc-3a.d: Likewise.
2018-08-01 13:36:51 -07:00
Nick Clifton e256144888 Add a note about regenerating the info files when creating a new release.
* README-how-to-make-a-release: Add note about regenerating the
	info files prior to the release.
2018-08-01 15:52:32 +01:00
Nick Clifton e30985fa2b Skip the test for PR12982 on HPPA targets as they always need an executable stack.
PR 23463
	* testsuite/ld-plugin/pr12982.d: Skip thios test for the HPPA
	target.
2018-08-01 15:28:37 +01:00
James Patrick Conlon 3cf2b6691c Fix bug in PDP11 assembler when handling a JSr instruction with deferred auto increment.
PR 14480
	* config/tc-pdp11.c (parse_op_noreg): Check for and handle auto
	increment deferred.
	* testsuite/gas/pdp11/pr14480.d: New test driver file.
	* testsuite/gas/pdp11/pr14480.s: New test source file file.
	* testsuite/gas/pdp11/pdp11.exp: Run the new test.
2018-08-01 15:14:46 +01:00
Nick Clifton c25179e71f Suppress compile time warning message when compiling coff-rs6000.c with gcc v8.
* coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
	about potentially truncated strncpy operations.
	(_bfd_xcoff_put_symbol_name): Likewise.
2018-08-01 14:46:43 +01:00
Nick Clifton 4a9f7d653c Fix potential illegal memory access in AVR backend.
* elf32-avr.c (avr_stub_name): Check for a NULL return from
	bfd_malloc.
2018-08-01 14:42:37 +01:00
Nick Clifton f03fb29221 Fix compile time warning problem with gcc 8 and the NS32K assembler sources.
* config/tc-ns32k.c (addr_mode): Replace "Drop through" comment
	with "Fall through" so that it will be recognised by gcc's switch
	statment error checker.
2018-08-01 14:36:50 +01:00
Nick Clifton 103da91bc0 Close resource leaks in the BFD library's plugin handler.
PR 23460
	* plugin.c (bfd_plugin_open_input): Close file descriptor if the
	call to fstat fails.
	(try_claim): Always close the file descriptor at the end of the
	function.
	(try_load_plugin): If a plugin has already been registered, then
	skip the dlopen and onload steps and go straight to claiming the
	file.  If these is an error, close the plugin.
2018-08-01 14:34:41 +01:00
marxin 50320b1d4a Copy from GCC: Add linker_output as prefix for LTO temps (PR lto/86548).
2018-07-26  Martin Liska  <mliska@suse.cz>

        PR lto/86548
	* libiberty.h (make_temp_file_with_prefix): New function.
2018-07-26  Martin Liska  <mliska@suse.cz>

        PR lto/86548
	* make-temp-file.c (TEMP_FILE): Remove leading 'cc'.
	(make_temp_file): Call make_temp_file_with_prefix with
        first argument set to NULL.
	(make_temp_file_with_prefix): Support also prefix.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262999 138bc75d-0d04-0410-961f-82ee72b054a4
2018-08-01 14:23:10 +01:00
Alan Modra a67ae9b01a Re: PowerPC64 __tls_get_addr_opt stub .eh_frame fix
The modified test failed on some powerpc targets due to differences in
default hash style.  If the default hash style is both, then more
sections are created, bumping section ids.  Section id is used in stub
symbols and although the test is careful to not depend on id in
labels, the stub hash traversal order changes when stub names change.
That lead to the stubs being emitted in a different order and thus not
matching expected output.

	* testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with hash-style
	specified.
2018-08-01 19:06:37 +09:30
Alan Modra 1aa4214141 PowerPC64 __tls_get_addr_opt stub .eh_frame fix
This patch sets stub_offset in ppc_size_one_stub rather than in
ppc_build_one_stub.  That allows the plt stub alignment to be done in
just ppc_size_one_stub rather than both functions.  The patch also
corrects the place where the alignment was done, fixing a possible
error in .eh_frame data, and tidies some offset calculations.

bfd/
	* elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
	(ppc_build_one_stub): Don't set stub_offset, instead assert that
	it is sane.  Don't adjust stub_offset for alignment.  Adjust size
	calculation.  Use "targ" temp when calculating offsets.
	(ppc_size_one_stub): Set stub_offset here.  Use "targ" temp when
	calculating offsets.  Adjust for alignment before setting
	tls_get_addr_opt_bctrl.
ld/
	* testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with plt alignment.
	* testsuite/ld-powerpc/tlsopt5.s: Add extra call.
	* testsuite/ld-powerpc/tlsopt5.wf: Adjust expected output.
	* testsuite/ld-powerpc/tlsopt5.d: Likewise.
2018-08-01 12:14:22 +09:30
Alan Modra cb86a42aba csky regen
bfd/
	* po/SRC-POTFILES.in: Regenerate.
gas/
	* po/POTFILES.in: Regenerate.
ld/
	* po/BLD-POTFILES.in: Regenerate.
opcodes/
	* po/POTFILES.in: Regenerate.
2018-08-01 10:32:56 +09:30
GDB Administrator 33633d9f5b Automatic date update in version.in 2018-08-01 00:00:43 +00:00
Nick Clifton 07cc045019 Correct previous update - new translation for the opcodes subdirectory.
opcodes	* po/sv.po: Updated Swedish translation.
2018-07-31 17:49:53 +01:00
Nick Clifton 11cfdeb386 Updated Swedish translation for the binutils sub-directory.
* po/sv.po: Updated Swedish translation.
2018-07-31 17:46:15 +01:00
Joel Brobecker f61cfa0740 Document the GDB 8.1.1 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 8.1.1 released.
2018-07-31 07:59:44 -07:00
Jan Vrany 5abe0f0cc7 Fix segfault when invoking -var-info-path-expression on a dynamic varobj
Invoking -var-info-path-expression on a dynamic varobj lead either in wrong
(nonsense) result or to a segmentation fault in cplus_describe_child().
This was caused by the fact that varobj_get_path_expr() called
cplus_path_expr_of_child() ignoring the fact the parent of the variable
is dynamic. Then, cplus_describe_child() accessed the underlaying C type
members by index, causing (i) either wrong (nonsense) expression being
returned (since dynamic child may be completely arbibtrary value)
or (ii) segmentation fault (in case the index higher than number of
underlaying C type members.

This fixes the problem by checking whether a varobj is a child of a dynamic
varobj and, if so, reporting an error as described in documentation.

gdb/ChangeLog:

	* varobj.c (varobj_get_path_expr_parent): Report an error if
	parent is a dynamic varobj.

gdb/testsuite/Changelog:

	* gdb.python/py-mi-var-info-path-expression.c: New file.
	* gdb.python/py-mi-var-info-path-expression.py: New file.
	* gdb.python/py-mi-var-info-path-expression.exp: New file.
2018-07-31 10:13:41 -04:00
Simon Marchi 472fa5eec2 Re-generate gnulib import
I noticed that re-generating our gnulib import introduced some changes.
I supposed that this comes from the recent upgrade to autoconf 2.69
(though I haven't checked).

Tested by rebuilding on GNU/Linux x86-64 and mingw (cross-compiled from
GNU/Linux).

gdb/ChangeLog:

	* gnulib/aclocal.m4: Re-generate.
	* gnulib/config.in: Re-generate.
	* gnulib/configure: Re-generate.
	* gnulib/import/Makefile.in: Re-generate.
	* gnulib/import/m4/gnulib-comp.m4: Re-generate.
	* gnulib/import/m4/onceonly.m4: Re-generate.
2018-07-31 10:09:10 -04:00
Simon Marchi 1c28969efc Delete test target descriptions when exiting
Looking at the address sanitizer output, this was a quite low hanging
fruit.  We create target_desc objects for testing that we never free.
Saving them in unique_ptrs takes care of it.

I created a small struct to hold these because I thought it would help
readability.

gdb/ChangeLog:

	* target-descriptions.c (struct xml_test_tdesc): New.
	(xml_tdesc): Change type to std::vector<xml_test_tdesc>.
	(record_xml_tdesc): Update.
	(maintenance_check_xml_descriptions): Update.
	* target-descriptions.h (record_xml_tdesc): Update comment.
2018-07-31 10:06:00 -04:00
Jan Beulich 1424ad8677 x86: also optimize KXOR{D,Q} and KANDN{D,Q}
These can be converted to 2-byte VEX encoding when both source registers
are the same, by using KXORW / KANDNW as replacement.
2018-07-31 10:58:05 +02:00
Jan Beulich ae2387feae x86: fold various AVX512 templates with so far differing Masking attributes
There's no insn allowing ZEROING_MASKING alone. Re-purpose its value for
handling the not uncommon case of insns allowing either form of masking
with register operands, but only merging masking with a memory operand.
2018-07-31 10:57:09 +02:00