deliverable/binutils-gdb.git
10 years agoDo not build gdbserver with -Werror by default if development=false
Joel Brobecker [Mon, 19 May 2014 21:16:24 +0000 (14:16 -0700)] 
Do not build gdbserver with -Werror by default if development=false

On GDB release branches, we change $development in gdb/development.sh
to false, in order to build the GDB release without -Werror by default,
thus avoiding harmless compiler warnings from breaking the build of
someone who's only interested in building GDB rather than working
on it.

This patch implements the same strategy for gdbserver, using the exact
same method.

gdb/gdbserver/ChangeLog:

        * configure.ac: Only use -Werror by default when DEVELOPMENT
        is true.
        * configure: Regenerate.

Tested on x86_64-linux, by rebuilding GDBserver first with development
set to true, and then doing it again with development set to false.
Werror was used in the first case, but not in the second.

10 years agobtrace: no replay without history
Markus Metzger [Thu, 15 May 2014 08:57:36 +0000 (10:57 +0200)] 
btrace: no replay without history

When using a reverse execution command without execution history, GDB
might end up in a state where replaying has been started but remains
at the current instruction.  This state is illegal.

Do not step if there is no execution history to avoid this.

2014-05-20  Markus Metzger  <markus.t.metzger@intel.com>

* record-btrace.c (record_btrace_step_thread): Check for empty history.

testsuite/
* gdb.btrace/nohist.exp: New.

10 years agoFix MSP430 assembler to support #hi(<symbol>).
Nick Clifton [Tue, 20 May 2014 09:28:42 +0000 (10:28 +0100)] 
Fix MSP430 assembler to support #hi(<symbol>).

* config/tc-msp430.c (CHECK_RELOC_MSP430): Add OP parameter.
Generate BFD_RELOC_MSP430_ABS_HI16 if vshift is 1.
(msp430_srcoperand): Store vshift value in operand.

* msp430.h (struct msp430_operand_s): Add vshift field.

* gas/elf/struct.d: Expect extra output from some toolchains.
* gas/symver/symver0.d: Likewise.
* gas/symver/symver1.d: Likewise.

10 years agold/aarch64: xfail non-PIC shared object tests on aarch64
Will Newton [Fri, 16 May 2014 14:22:58 +0000 (15:22 +0100)] 
ld/aarch64: xfail non-PIC shared object tests on aarch64

aarch64 does not support building non-PIC shared objects, so mark
tests for these as xfail.

ld/testsuite/ChangeLog:

2014-05-20  Will Newton  <will.newton@linaro.org>

* ld-shared/shared.exp: Mark non-PIC shared object tests
as xfail on aarch64.

10 years agoSet timeout for gdb.reverse/*.exp test cases
Yao Qi [Fri, 9 May 2014 07:06:12 +0000 (15:06 +0800)] 
Set timeout for gdb.reverse/*.exp test cases

Hi,
This patch is to add a new board setting gdb_reverse_timeout, which is
used to set timeout for all gdb.reverse test cases, which are usually
very slow and cause some TIMEOUT failures, for example, on some arm
boards.  We have some alternatives to this approach, but I am not
satisfied with them:

 - Increase the timeout value.  This is the global change, and it may
   cause some delay where actual failures happen.
 - Set timeout by gdb_reverse_timeout in every gdb.reverse/*.exp.
   Then, we have to touch every file under gdb.reverse.

In this patch, we choose a central place to set timeout for all tests
in gdb.reverse, which is convenient.

gdb/testsuite:

2014-05-20  Yao Qi  <yao@codesourcery.com>

* lib/gdb.exp (gdb_init): Set timeout if test file is under
gdb.reverse directory and gdb_reverse_timeout exists in board
setting.
* README: Document gdb_reverse_timeout.

10 years agogdb_init argument ARGS is a string rather than a list
Yao Qi [Fri, 9 May 2014 03:01:07 +0000 (11:01 +0800)] 
gdb_init argument ARGS is a string rather than a list

The argument ARGS of gdb_init is passed from dejagnu is a string, the
test file name.  In dejagnu/runtest.exp:

proc runtest { test_file_name } {
....
....
        if [info exists tool] {
            if { [info procs "${tool}_init"] != "" } {
                ${tool}_init $test_file_name;
            }
        }
....
}

but inn default_gdb_init (callee of gdb_init), we have

    set gdb_test_file_name [file rootname [file tail [lindex $args 0]]]

In tcl, all actual arguments are combined to a list and assigned to
args.  This code here isn't wrong, but unnecessary, because its caller
(proc runtest) only passes one string to it, and IMO, we don't need
such tricky tcl "args".

I doubt that "[lindex $args 0]" is to be backward compatible with old
dejagnu, but dejagnu-1.4 release started to pass $test_file_name to
${too}_init, as I showed above.  dejagnu-1.4 was released in 2001, and
it should be old enough.  I also tried to check whether gdb testusite
works with dejagnu-1.3 or not, but failed to build dejagnu-1.3 on my
machine.  Supposing GDB testsuite requires at least dejagnu-1.4, this
change should be safe.

This patch is update default_gdb_init to treat ARGS as a string instead
of a list.  Then, 'args' sounds like a list, and this patch also renames
it by 'test_file_name', to align with dejagnu.

gdb/testsuite:

2014-05-20  Yao Qi  <yao@codesourcery.com>

* lib/gdb.exp (default_gdb_init): Rename argument 'args' by
'test_file_name'.  Treat args as a string instead of a list.
(gdb_init): Rename argument 'args' by 'test_file_name'.

10 years agoFix issue #15778: GDB Aarch64 signal frame unwinder issue
Hui Zhu [Tue, 20 May 2014 05:19:06 +0000 (13:19 +0800)] 
Fix issue #15778: GDB Aarch64 signal frame unwinder issue

The root cause of this issue is unwinder of "#3  <signal handler called>"
doesn't supply right values of registers.
When GDB want to get the previous frame of "#3  <signal handler called>",
it will call cache init function of unwinder "aarch64_linux_sigframe_init".
The address or the value of the registers is get from this function.
So the bug is inside thie function.

I check the asm code of "#3  <signal handler called>":
(gdb) frame 3
(gdb) p $pc
$1 = (void (*)()) 0x7f931fa4d0
(gdb) disassemble $pc, +10
Dump of assembler code from 0x7f931fa4d0 to 0x7f931fa4da:
=> 0x0000007f931fa4d0: mov x8, #0x8b                   // #139
   0x0000007f931fa4d4: svc #0x0
   0x0000007f931fa4d8: nop

This is the syscall sys_rt_sigreturn, Linux kernel function "restore_sigframe"
will set the frame:
for (i = 0; i < 31; i++)
__get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i],
 err);
__get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err);
__get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err);
The struct of uc_mcontext is:
struct sigcontext {
__u64 fault_address;
/* AArch64 registers */
__u64 regs[31];
__u64 sp;
__u64 pc;
__u64 pstate;
/* 4K reserved for FP/SIMD state and future expansion */
__u8 __reserved[4096] __attribute__((__aligned__(16)));
};

But in GDB function "aarch64_linux_sigframe_init", the code the get address
of registers is:
  for (i = 0; i < 31; i++)
    {
      trad_frame_set_reg_addr (this_cache,
       AARCH64_X0_REGNUM + i,
       sigcontext_addr + AARCH64_SIGCONTEXT_XO_OFFSET
       + i * AARCH64_SIGCONTEXT_REG_SIZE);
    }

  trad_frame_set_reg_addr (this_cache, AARCH64_FP_REGNUM, fp);
  trad_frame_set_reg_addr (this_cache, AARCH64_LR_REGNUM, fp + 8);
  trad_frame_set_reg_addr (this_cache, AARCH64_PC_REGNUM, fp + 8);

The code that get pc and sp is not right, so I change the code according
to Linux kernel code:
  trad_frame_set_reg_addr (this_cache, AARCH64_SP_REGNUM,
   sigcontext_addr + AARCH64_SIGCONTEXT_XO_OFFSET
     + 31 * AARCH64_SIGCONTEXT_REG_SIZE);
  trad_frame_set_reg_addr (this_cache, AARCH64_PC_REGNUM,
   sigcontext_addr + AARCH64_SIGCONTEXT_XO_OFFSET
     + 32 * AARCH64_SIGCONTEXT_REG_SIZE);

The issue was fixed by this change, and I did the regression test.  It
also fixed a lot of other XFAIL and FAIL.

2014-05-20  Hui Zhu  <hui@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

PR backtrace/16558
* aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Update comments
and change address of sp and pc.

10 years agoRemove unnecessary header from m68k-dis.c
Alan Modra [Tue, 20 May 2014 03:45:18 +0000 (13:15 +0930)] 
Remove unnecessary header from m68k-dis.c

* m68k-dis.c: Don't include setjmp.h.

10 years agoRewrite ppc32 backend .sdata and .sdata2 handling
Alan Modra [Tue, 20 May 2014 02:12:42 +0000 (11:42 +0930)] 
Rewrite ppc32 backend .sdata and .sdata2 handling

1) _SDA_BASE_ and _SDA2_BASE_ and defined automatically, in a similar
   manner to the way _GLOBAL_OFFSET_TABLE_ is handled.  It's a little
   more complicated to remove the symbols because _SDA_BASE_ needs to
   be there if either .sdata or .sbss is present, and similarly for
   _SDA2_BASE.
2) The linker created .sdata and .sdata2 sections used for
   R_PPC_EMB_SDAI16 and R_PPC_EMB_SDA2I16 pointers are created early.
   Nowadays we strip unneeded sections from the output, so it isn't
   necessary to delay creating the sections.
3) The output section for targets of various SDA relocs is now checked
   as per the ABI(s).  We previously allowed .sdata.foo and similar,
   most likely because at some stage we were checking input sections.

Also, the patch fixes a long-standing bug in size_input_sections
that affects the values of symbols defined in stripped input
sections.

PR 16952
bfd/
* elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
Remove redundant setting of htab->elf.dynobj.  Don't align.
Define .sdata symbols using _bfd_elf_define_linkage_sym.
(ppc_elf_create_glink): Call ppc_elf_create_linker_section.
(create_sdata_sym): Delete.
(elf_allocate_pointer_linker_section): Rename from
elf_create_pointer_linker_section.  Align section.
(ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
directly here, or create_sdata_sym.  Set ref_regular on _SDA_BASE_
and _SDA2_BASE_.
(ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
Remove unnecessary tests on _SDA_BASE_ sym.
(maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
(ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
* elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
(ppc_elf_maybe_strip_sdata_syms): Declare.
ld/
* emulparams/elf32ppccommon.sh (_SDA_BASE_, _SDA2_BASE_): Delete.
* emultempl/ppc32elf.em (ppc_before_allocation): Call
ppc_elf_maybe_strip_sdata_syms.
* ldlang.c (size_input_section): Correct output_offset value
for excluded input sections.

10 years agodaily update
Alan Modra [Tue, 20 May 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years agobuild_type_unit_groups and moved closer to only caller and renamed
Doug Evans [Mon, 19 May 2014 23:05:01 +0000 (16:05 -0700)] 
build_type_unit_groups and moved closer to only caller and renamed

* dwarf2read.c (build_type_psymtabs_1): Renamed from
build_type_unit_groups and moved closer to only caller.  Remove
arguments.  All references updated.  Remove outdated .gdb_index
comment.
(struct tu_abbrev_offset, sort_tu_by_abbrev_offset): Move with
build_type_psymtabs_1.

10 years agofix two latent type errors
Tom Tromey [Mon, 19 May 2014 19:10:21 +0000 (13:10 -0600)] 
fix two latent type errors

I'm checking this in as obvious.

I was looking at instances of "alloc.*sizeof" and noticed a couple
where the types in question are incorrect.

In gdbtypes, the code allocates sizeof(int) to represent a struct rank.
In mi-cmds, the code uses "struct mi_cmd **" -- one "*" too many.

In both cases the problems are latent because in practice the sizes
are the same as the sizes of the correct types.  Still, it's better to
be correct.

I think gdb would be improved by a wholesale change from explicit
sizeofs to using the libiberty.h allocation macros.  In most cases
they are both shorter and have better type safety.  However, the
resulting patch is rather large.

Built and regtested on x86-64 Fedora 20.

2014-05-19  Tom Tromey  <tromey@redhat.com>

* gdbtypes.c (rank_function): Use XNEWVEC.
* mi/mi-cmds.c (build_table): Use XCNEWVEC.

10 years agoRemove all_type_unit_groups, unused.
Doug Evans [Mon, 19 May 2014 19:50:44 +0000 (12:50 -0700)] 
Remove all_type_unit_groups, unused.

* dwarf2read.c (struct dwarf2_per_objfile): Delete unused members
n_type_unit_groups, all_type_unit_groups.  All uses removed.
(get_type_unit_group, build_type_unit_groups): Delete forward decls.
(dw2_get_cutu): Renamed from dw2_get_cu.  All callers updated.
(dw2_get_cu): Renamed from dw2_get_primary_cu.  All callers updated.
(add_type_unit_group_to_table): Delete.

10 years agoFix gdbserver qGetTLSAddr for x86_64 -m32
Jan Kratochvil [Mon, 19 May 2014 18:20:27 +0000 (20:20 +0200)] 
Fix gdbserver qGetTLSAddr for x86_64 -m32

gdbserver makes libthread_db to access uninitialized memory.  Surprisingly it
does not harm normally, even -fsanitize=address works with current gdbserver.
I have found just valgrind detects it as a very first warning for gdbserver:

Syscall param ptrace(addr) contains uninitialised byte(s)
   at 0x3721EECEBE: ptrace (ptrace.c:45)
   by 0x436EE5: ps_get_thread_area (linux-x86-low.c:252)
   by 0x5559D02: __td_ta_lookup_th_unique (td_ta_map_lwp2thr.c:157)
   by 0x5559EC3: td_ta_map_lwp2thr (td_ta_map_lwp2thr.c:207)
   by 0x43F87D: find_one_thread (thread-db.c:281)
   by 0x440038: thread_db_get_tls_address (thread-db.c:505)
   by 0x40F6D0: handle_query (server.c:2004)
   by 0x4124CF: process_serial_event (server.c:3445)
   by 0x4136B6: handle_serial_event (server.c:3889)
   by 0x419571: handle_file_event (event-loop.c:434)
   by 0x418D38: process_event (event-loop.c:189)
   by 0x419AB7: start_event_loop (event-loop.c:552)

Reproducible with:
cd gdb/testsuite
g++ -o gdb.threads/tls gdb.threads/tls{,2}.c -m32 -pthread
../gdbserver/gdbserver :1234 gdb.threads/tls
../gdb -batch gdb.threads/tls -ex 'target remote :1234' -ex 'b spin' -ex c -ex 'p a_thread_local'

It is more easily reproducible even without valgrind using s/0x00/0xff/ in the
attached patch.  It will then turn the output of reproducer above:
$1 = 0
->
Cannot find thread-local storage for Thread 29044, executable file .../gdb/testsuite/gdb.threads/tls:
Remote target failed to process qGetTLSAddr request

gdb/gdbserver/
2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>

Fix gdbserver qGetTLSAddr for x86_64 -m32.
* linux-x86-low.c (X86_64_USER_REGS): New.
(x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.

Message-ID: <20140410114901.GA16411@host2.jankratochvil.net>

10 years ago* eval.c (evaluate_subexp_standard): Add some comments.
Doug Evans [Mon, 19 May 2014 17:51:08 +0000 (10:51 -0700)] 
* eval.c (evaluate_subexp_standard): Add some comments.

10 years ago[testsuite patch] Test power{5,6,7} disassembly
Jan Kratochvil [Mon, 19 May 2014 13:39:24 +0000 (15:39 +0200)] 
[testsuite patch] Test power{5,6,7} disassembly

Power5, Power6 and Power7 disassembly testing.

gdb/testsuite/
2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.arch/powerpc-power.exp: New file.
* gdb.arch/powerpc-power.s: New file.

Message-ID: <20140514205425.GA15398@host2.jankratochvil.net>

10 years agoExtend the fix already created for PR 16858 so that it works with x86 PE targets...
Nick Clifton [Mon, 19 May 2014 13:29:31 +0000 (14:29 +0100)] 
Extend the fix already created for PR 16858 so that it works with x86 PE targets as well.

PR gas/16858
* config/tc-i386.c (md_apply_fix): Improve the detection of code
symbols for 32-bit PE targets.

10 years agoDon't link FreeBSD tests with -ldl.
Andreas Tobler [Mon, 19 May 2014 06:49:55 +0000 (08:49 +0200)] 
Don't link FreeBSD tests with -ldl.

    * ld-elf/shared.exp: Introduce the extralibs variable to control
    the libraries to be linked. Don't link -ldl on *-*-freebsd*.

    * ld-bootstrap/bootstrap.exp: Do not add -ldl to the extralibs on
    *-*-freebsd*.

10 years agodaily update
Alan Modra [Mon, 19 May 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years agogas/
Richard Sandiford [Sun, 18 May 2014 19:28:04 +0000 (20:28 +0100)] 
gas/
* config/tc-mips.c (md_obj_begin): Delete.
(md_obj_end): Fold into...
(md_mips_end): ...here.  Move to end of file.

10 years agodaily update
Alan Modra [Sun, 18 May 2014 00:00:41 +0000 (09:30 +0930)] 
daily update

10 years ago * progspace.c (remove_program_space): Delete, unused.
Doug Evans [Sat, 17 May 2014 19:18:26 +0000 (12:18 -0700)] 
* progspace.c (remove_program_space): Delete, unused.
* progspace.h (remove_program_space): Ditto.

10 years ago * inferior.c (prune_inferiors): Fix comment.
Doug Evans [Sat, 17 May 2014 18:59:34 +0000 (11:59 -0700)] 
* inferior.c (prune_inferiors): Fix comment.
(remove_inferior_command): Call prune_program_spaces.

10 years agoPrevent the V850 assembler from generating an internal error if it is asked to
Nick Clifton [Sat, 17 May 2014 16:45:18 +0000 (17:45 +0100)] 
Prevent the V850 assembler from generating an internal error if it is asked to
handle a ctoff() pseudo-op when running in RH850 ABI mode.

PR gas/16946
* config/tc-v850.c (handle_ctoff): Generate an error if called
when using the RH850 ABI.

10 years ago * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
Ryan Mansfield [Fri, 16 May 2014 14:49:46 +0000 (15:49 +0100)] 
   * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.

10 years agoCopy over changes from guile.texi.
Doug Evans [Sat, 17 May 2014 16:13:00 +0000 (09:13 -0700)] 
Copy over changes from guile.texi.

* python.texi (Basic Python) <gdb.execute>: Add text.
(Basic Python) <gdb.post_event>: Remove "main" from "main GDB thread".
(Values From Inferior) <Python string>: Add text.
(Values From Inferior) <Value.string>: Clarify string length handling.
(Pretty Printing API): Add cindex.
(Types In Python) <TYPE_CODE_*>: Use vtable instead of table.
Remove unnecessary index of gdb.TYPE_CODE_*.  Replace @findex with
@vindex.
(Commands In Python) <COMPLETE_*>: Similarly.
(Symbols In Python) <SYMBOL_*>: Similarly.
(Breakpoints In Python) <WP_*>: Similarly.
(Breakpoints In Python) <BP_*>: Similarly.

10 years agoImprove docs of qfThreadInfo packet.
David Taylor [Sat, 17 May 2014 07:29:57 +0000 (10:29 +0300)] 
Improve docs of qfThreadInfo packet.

gdb/doc/gdb.texinfo (General Query Packets): Add a note about thread IDs
mentioned in the qfThreadInfo reply.

10 years agodaily update
Alan Modra [Sat, 17 May 2014 00:00:39 +0000 (09:30 +0930)] 
daily update

10 years ago * gdb.base/completion.exp: Check that all expected files exist
Doug Evans [Fri, 16 May 2014 19:46:24 +0000 (12:46 -0700)] 
* gdb.base/completion.exp: Check that all expected files exist
before doing file completion.

10 years ago* gdb.base/Makefile.in (EXECUTABLES): Add completion.
Doug Evans [Fri, 16 May 2014 19:34:05 +0000 (12:34 -0700)] 
* gdb.base/Makefile.in (EXECUTABLES): Add completion.

10 years agoNew command line option -D.
Doug Evans [Fri, 16 May 2014 19:15:10 +0000 (12:15 -0700)] 
New command line option -D.

* NEWS: Mention it.
* main.c (set_gdb_data_directory): New function.
(captured_main): Recognize -D.  Flag error for --data-directory "".
Call set_gdb_data_directory.
(print_gdb_help): Print --data-directory, -D.
* main.h (set_gdb_data_directory): Declare.
* top.c (staged_gdb_datadir): New static global.
(set_gdb_datadir): Call set_gdb_data_directory
(show_gdb_datadir): New function.
(init_main): Update init of data-directory parameter.

testsuite/
* gdb.base/catch-syscall.exp (test_catch_syscall_fail_nodatadir):
Update.
(do_syscall_tests_without_xml): Update.

doc/
* gdb.texinfo (Mode Options): Add -D.

10 years agoImport the "dirfd" gnulib module.
Gregory Fong [Fri, 16 May 2014 18:26:33 +0000 (12:26 -0600)] 
Import the "dirfd" gnulib module.

2014-05-16  Gregory Fong  <gregory.0xf0@gmail.com>

Import the "dirfd" gnulib module.
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add dirfd.
* gnulib/aclocal.m4: Update.
* gnulib/config.in: Update.
* gnulib/configure: Update.
* gnulib/import/Makefile.am: Update.
* gnulib/import/Makefile.in: Update.
* gnulib/import/dirfd.c: New.
* gnulib/import/m4/dirfd.m4: New.
* gnulib/import/m4/gnulib-cache.m4: Update.
* gnulib/import/m4/gnulib-comp.m4: Update.

10 years ago * configure.tgt: Add /lib to dragonfly NATIVE_LIB_DIRS.
John Marino [Fri, 16 May 2014 14:39:47 +0000 (15:39 +0100)] 
* configure.tgt: Add /lib to dragonfly NATIVE_LIB_DIRS.

10 years agoThis fixes a few issues with pe/coff build-ids that were discovered since the
Jon Turney [Fri, 16 May 2014 14:34:13 +0000 (15:34 +0100)] 
This fixes a few issues with pe/coff build-ids that were discovered since the
original patches were posted:

  pe/coff: Display GUID build-id in the conventional way
  pe/coff: Don't interpret debug directory in section with no contents
  pe/coff: Keep .build-id with --only-keep-debug
  pe/coff: Don't break .build-id with objcopy/strip

* peXXigen.c (pe_print_debugdata): Don't interpret debug directory
in a section with no contents.
(is_vma_in_section, find_section_by_vma): New functions.
(_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
offsets in the debug directory.
(_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
Byte-swap GUID from little-endian to big-endian order for
consistent and conventional display.

* objcopy.c (is_nondebug_keep_contents_section): New function.
(setup_section): Use it.

10 years agoThis adds support for marking RL78 binaries as either supporting 32-bit
Kaushik Phata [Fri, 16 May 2014 13:57:10 +0000 (14:57 +0100)] 
This adds support for marking RL78 binaries as either supporting 32-bit
or 64-bit doubles.  It also makes the linker complain if the user attempts
to link together binaries with different sized doubles.

* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
64-bit doubles objects mix with 32-bit doubles objects.
(rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.

* readelf.c (get_machine_flags): Handle RL78 64-bit doubles flag.

* config/tc-rl78.c (enum options): Add OPTION_32BIT_DOUBLES
and OPTION_64BIT_DOUBLES.
(md_longopts): Add -m32bit-doubles and -m64bit-doubles.
(md_parse_option): Parse -m32bit-doubles and -m64bit-doubles.
(md_show_usage): Show all of the RL78 options.
(rl78_float_cons): New static functions.
(md_pseudo_table): Update handler for "double".

10 years agomi-support.exp: Fix some pastos.
Pedro Alves [Fri, 16 May 2014 13:43:47 +0000 (14:43 +0100)] 
mi-support.exp: Fix some pastos.

gdb/testsuite/
2014-05-16  Pedro Alves  <palves@redhat.com>

* lib/mi-support.exp (mi_expect_stop): On timeout, say "timeout"
instead of "unknown output after running".

10 years agoCopy file1.txt to remote host in dw2-filename.exp and dw2-anonymous-func.exp
Yao Qi [Tue, 13 May 2014 03:41:03 +0000 (11:41 +0800)] 
Copy file1.txt to remote host in dw2-filename.exp and dw2-anonymous-func.exp

Some gdb.dwarf2/*.exp tests copy file1.txt to host via gdb_remote_download
but dw2-filename.exp and dw2-anonymous-func.exp don't do that.  Looks like
an oversight in this patch
https://sourceware.org/ml/gdb-patches/2013-08/msg00365.html

There are some fails in remote host testing.
FAIL: gdb.dwarf2/dw2-anonymous-func.exp: list file1.txt
FAIL: gdb.dwarf2/dw2-filename.exp: interpreter-exec mi -file-list-exec-source-files
FAIL: gdb.dwarf2/dw2-filename.exp: info sources

This patch is to invoke gdb_remote_download to copy file1.txt to host
and remote it at the end.  This patch fixes these fails above.

gdb/testsuite:

2014-05-16  Yao Qi  <yao@codesourcery.com>

* gdb.dwarf2/dw2-filename.exp: Copy file1.txt to host.  Remove
file1.txt from host at the end.
* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.

10 years agoFix display of tabulation character for mingw hosts.
Yao Qi [Tue, 22 Apr 2014 04:56:08 +0000 (12:56 +0800)] 
Fix display of tabulation character for mingw hosts.

Pierre proposed this patch
https://sourceware.org/ml/gdb-patches/2013-10/msg00011.html and
Tom gave a suggestion that it's better to do check \t in print_wchar
<https://sourceware.org/ml/gdb-patches/2013-11/msg00148.html>
However, I don't see the follow-up to this discussion.

We encounter two fails in printcmds.exp on mingw host, and Pierre's
patch fixes them.  I pick it up, update a little per Tom's
comments, and post it here for review.  This patch fixes these fails
below on mingw32 host.

FAIL: gdb.base/charset.exp: print string in ASCII
FAIL: gdb.base/charset.exp: try printing '\t' in ASCII
FAIL: gdb.base/charset.exp: print string in ISO-8859-1
FAIL: gdb.base/charset.exp: try printing '\t' in ISO-8859-1
FAIL: gdb.base/charset.exp: print string in UTF-32
FAIL: gdb.base/charset.exp: try printing '\t' in UTF-32
FAIL: gdb.base/printcmds.exp: p ctable1[9]
FAIL: gdb.base/printcmds.exp: p &ctable1[1*8]

Also regression tested on x86_64-linux.  Is it OK?

gdb:

2014-05-16  Pierre Muller  <muller@sourceware.org>
    Yao Qi  <yao@codesourcery.com>

* valprint.c (print_wchar): Move the code on checking whether
W is a printable wide char to the default branch of switch
statement below.  Call wchar_printable instead of gdb_iswprint.

10 years agoFix changelong entry.
Yao Qi [Fri, 16 May 2014 12:10:38 +0000 (20:10 +0800)] 
Fix changelong entry.

  Each changelog entry should be tab-prefixed.

10 years agoFix prologue analysis for ldr.w and ldrd instruction
Taimoor Mirza [Fri, 16 May 2014 06:39:05 +0000 (11:39 +0500)] 
Fix prologue analysis for ldr.w and ldrd instruction

Prologue analysis for ldr.w and ldrd instruction obtains offset from
first two bytes that contains opcode of instruction. It should obtain
offset from next two bytes that actually contain operands.

       * arm-tdep.c (thumb_analyze_prologue): Fix offset calculation for
ldr.w and ldrd instructions.

Signed-off-by: Taimoor Mirza <tmirza@codesourcery.com>
10 years agodaily update
Alan Modra [Fri, 16 May 2014 00:00:36 +0000 (09:30 +0930)] 
daily update

10 years agoMake more robust when run in parallel mode.
Doug Evans [Thu, 15 May 2014 22:50:34 +0000 (15:50 -0700)] 
Make more robust when run in parallel mode.

Since we're not compiling with gcc, we don't know where the
DWO file will ultimately be built.  It could be built in
testsuite/gdb.dwarf2/foo (non-parallel mode) or
testsuite/outputs/gdb.dwarf2/foo (parallel mode).

* gdb.dwarf2/fission-reread.S: Remove directory from .dwo file path.
* gdb.dwarf2/fission-reread.exp: Set debug-file-directory before
loading file.  Add test for TU lookup.

10 years ago* dwarf2read.c (read_structure_type): Delete outdated comments.
Doug Evans [Thu, 15 May 2014 22:45:05 +0000 (15:45 -0700)] 
* dwarf2read.c (read_structure_type): Delete outdated comments.

10 years agoFix argument passing in mi_run_cmd_full
Simon Marchi [Tue, 13 May 2014 21:37:44 +0000 (17:37 -0400)] 
Fix argument passing in mi_run_cmd_full

Passing arguments did not work when use_mi_command was set.

gdb/testsuite/ChangeLog:
2014-05-13  Simon Marchi  <simon.marchi@ericsson.com>

* lib/mi-support.exp (mi_run_cmd_full): Set arguments by calling
"-exec-arguments" or "set args" before running the inferior.

10 years agoFix mi_expect_stop for non-zero exit codes
Simon Marchi [Tue, 13 May 2014 21:07:33 +0000 (17:07 -0400)] 
Fix mi_expect_stop for non-zero exit codes

The message displayed by gdb is different when the inferior exits with
zero and non-zero values, this fix takes that into account.

gdb/testsuite/ChangeLog:
2014-05-13  Simon Marchi  <simon.marchi@ericsson.com>

* lib/mi-support.exp (mi_expect_stop): Expect message for
inferiors that exit with non-zero exit code.

10 years agoFix "overflow in PLT unwind data" warning
Alan Modra [Thu, 15 May 2014 09:07:43 +0000 (18:37 +0930)] 
Fix "overflow in PLT unwind data" warning

When linking statically, it's possible to hit this warning with IFUNC
or very large executables, due to .glink being unused.

* powerpc.cc (do_plt_fde_location): Handle zero length .glink.
Compare FDE contents with DW_CFA_nop rather than 0.

10 years agodaily update
Alan Modra [Thu, 15 May 2014 00:00:45 +0000 (09:30 +0930)] 
daily update

10 years agoSync nios2 configure changes from GCC mainline.
Sandra Loosemore [Wed, 14 May 2014 23:27:14 +0000 (16:27 -0700)] 
Sync nios2 configure changes from GCC mainline.

2014-05-14  Sandra Loosemore  <sandra@codesourcery.com>

* configure.ac (target_makefile_frag): Set for nios2-*-elf*.
* configure: Regenerated.

config/
* mt-nios2-elf: New file.

10 years agoreindent print_macro_definition
Tom Tromey [Wed, 14 May 2014 19:31:10 +0000 (13:31 -0600)] 
reindent print_macro_definition

I happened to notice that print_macro_definition is indented
improperly.  All the lines were a few extra spaces to the right.

This patch fixes the indentation.
Tested by rebuilding, committed.

2014-05-14  Tom Tromey  <tromey@redhat.com>

* macrocmd.c (print_macro_definition): Reindent.

10 years agoFix mi-file.exp fails on remote host
Yao Qi [Tue, 13 May 2014 06:40:22 +0000 (14:40 +0800)] 
Fix mi-file.exp fails on remote host

This patch fixes mi-file.exp fails on remote host.  First, we can't
assume ${srcdir}/${subdir}/${srcfile} directory exists on remote host,
so this patch changes it to match ${srcfile} only on remote host.
Second, regexp pattern ".*/${srcfile}" isn't friendly to Windows path.
The file name is "basics.c" in my test env and can't match the pattern
due to "/" in it.  Remove "/" from the pattern.

gdb/testsuite:

2014-05-14  Yao Qi  <yao@codesourcery.com>

* gdb.mi/mi-file.exp (test_file_list_exec_source_file): Don't
match absolute path on remote host.
(test_file_list_exec_source_files): Remove "/" from the
pattern.

10 years agoOverwrite ${board}_file in local-remote-host
Yao Qi [Tue, 13 May 2014 01:37:54 +0000 (09:37 +0800)] 
Overwrite ${board}_file in local-remote-host

After I run test like this,

 $ make check RUNTESTFLAGS='--host_board=local-remote-host dw2-basic.exp'

gdb.dwarf2/file1.txt in source tree was removed.  In some gdb.dwarf2/*.exp,
file1.txt is copied to host and then removed at the end.  However, in
local-remote-host-notty.exp, ${board}_download doesn't copy the file but
return the absolute path of the src file.  'remote_file host delete' at
the end will remove the file in source tree.

This patch is to overwrite ${board}_file, and specially make "delete"
option do nothing.  This approach is used in gdbserver-base.exp and
remote-stdio-gdbserver.exp too.

gdb/testsuite:

2014-05-14  Yao Qi  <yao@codesourcery.com>

* boards/local-remote-host-notty.exp (${board}_file): New
proc.

10 years ago* python/py-cmd.c (cmdpy_completer): Add comment.
Doug Evans [Wed, 14 May 2014 02:44:51 +0000 (19:44 -0700)] 
* python/py-cmd.c (cmdpy_completer): Add comment.
(completers): Make const.

10 years agodaily update
Alan Modra [Wed, 14 May 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years agoRemove unused variable
Simon Marchi [Mon, 21 Apr 2014 15:49:59 +0000 (11:49 -0400)] 
Remove unused variable

should_resume is set to 1 at the beginning and never changed.

gdb/ChangeLog:

2014-05-13  Simon Marchi  <simon.marchi@ericsson.com>

* infrun.c (resume): Remove should_resume (unused).  Move up
declaration of resume_ptid.

10 years agoWith -pie and x86, the linker complains if it sees a PC-relative relocation
Sriraman Tallam [Tue, 13 May 2014 17:51:48 +0000 (10:51 -0700)] 
With -pie and x86, the linker complains if it sees a PC-relative relocation
to access a global as it expects a GOTPCREL relocation.  This is really not
necessary as the linker could use a copy relocation to get around it.  This
patch enables copy relocations with pie.

Context:
This is useful because currently the GCC compiler with option -fpie makes
every extern global access go through the GOT. That is because the compiler
cannot tell if a global will end up being defined in the executable or not
and is conservative. This ends up hurting performance when the binary is linked
as mostly static where most of the globals do end up being defined in the
executable.  By allowing copy relocs with fPIE, the compiler need not generate
a GOTPCREL(GOT access) for any global access.  It can safely assume that all
globals will be defined in the executable and generate a PC-relative access
instead.  Gold can then create a copy reloc for only the undefined globals.

gold/
* symtab.h (may_need_copy_reloc): Remove check for position independent
code.
* x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
position independence before pc absolute may_need_copy_reloc call.
Add check for executable output befor pc relative may_need_copy_reloc
call.
* i386.cc: Ditto.
* arm.cc: Ditto.
* sparc.cc: Ditto.
* tilegx.cc: Ditto.
* powerpc.cc: Add check for no position independence before
may_need_copy_reloc calls.
* testsuite/pie_copyrelocs_test.cc: New file.
* testsuite/pie_copyrelocs_shared_test.cc: New file.
* Makefile.am (pie_copyrelocs_test): New test.
* Makefile.in: Regenerate.

10 years agoremove an unused macro and an unused declaration
Tom Tromey [Tue, 13 May 2014 17:35:18 +0000 (11:35 -0600)] 
remove an unused macro and an unused declaration

This patch removes an unused macro from language.h.  It also removes
the declaration of a function which is not defined.

I'm checking this in as obvious.
Tested by rebuilding.

2014-05-13  Tom Tromey  <tromey@redhat.com>

* language.h (unop_type_check): Remove.
(binop_type_check): Don't declare.

10 years agoOptimizing accesses to Globals with -fpie -pie:
Sriraman Tallam [Tue, 13 May 2014 17:33:59 +0000 (10:33 -0700)] 
Optimizing accesses to Globals with -fpie -pie:

With -pie and x86, the linker complains if it sees a PC-relative relocation
to access a global as it expects a GOTPCREL relocation.  This is really not
necessary as the linker could use a copy relocation to get around it.  This
patch enables copy relocations with pie.

Context:
This is useful because currently the GCC compiler with option -fpie makes
every extern global access go through the GOT. That is because the compiler
cannot tell if a global will end up being defined in the executable or not
and is conservative. This ends up hurting performance when the binary is linked
as mostly static where most of the globals do end up being defined in the
executable.  By allowing copy relocs with fPIE, the compiler need not generate
a GOTPCREL(GOT access) for any global access.  It can safely assume that all
globals will be defined in the executable and generate a PC-relative access
instead.  Gold can then create a copy reloc for only the undefined globals.

10 years agoS390: Fix erroneous offset in fill_gregset.
Andreas Arnez [Tue, 13 May 2014 12:55:53 +0000 (14:55 +0200)] 
S390: Fix erroneous offset in fill_gregset.

This fixes a bug that leads to various failures when debugging a
31-bit inferior with a 64-bit gdb on s390x.

10 years agoRe-work register size macros for MIPS.
mfortune [Tue, 13 May 2014 10:55:08 +0000 (11:55 +0100)] 
Re-work register size macros for MIPS.

gas/
* config/tc-mips.c (mips_set_options): Rename gp32 to gp throughout.
(HAVE_32BIT_GPRS, HAVE_64BIT_GPRS): Remove. Re-implement via GPR_SIZE.
(HAVE_32BIT_FPRS, HAVE_64BIT_FPRS): Remove. Re-implement via FPR_SIZE.
(GPR_SIZE, FPR_SIZE): New macros. Use throughout.

10 years agodaily update
Alan Modra [Tue, 13 May 2014 00:00:39 +0000 (09:30 +0930)] 
daily update

10 years agoSupport 32->64 sign extension in msp430's sign_ext
DJ Delorie [Mon, 12 May 2014 23:05:19 +0000 (19:05 -0400)] 
Support 32->64 sign extension in msp430's sign_ext

* msp43-sim.c (sign_ext): Change to "long long" to support
sign-extending 32-bit values.

10 years agoAdd link to older changes in ChangeLog-1993-2013.
Doug Evans [Mon, 12 May 2014 22:16:13 +0000 (15:16 -0700)] 
Add link to older changes in ChangeLog-1993-2013.

10 years agoSplit out older testsuite/ChangeLog entries (prior to 2014)
Doug Evans [Mon, 12 May 2014 22:13:49 +0000 (15:13 -0700)] 
Split out older testsuite/ChangeLog entries (prior to 2014)
into separate file: ChangeLog-1993-2013.

10 years agomi: Use the value in mi_console_file->quote as the quoting character
Simon Marchi [Sat, 26 Apr 2014 22:10:40 +0000 (18:10 -0400)] 
mi: Use the value in mi_console_file->quote as the quoting character

In mi_interpreter_init, multiple MI consoles/channels are created and a quoting
character is given.  In mi_console_raw_packet, we check if the value is not 0
to decide if we should quote the string, but we don't use the value. It is
hardcoded to ".  We might never use another quoting character than an actual
quote, but I suggest we change it, for correctness.  There is not visible
behavior change.

I changed the latest fputs_unfiltered changed to fputc_unfiltered just to stay
consistent.

gdb/ChangeLog:

2014-05-12  Simon Marchi  <simon.marchi@ericsson.com>

* mi/mi-console.c (mi_console_raw_packet): Use the value from
mi_console->quote as the quoting character.

10 years agoAdd myself as write after approval maintainer
Simon Marchi [Mon, 12 May 2014 17:06:11 +0000 (13:06 -0400)] 
Add myself as write after approval maintainer

2014-05-12  Simon Marchi  <simon.marchi@ericsson.com>

* MAINTAINERS (Write After Approval): Add "Simon Marchi".

10 years agodaily update
Alan Modra [Mon, 12 May 2014 00:00:37 +0000 (09:30 +0930)] 
daily update

10 years ago2014-05-11 Chung-Lin Tang <cltang@codesourcery.com>
Chung-Lin Tang [Sun, 11 May 2014 17:04:45 +0000 (10:04 -0700)] 
2014-05-11  Chung-Lin Tang  <cltang@codesourcery.com>

* emulparams/nios2linux.sh (OTHER_GOT_SYMBOLS): Wrap _gp in HIDDEN(),
and gp in PROVIDE_HIDDEN.

10 years agodaily update
Alan Modra [Sun, 11 May 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years agoAdd obviously forgotten "PACKAGE = @PACKAGE@" to gdb/doc/Makefile.in
Samuel Bronson [Sat, 10 May 2014 01:07:43 +0000 (21:07 -0400)] 
Add obviously forgotten "PACKAGE = @PACKAGE@" to gdb/doc/Makefile.in

* gdb/doc/Makefile.in (PACKAGE): Copy from ../Makefile.in in case of
"make -C".

10 years agoFix freeing of link_info.hash
Hans-Peter Nilsson [Sat, 10 May 2014 00:50:01 +0000 (02:50 +0200)] 
Fix freeing of link_info.hash

ld:
* ldlang.c (lang_finish): Don't call bfd_link_hash_table_free here.
(output_bfd_hash_table_free_fn): New variable.
(open_output): Save the _bfd_link_hash_table_free function for the
output_bfd into output_bfd_hash_table_free_fn.
* ldmain.c (ld_cleanup): If set, call output_bfd_hash_table_free_fn
on link_info.hash.
* ldlang.h (output_bfd_hash_table_free_fn): Declare.

ld/testsuite:
* ld-mmix/wrap1.d, ld-mmix/wrap1a.s, ld-mmix/wrap1b.s,
ld-mmix/wrap1c.s, ld-mmix/wrap2.d, ld-mmix/wrap3.d,
ld-mmix/wrap3a.s, ld-mmix/wrap3b.s, ld-mmix/wrap4.d: New
tests.

10 years agodaily update
Alan Modra [Sat, 10 May 2014 00:00:37 +0000 (09:30 +0930)] 
daily update

10 years agoProperly display extra data/address size prefixes
H.J. Lu [Fri, 9 May 2014 17:58:00 +0000 (10:58 -0700)] 
Properly display extra data/address size prefixes

X86 disassembler checks data and address size prefixes when displaying
instruction mnemonic and operands.  For the extra data and address size
prefixes, their names depend only on the address mode, not the data and
address size prefixes.  This patch changes x86 disassembler not to check
the data and address size prefix when printing extra data and address size
prefixes.

gas/testsuite/

* gas/i386/nops-1-core2.d: Replace data32 with data16.
* gas/i386/nops-4a-i686.d: Likewise.
* gas/i386/nops-5-i686.d: Likewise.
* gas/i386/nops-5.d: Likewise.
* gas/i386/x86-64-cbw-intel.d: Likewise.
* gas/i386/x86-64-cbw.d: Likewise.
* gas/i386/x86-64-io-intel.d: Likewise.
* gas/i386/x86-64-io-suffix.d: Likewise.
* gas/i386/x86-64-io.d: Likewise.
* gas/i386/x86-64-nops-1-core2.d: Likewise.
* gas/i386/x86-64-nops-1-g64.d: Likewise.
* gas/i386/x86-64-nops-1-nocona.d: Likewise.
* gas/i386/x86-64-nops-1.d: Likewise.
* gas/i386/x86-64-nops-2.d: Likewise.
* gas/i386/x86-64-nops-3.d: Likewise.
* gas/i386/x86-64-nops-4-core2.d: Likewise.
* gas/i386/x86-64-nops-4.d: Likewise.
* gas/i386/x86-64-nops-5-k8.d: Likewise.
* gas/i386/x86-64-nops-5.d: Likewise.
* gas/i386/x86-64-stack-intel.d: Likewise.
* gas/i386/x86-64-stack-suffix.d: Likewise.
* gas/i386/x86-64-stack.d: Likewise.
* gas/i386/ilp32/x86-64-cbw-intel.d: Likewise.
* gas/i386/ilp32/x86-64-cbw.d: Likewise.
* gas/i386/ilp32/x86-64-io-intel.d: Likewise.
* gas/i386/ilp32/x86-64-io-suffix.d: Likewise.
* gas/i386/ilp32/x86-64-io.d: Likewise.
* gas/i386/ilp32/x86-64-nops-1-core2.d:
* gas/i386/ilp32/x86-64-nops-1-nocona.d: Likewise.
* gas/i386/ilp32/x86-64-nops-1.d: Likewise.
* gas/i386/ilp32/x86-64-nops-2.d: Likewise.
* gas/i386/ilp32/x86-64-nops-3.d: Likewise.
* gas/i386/ilp32/x86-64-nops-4-core2.d: Likewise.
* gas/i386/ilp32/x86-64-nops-4.d: Likewise.
* gas/i386/ilp32/x86-64-nops-5-k8.d: Likewise.
* gas/i386/ilp32/x86-64-nops-5.: Likewise.
* gas/i386/ilp32/x86-64-stack-intel.d: Likewise.
* gas/i386/ilp32/x86-64-stack-suffix.: Likewise.
* gas/i386/ilp32/x86-64-stack.d: Likewise.

ld/testsuite/

* ld-x86-64/tlsbin.dd: Replace data32 with data16.
* ld-x86-64/tlsdesc-nacl.pd: Likewise.
* ld-x86-64/tlsgdesc.dd: Likewise.
* ld-x86-64/tlsld1.dd: Likewise.
* ld-x86-64/tlsld3.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.

opcodes/

2014-05-09  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (ADDR16_PREFIX): Removed.
(ADDR32_PREFIX): Likewise.
(DATA16_PREFIX): Likewise.
(DATA32_PREFIX): Likewise.
(prefix_name): Updated.
(print_insn): Simplify data and address size prefixes processing.

10 years agodaily update
Alan Modra [Fri, 9 May 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years ago2014-05-08 Martin Liška <mliska@suse.cz>
Martin Liška [Thu, 8 May 2014 22:23:53 +0000 (15:23 -0700)] 
2014-05-08  Martin Liška  <mliska@suse.cz>

gold/
* output.cc (Sized_relobj_file::do_layout): Fix typo in info message.

10 years agoFix references to file_mips_isa missed in previous patch.
mfortune [Thu, 8 May 2014 21:07:49 +0000 (22:07 +0100)] 
Fix references to file_mips_isa missed in previous patch.

gas/
* config/tc-mips.c (md_parse_option): Update missed file_mips_isa
references.

10 years agoConsolidate file_mips_xxx variables.
mfortune [Wed, 7 May 2014 22:33:47 +0000 (23:33 +0100)] 
Consolidate file_mips_xxx variables.

gas/
* config/tc-mips.c (mips_set_options): Rename fp32 field to fp.
Update fp32 == 0 to fp == 64 and fp32 == 1 to fp != 64 throughout.
(file_mips_gp32, file_mips_fp32, file_mips_soft_float,
file_mips_single_float, file_mips_isa, file_mips_arch): Merge into
one struct...
(file_mips_opts): Here. New static global. Update throughout.
(mips_opts): Update defaults for gp32 and fp.

10 years agolibiberty/ 2014-05-08 Gary Benson <gbenson@redhat.com>
gary [Thu, 8 May 2014 09:13:44 +0000 (09:13 +0000)] 
libiberty/ 2014-05-08 Gary Benson <gbenson@redhat.com>

* cp-demangle.c (struct d_component_stack): New structure.
(struct d_print_info): New field component_stack.
(d_print_init): Initialize the above.
(d_print_comp_inner): Renamed from d_print_comp.
Do not restore template stack if it would cause a loop.
(d_print_comp): New function.
* testsuite/demangle-expected: New test cases.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210205 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoPR sanitizer/56781 lto-plugin/ * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize...
jakub [Thu, 17 Apr 2014 12:25:25 +0000 (12:25 +0000)] 
PR sanitizer/56781 lto-plugin/ * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address. (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS, liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a over ../libiberty/pic/libiberty.a if the former exists. * Makefile.in: Regenerated. libiberty/ * maint-tool: Also emit rule for noasan/ subdirectory. * configure.ac (NOASANFLAG): Set and substitute. * Makefile.in: Regenerated. (NOASANFLAG): Set. (all, $(TARGETLIB), mostlyclean): Handle noasan subdir like pic subdir. (stamp-noasandir): New goal. * configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209476 138bc75d-0d04-0410-961f-82ee72b054a4

10 years ago2014-04-01 Richard Biener <rguenther@suse.de>
rguenth [Tue, 1 Apr 2014 07:45:48 +0000 (07:45 +0000)] 
2014-04-01 Richard Biener <rguenther@suse.de>

libiberty/
* simple-object.c (simple_object_internal_write): Handle
EINTR and short writes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208972 138bc75d-0d04-0410-961f-82ee72b054a4

10 years ago2014-03-28 Richard Biener <rguenther@suse.de>
rguenth [Fri, 28 Mar 2014 14:05:49 +0000 (14:05 +0000)] 
2014-03-28 Richard Biener <rguenther@suse.de>

libiberty/
* simple-object.c (simple_object_internal_read): Handle
EINTR and short reads.

lto-plugin/
* lto-plugin.c (process_symtab): Handle EINTR and short reads.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208898 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoPR sanitizer/56781 * Makefile.def: Set bootstrap=true; for host fixincludes. * config...
jakub [Wed, 26 Mar 2014 09:19:44 +0000 (09:19 +0000)] 
PR sanitizer/56781 * Makefile.def: Set bootstrap=true; for host fixincludes. * configure.ac: Don't bootstrap host fixincludes unless --with-build-config=bootstrap-{a,ub}san. * Makefile.in: Regenerated. * configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208842 138bc75d-0d04-0410-961f-82ee72b054a4

10 years ago* configure.ac: Move BUILD_CONFIG set up earlier. Add --enable-vtable-verify option...
jakub [Fri, 21 Mar 2014 07:16:06 +0000 (07:16 +0000)] 
* configure.ac: Move BUILD_CONFIG set up earlier. Add --enable-vtable-verify option parsing. Don't add target-libsanitizer to bootstrap_target_libs unless --with-build-config=bootstrap-asan or --with-build-config=bootstrap-ubsan. Don't add target-libvtv to bootstrap_target_libs unless --enable-vtable-verify. * configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208745 138bc75d-0d04-0410-961f-82ee72b054a4

10 years ago* regex.c (bzero) [!_LIBC]: Cast the call to memcpy to (void).
uros [Thu, 13 Mar 2014 22:04:07 +0000 (22:04 +0000)] 
* regex.c (bzero) [!_LIBC]: Cast the call to memcpy to (void).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208558 138bc75d-0d04-0410-961f-82ee72b054a4

10 years ago* regex.c (bzero) [!_LIBC]: Define without coma expression. (regerror): Cast the...
uros [Thu, 13 Mar 2014 18:34:47 +0000 (18:34 +0000)] 
* regex.c (bzero) [!_LIBC]: Define without coma expression. (regerror): Cast the call to memcpy to (void) to avoid unused value warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208553 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoPR bootstrap/58572 * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Use -isystem instead of...
jakub [Fri, 7 Mar 2014 12:58:27 +0000 (12:58 +0000)] 
PR bootstrap/58572 * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Use -isystem instead of -I for libstdc++-v3 includes if $(LEAN). * Makefile.in: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208400 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoTILE-Gx big endian support.
walt [Mon, 24 Feb 2014 15:08:00 +0000 (15:08 +0000)] 
TILE-Gx big endian support.

/:
* configure.ac (tilepro-*-*) Change to tilepro*-*-*.
(tilegx-*-*): Change to tilegx*-*-*.
* configure: Regenerate.

contrib/:
* config-list.mk (LIST): Add tilegxbe-linux-gnu.

libcpp/:
* configure.ac: Change "tilepro" triplet to "tilepro*".
* configure: Regenerate.

libgcc/:
* config.host: Support "tilegx*" and "tilepro*" triplets.
* config/tilegx/sfp-machine32.h (__BYTE_ORDER): Handle big endian.
* config/tilegx/sfp-machine64.h (__BYTE_ORDER): Handle big endian.

gcc/:
* config.gcc (tilepro-*-*): Change to tilepro*-*-*.
(tilegx-*-linux*): Change to tilegx*-*-linux*; Support tilegxbe
triplet.
* common/config/tilegx/tilegx-common.c
(TARGET_DEFAULT_TARGET_FLAGS): Define.
* config/tilegx/linux.h (ASM_SPEC): Add endian_spec.
(LINK_SPEC): Ditto.
* config/tilegx/sync.md (atomic_test_and_set): Handle big endian.
* config/tilegx/tilegx.c (tilegx_return_in_msb): New.
(tilegx_gimplify_va_arg_expr): Handle big endian.
(tilegx_expand_unaligned_load): Ditto.
(tilegx_expand_unaligned_store): Ditto.
(TARGET_RETURN_IN_MSB): New.
* config/tilegx/tilegx.h (TARGET_DEFAULT): New.
(TARGET_ENDIAN_DEFAULT): New.
(TARGET_BIG_ENDIAN): Handle big endian.
(BYTES_BIG_ENDIAN): Ditto.
(WORDS_BIG_ENDIAN): Ditto.
(FLOAT_WORDS_BIG_ENDIAN): Ditto.
(ENDIAN_SPEC): New.
(EXTRA_SPECS): New.
* config/tilegx/tilegx.md (extv): Handle big endian.
(extzv): Ditto.
(insn_st<n>): Ditto.
(insn_st<n>_add<bitsuffix>): Ditto.
(insn_stnt<n>): Ditto.
(insn_stnt<n>_add<bitsuffix>):Ditto.
(vec_interleave_highv8qi): Handle big endian.
(vec_interleave_highv8qi_be): New.
(vec_interleave_highv8qi_le): New.
(insn_v1int_h): Handle big endian.
(vec_interleave_lowv8qi): Handle big endian.
(vec_interleave_lowv8qi_be): New.
(vec_interleave_lowv8qi_le): New.
(insn_v1int_l): Handle big endian.
(vec_interleave_highv4hi): Handle big endian.
(vec_interleave_highv4hi_be): New.
(vec_interleave_highv4hi_le): New.
(insn_v2int_h): Handle big endian.
(vec_interleave_lowv4hi): Handle big endian.
(vec_interleave_lowv4hi_be): New.
(vec_interleave_lowv4hi_le): New.
(insn_v2int_l): Handle big endian.
(vec_interleave_highv2si): Handle big endian.
(vec_interleave_highv2si_be): New.
(vec_interleave_highv2si_le): New.
(insn_v4int_h): Handle big endian.
(vec_interleave_lowv2si): Handle big endian.
(vec_interleave_lowv2si_be): New.
(vec_interleave_lowv2si_le): New.
(insn_v4int_l): Handle big endian.
* config/tilegx/tilegx.opt (mbig-endian): New option.
(mlittle-endian): New option.
* doc/install.texi: Document tilegxbe-linux.
* doc/invoke.texi: Document -mbig-endian and -mlittle-endian.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208069 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoAvoid "'dc' may be uninitialized" warning.
tschwinge [Tue, 28 Jan 2014 19:06:44 +0000 (19:06 +0000)] 
Avoid "'dc' may be uninitialized" warning.

libiberty/
* cp-demangle.c (d_demangle_callback): Put an abort call in place,
to help the compiler.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207200 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agoPR c/59871 c/ * c-typeck.c (build_compound_expr): Warn even for right-hand operand...
mpolacek [Thu, 23 Jan 2014 19:04:29 +0000 (19:04 +0000)] 
PR c/59871 c/ * c-typeck.c (build_compound_expr): Warn even for right-hand operand of a comma expression. (emit_side_effect_warnings): Likewise. libdecnumber/ * decNumberLocal.h (UBFROMUS, UBFROMUI): Remove last argument. testsuite/ * gcc.dg/20020220-2.c: Adjust dg-warning message. * gcc.dg/pr59871.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207002 138bc75d-0d04-0410-961f-82ee72b054a4

10 years agorename "set debugvarobj" to "set debug varobj"
Tom Tromey [Tue, 29 Apr 2014 14:27:31 +0000 (08:27 -0600)] 
rename "set debugvarobj" to "set debug varobj"

I think "set debugvarobj" has the wrong name.
It ought to be "set debug varobj", like gdb's other debug settings.

This patch makes the change.

I chose not to install deprecated aliases, since this is only a debug
setting; but if someone feels strongly about it I will add them.

Built and regtested on x86-64 Fedora 20.

2014-04-29  Tom Tromey  <tromey@redhat.com>

* varobj.c (_initialize_varobj): Rename to "set debug varobj" and
"show debug varobj".

2014-04-29  Tom Tromey  <tromey@redhat.com>

* gdb.texinfo (Debugging Output): Rename to "set debug varobj" and
"show debug varobj".

10 years agoImplement CONVERT_SYMBOLIC_ATTRIBUTE for MIPS.
mfortune [Wed, 7 May 2014 21:37:00 +0000 (22:37 +0100)] 
Implement CONVERT_SYMBOLIC_ATTRIBUTE for MIPS.

gas/
* config/tc-mips.c (streq): Define.
(mips_convert_symbolic_attribute): New function.
* config/tc-mips.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define.
(mips_convert_symbolic_attribute): New prototype

gas/testsuite/
* gas/mips/attr-gnu-abi-fp-1.s: New.
* gas/mips/attr-gnu-abi-fp-1.d: New.
* gas/mips/attr-gnu-abi-msa-1.s: New.
* gas/mips/attr-gnu-abi-msa-1.d: New.
* gas/mips/mips.exp: Add new tests.

10 years agoAdd bfd/ChangeLog entry missing in commit.
Hans-Peter Nilsson [Thu, 8 May 2014 10:47:52 +0000 (12:47 +0200)] 
Add bfd/ChangeLog entry missing in commit.
* mmo.c: Update URLs in documentation comments.

10 years agoAdd support for emulating the MSP430 hardware multiply feature.
Nick Clifton [Thu, 8 May 2014 07:53:16 +0000 (08:53 +0100)] 
Add support for emulating the MSP430 hardware multiply feature.

* msp430-sim.c (sim_open): Do not allocate memory over the
hardware multiply registers.
(get_op): Add support for reads from the hardware multiply
registers.
(put_op): Add support for writes to the hardware multiply
registers.
(msp430_step_once): Add support for the RETI instruction used by
the CPUX architecture.

10 years agoor1k: add support for l.swa/l.lwa atomic instructions
Stefan Kristiansson [Thu, 8 May 2014 05:53:09 +0000 (08:53 +0300)] 
or1k: add support for l.swa/l.lwa atomic instructions

This adds support for the load-link/store-conditional
l.lwa/l.swa atomic instructions.
The support is added in such way, that the cpu description not
only describes the mnemonics, but also the functionality.

A couple of fixes to typos in nearby/related code are also snuck
into this.

cpu/
* or1korbis.cpu (h-atomic-reserve): New hardware.
(h-atomic-address): Likewise.
(insn-opcode): Add opcodes for LWA and SWA.
(atomic-reserve): New operand.
(atomic-address): Likewise.
(l-lwa, l-swa): New instructions.
(l-lbs): Fix typo in comment.
(store-insn): Clear atomic reserve on store to atomic-address.
Fix register names in fmt field.

opcodes/
* or1k-desc.c: Regenerated.
* or1k-desc.h: Likewise.
* or1k-opc.c: Likewise.
* or1k-opc.h: Likewise.
* or1k-opinst.c: Likewise.

10 years agodaily update
Alan Modra [Thu, 8 May 2014 00:00:41 +0000 (09:30 +0930)] 
daily update

10 years agommo.c: Update URLs in documentation comments.
Hans-Peter Nilsson [Wed, 7 May 2014 22:48:19 +0000 (00:48 +0200)] 
mmo.c: Update URLs in documentation comments.

10 years agoUse signed data type for R_XTENSA_DIFF* relocation offsets.
Volodymyr Arbatov [Mon, 6 May 2013 17:43:21 +0000 (09:43 -0800)] 
Use signed data type for R_XTENSA_DIFF* relocation offsets.

R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such.
Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation
changing sign during relaxation.

2014-05-02  Volodymyr Arbatov  <arbatov@cadence.com>
    David Weatherford  <weath@cadence.com>
    Max Filippov  <jcmvbkbc@gmail.com>

bfd/
  * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
  signed.

gas/
  * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF*
  fixups as signed.

ld/testsuite/
  * ld-xtensa/diff_overflow.exp, * ld-xtensa/diff_overflow1.s,
  * ld-xtensa/diff_overflow2.s: Add test for DIFF* relocation
  signedness and overflow checking.

10 years agoAdd proper arm config for *-*-freebsd*.
Andreas Tobler [Wed, 7 May 2014 20:52:51 +0000 (22:52 +0200)] 
Add proper arm config for *-*-freebsd*.

10 years agoaarch64: detect atomic sequences like other ll/sc architectures
Kyle McMartin [Wed, 30 Apr 2014 16:04:50 +0000 (12:04 -0400)] 
aarch64: detect atomic sequences like other ll/sc architectures

gdb/Changelog:

        * aarch64-tdep.c (aarch64_software_single_step): New function.
        (aarch64_gdbarch_init): Handle single stepping of atomic sequences
        with aarch64_software_single_step.

gdb/testsuite/ChangeLog:

        * gdb.arch/aarch64-atomic-inst.c: New file.
        * gdb.arch/aarch64-atomic-inst.exp: New file.

10 years agoAdd MIPS r3 and r5 support.
Andrew Bennett [Fri, 2 May 2014 13:12:48 +0000 (14:12 +0100)] 
Add MIPS r3 and r5 support.

This patch firstly adds support for mips32r3 mips32r5, mips64r3
and mips64r5.  Secondly it adds support for the eretnc instruction.

ChangeLog:

bfd/
* aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
mips32r5 and mips64r5.
* archures.c (bfd_architecture): Likewise.
* bfd-in2.h (bfd_architecture): Likewise.
* cpu-mips.c (arch_info_struct): Likewise.
* elfxx-mips.c (mips_set_isa_flags): Likewise.

gas/
* tc-mips.c (ISA_SUPPORTS_MIPS16E): Add mips32r3, mips32r5, mips64r3
and mips64r5.
(ISA_HAS_64BIT_FPRS): Likewise.
(ISA_HAS_ROR): Likewise.
(ISA_HAS_ODD_SINGLE_FPR): Likewise.
(ISA_HAS_MXHC1): Likewise.
(hilo_interlocks): Likewise.
(md_longopts): Likewise.
(ISA_HAS_64BIT_REGS): Add mips64r3 and mips64r5.
(ISA_HAS_DROR): Likewise.
(options): Add OPTION_MIPS32R3, OPTION_MIPS32R5, OPTION_MIPS64R3, and
OPTION_MIPS64R5.
(mips_isa_rev): Add support for mips32r3, mips32r5, mips64r3 and
mips64r5.
(md_parse_option): Likewise.
(s_mipsset): Likewise.
(mips_cpu_info_table): Add entries for mips32r3, mips32r5, mips64r3
and mips64r5.  Also change p5600 entry to be mips32r5.
* configure.in: Add support for mips32r3, mips32r5, mips64r3 and
mips64r5.
* configure: Regenerate.
* doc/c-mips.texi: Document the -mips32r3, -mips32r5, -mips64r3 and
-mips64r5 command line options.
* doc/as.texinfo: Likewise.

gas/testsuite/
* gas/mips/mips.exp: Add MIPS32r5 tests.  Also add the mips32r3,
mips32r5, mips64r3 and mips64r5 isas to the testsuite.
* gas/mips/r5.s: New test.
* gas/mips/r5.d: Likewise.

include/opcode/
* mips.h (INSN_ISA_MASK): Updated.
(INSN_ISA32R3): New define.
(INSN_ISA32R5): New define.
(INSN_ISA64R3): New define.
(INSN_ISA64R5): New define.
(INSN_ISA64, INSN_ISA64R2, INSN_ISA3_32, INSN_ISA3_32R2, INSN_ISA4_32
INSN_ISA4_32R2, INSN_ISA5_32R2): Renumbered.
(mips_isa_table): Add entries for mips32r3, mips32r5, mips64r3 and
mips64r5.
(INSN_UPTO32R3): New define.
(INSN_UPTO32R5): New define.
(INSN_UPTO64R3): New define.
(INSN_UPTO64R5): New define.
(ISA_MIPS32R3): New define.
(ISA_MIPS32R5): New define.
(ISA_MIPS64R3): New define.
(ISA_MIPS64R5): New define.
(CPU_MIPS32R3): New define.
(CPU_MIPS32R5): New define.
(CPU_MIPS64R3): New define.
(CPU_MIPS64R5): New define.

opcodes/
* mips-opc.c (mips_builtin_opcodes): Add MIPS32r5 eretnc instruction.
(I34): New define.
(I36): New define.
(I66): New define.
(I68): New define.
* mips-dis.c (mips_arch_choices): Add mips32r3, mips32r5, mips64r3 and
mips64r5.
(parse_mips_dis_option): Update MSA and virtualization support to
allow mips64r3 and mips64r5.

10 years agoFix an issue with "Rearrange MIPS INSN* masks" patch.
Andrew Bennett [Tue, 6 May 2014 14:43:13 +0000 (15:43 +0100)] 
Fix an issue with "Rearrange MIPS INSN* masks" patch.

This fixes an issue with Mark Shinwell's "Rearrange MIPS INSN* masks" patch
(https://sourceware.org/ml/binutils/2007-11/msg00231.html).  In the patch
the pref instruction had its membership flags changed from I4|I32|G3 to
I4_32|G3.  Unfortunately G3 was defined as being I4, which made the actual
expanded flags as: I4|I32|I4 and therefore the membership flags should have
been I4_32.  Since the patch was committed G3 was redefined to be I4|EE.  This
fix just removes I4 from G3 making the expanded membership flags for pref as
I4_32|EE.

ChangeLog:

opcodes/
* mips-opc.c (G3): Remove I4.

This page took 0.047892 seconds and 4 git commands to generate.