deliverable/binutils-gdb.git
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.

10 years agoRelax the pattern in dwzbuildid.exp
Yao Qi [Tue, 6 May 2014 13:47:36 +0000 (21:47 +0800)] 
Relax the pattern in dwzbuildid.exp

Hi,
I recently see the fail in dwzbuildid.exp below on some targets,

(gdb) print the_int
No symbol "the_int" in current context.
(gdb) FAIL: gdb.dwarf2/dwzbuildid.exp: mismatch: print the_int

Looks the pattern expects to see "No symbol table is loaded", which
is emitted in c-exp.y,

variable:       name_not_typename
....
                              if (msymbol.minsym != NULL)
                                write_exp_msymbol (pstate, msymbol);
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error (_("No symbol table is loaded.  Use the \"file\" command."));
                              else
                                error (_("No symbol \"%s\" in current context."),
                                       copy_name ($1.stoken));

it is expected to have no full symbols nor partial symbols, but something
brings full symbols or partial symbols in.  I added "maint info symtabs"
and "maint info psymtabs" in dwzbuildid.exp, and it shows symbols are from
ld.so, which has debug information.  Then, I reproduce the fail like this,

  $ make check RUNTESTFLAGS="CFLAGS_FOR_TARGET='-Wl,-rpath=${glibc_build}:${glibc_build}/math  -Wl,--dynamic-linker=${glibc_build}/elf/ld.so' dwzbuildid.exp"

${glibc_build} is the glibc build tree.  Debug information is not striped,
so the test fail.  However, if I strip debug information from libc.so, libm.so
and ld.so.  The test passes.

This patch is to relax the pattern to match the both cases that glibc build
has and has not debug information.

gdb/testsuite:

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

* gdb.dwarf2/dwzbuildid.exp: Match output "No symbol "the_int" in
current context" too.

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

10 years agoFix issue where first reserved word of GOT is not initialized if there
Cary Coutant [Tue, 6 May 2014 18:40:04 +0000 (11:40 -0700)] 
Fix issue where first reserved word of GOT is not initialized if there
is no PLT.

gold/
PR gold/16900
* i386.cc (Output_data_got_plt_i386): New class.
(Output_data_plt_i386::Output_data_plt_i386): Change type of got_plt
parameter. Change all callers.
(Output_data_plt_i386::layout_): Remove.
(Output_data_plt_i386::got_plt_): Change type.
(Target_i386::got_plt_): Change type. Change all references.
(Target_i386::got_section): Create instance of new class.
(Output_data_got_plt_i386::do_write): New function.
* x86_64.cc (Output_data_got_plt_x86_64): New class.
(Output_data_plt_x86_64::Output_data_plt_x86_64): Change type of got_plt
parameter. Change all callers.
(Output_data_plt_x86_64::layout_): Remove.
(Output_data_plt_x86_64::got_plt_): Change type.
(Target_x86_64::got_plt_): Change type. Change all references.
(Target_x86_64::got_section): Create instance of new class.
(Output_data_got_plt_x86_64::do_write): New function.
(Output_data_plt_x86_64::do_write): Don't write reserved words in GOT.
(Target_x86_64<size>::init_got_plt_for_update): Create instance of new
class.

10 years agobfd/
Richard Sandiford [Tue, 6 May 2014 19:13:03 +0000 (20:13 +0100)] 
bfd/
* elfxx-mips.h (elfxx-mips.h): Declare.
* elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
Tag_GNU_MIPS_ABI_FP mismatches.
(_bfd_mips_fp_abi_string): New function.

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

10 years agoDon't complain about the source language when we have pubnames/pubtypes info.
Cary Coutant [Fri, 2 May 2014 20:37:32 +0000 (13:37 -0700)] 
Don't complain about the source language when we have pubnames/pubtypes info.

gold/
* gdb-index.cc (Gdb_index_info_reader): Don't complain about language
if we have pubnames/pubtypes.

10 years agoDocument the GDB 7.7.1 release in gdb/ChangeLog
Joel Brobecker [Mon, 5 May 2014 22:03:06 +0000 (15:03 -0700)] 
Document the GDB 7.7.1 release in gdb/ChangeLog

gdb/ChangeLog:

GDB 7.7.1 released.

10 years agoProperly handle multiple opcode prefixes
H.J. Lu [Fri, 2 May 2014 18:22:04 +0000 (11:22 -0700)] 
Properly handle multiple opcode prefixes

This patch updates multiple opcode prefix processing:

1. Always print prefix together with bad opcode.
2. Since the last seen segment register prefix is active, we only print
the active segment register in the memory operand.
3. The 0xf2 and 0xf3 prefixes take precedence over the 0x66 prefix as the
opcode prefix.  Also the last of the 0xf2 and 0xf3 prefixes wins.
4. Ignore invalid 0xf2/0xf3 prefixes if they aren't mandatory.

gas/testsuite/

PR binutils/16893
* gas/i386/katmai.d: Expect "gs" as prefix.

* gas/i386/long-1.s: Replace movapd with movss.
* gas/i386/x86-64-long-1.s: Likewise.
* gas/i386/long-1-intel.d: Updated.
* gas/i386/long-1.d: Likewise.
* gas/i386/x86-64-long-1-intel.d: Likewise.
* gas/i386/x86-64-long-1.d: Likewise.

* gas/i386/prefix.s: Add tests for multiple 0x66, 0x67, 0xf0,
0xf2 and 0xf3 prefixes.
* gas/i386/prefix.d: Updated.

opcodes/

PR binutils/16893
* i386-dis.c (twobyte_has_mandatory_prefix): New variable.
(end_codep): Likewise.
(mandatory_prefix): Likewise.
(active_seg_prefix): Likewise.
(ckprefix): Set active_seg_prefix to the active segment register
prefix.
(seg_prefix): Removed.
(get_valid_dis386): Use the last of PREFIX_REPNZ and PREFIX_REPZ
for prefix index.  Ignore the index if it is invalid and the
mandatory prefix isn't required.
(print_insn): Set mandatory_prefix if the PREFIX_XXX prefix is
mandatory.  Don't set PREFIX_REPZ/PREFIX_REPNZ/PREFIX_LOCK bits
in used_prefixes here.  Don't print unused prefixes.  Check
active_seg_prefix for the active segment register prefix.
Restore the DFLAG bit in sizeflag if the data size prefix is
unused.  Check the unused mandatory PREFIX_XXX prefixes
(append_seg): Only print the segment register which gets used.
(OP_E_memory): Check active_seg_prefix for the segment register
prefix.
(OP_OFF): Likewise.
(OP_OFF64): Likewise.
(OP_DSreg): Set active_seg_prefix to PREFIX_DS if it is unset.

10 years agoFix a dangling cleanup in linspec_parse_basic.
Keith Seitz [Mon, 5 May 2014 20:43:31 +0000 (13:43 -0700)] 
Fix a dangling cleanup in linspec_parse_basic.

2014-05-05  Keith Seitz  <keiths@redhat.com>

* linespec.c (linespec_parse_basic): Run cleanups if a convenience
variable or history value is successfully parsed.

2014-05-05  Keith Seitz  <keiths@redhat.com>

* gdb.linespec/ls-dollar.exp: Add test for linespec
file:convenience_variable.

10 years agoPartially available/unavailable data in requested range
Yao Qi [Sat, 26 Apr 2014 02:14:52 +0000 (10:14 +0800)] 
Partially available/unavailable data in requested range

In gdb.trace/unavailable.exp, an action is defined to collect
struct_b.struct_a.array[2] and struct_b.struct_a.array[100],

struct StructB
{
  int d, ef;
  StructA struct_a;
  int s:1;
  static StructA static_struct_a;
  const char *string;
};

and the other files are not collected.

When GDB examine traceframe collected by the action, "struct_b" is
unavailable completely, which is wrong.

(gdb) p struct_b
$1 = <unavailable>

When GDB reads 'struct_b', it will request to read memory at struct_b's address
of length LEN.  Since struct_b.d is not collected, no 'M' block
includes the first part of the desired range, so tfile_xfer_partial returns
TARGET_XFER_UNAVAILABLE and GDB thinks the whole requested range is unavailable.

In order to fix this problem, in the iteration to 'M' blocks, we record the
lowest address of blocks within the request range.  If it has, the requested
range isn't unavailable completely.  This applies to ctf too.  With this patch
applied, the result looks good and fails in unavailable.exp is fixed.

(gdb) p struct_b
$1 = {d = <unavailable>, ef = <unavailable>, struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable>,
<unavailable>, -1431655766, <unavailable> <repeats 97 times>, -1431655766, <unavailable> <repeats 9899 times>}, ptr = <unavailable>, bitfield = <unavailable>}, s = <unavailable>,   static static_struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable> <repeats 10000 times>}, ptr = <unavailable>,
bitfield = <unavailable>}, string = <unavailable>}

gdb:

2014-05-05  Yao Qi  <yao@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

* tracefile-tfile.c (tfile_xfer_partial): Record the lowest
address of blocks that intersects the requested range.  Trim
LEN up to LOW_ADDR_AVAILABLE if read from executable read-only
sections.
* ctf.c (ctf_xfer_partial): Likewise.

gdb/testsuite:

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

* gdb.trace/unavailable.exp (gdb_collect_args_test): Save
traceframes into tfile and ctf trace files.  Read data from
trace file and test collected data.
(gdb_collect_locals_test): Likewise.
(gdb_unavailable_registers_test): Likewise.
(gdb_unavailable_floats): Likewise.
(gdb_collect_globals_test): Likewise.
(top-level): Append "ctf" to trace_file_targets if GDB
supports.

10 years agoShow new created display
Yao Qi [Sat, 26 Apr 2014 00:47:33 +0000 (08:47 +0800)] 
Show new created display

When I run refactored unavailable.exp, I find
command display behaves a little different on live inferior and on
examining traceframes.  In live inferior, when command "display argc"
is typed, the value of "argc" is shown.

(gdb) display argc
1: argc = 1 '\001'

however, on tfile target, when command "display argc" is typed, the
value of "argc" is not shown.

(gdb) tfind
Found trace frame 0, tracepoint 1
    at ../../../../git/gdb/testsuite/gdb.trace/unavailable.cc:198
198       i =  (int) argc + argi + argf + argd + argstruct.memberi + argarray[1];
(gdb) display argc

I also notice that on "core" target, the value of "argc" isn't shown
either.  This difference is caused by the code below in printcmd.c:display_command,

      if (from_tty && target_has_execution)
        do_one_display (new);

Looks the value of each display is shown if the target has execution.
Source code archaeology doesn't tell much about this requirement.
However, if we type command "display" then on "core" or "tfile"
target, the value of "argc" is still displayed,

for "core" target,
(gdb) display argc
(gdb) display
1: argc = 1 '\001'

for "tfile" target,
(gdb) display argc
(gdb) display
1: argc = <unavailable>

I feel that it is not necessary to have such "target has execution"
requirement to show the value of new created display.  Auto-display is
a feature to show the value of expression frequently, has nothing to
do with whether target has execution or not.  On the other hand, GDB
has the requirement for new created display, but command "display" can
still show them, this is an inconsistency, which should be fixed.

This patch is to remove the checking to target_has_execution from the
condition.

gdb:

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

* printcmd.c (display_command): Remove the check to
target_has_execution.

10 years agoMove traceframe checking out of traceframe generation
Yao Qi [Fri, 25 Apr 2014 08:18:52 +0000 (16:18 +0800)] 
Move traceframe checking out of traceframe generation

This patch moves traceframe checking code out of traceframe generation,
so that we can generation traceframe once, and do the checking in multiple
times (with target remote, tfile and ctf respectively).  This is a
pure refactor, not functional changes in unavailable.exp.

gdb/testsuite:

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

* gdb.trace/unavailable.exp (gdb_collect_args_test): Move some
code to ...
(gdb_collect_args_test_1): ... it.  New proc.
(gdb_collect_locals_test): Move some code to ...
(gdb_collect_locals_test_1): ... it.  New proc.
(gdb_unavailable_registers_test): Move some code to ...
(gdb_unavailable_registers_test_1): ... it.  New proc.
(gdb_unavailable_floats): Move some code to ...
(gdb_unavailable_floats_1): ... it.  New proc.

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

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

10 years agoGit sucks!
Mark Kettenis [Sat, 3 May 2014 20:43:16 +0000 (22:43 +0200)] 
Git sucks!

10 years agoEnable rthreads support on OpenBSD/powerpc.
Mark Kettenis [Sat, 3 May 2014 20:36:44 +0000 (22:36 +0200)] 
Enable rthreads support on OpenBSD/powerpc.

gdb/ChangeLog:

        * ppcobsd-nat.c: Include "obsd-nat.h".
        (_initialize_ppcobsd_nat): Call obsd_add_target instead of
        add_target.
        * config/powerpc/obsd.mh (NATDEPFILES): Add obsd-nat.o.

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

10 years agoFix handling of __ehdr_start when it cannot be defined.
Cary Coutant [Wed, 2 Apr 2014 21:21:14 +0000 (14:21 -0700)] 
Fix handling of __ehdr_start when it cannot be defined.

2014-05-02  Cary Coutant  <ccoutant@google.com>

* defstd.cc (in_segment): Define __ehdr_start here...
* layout.cc (Layout::finalize): ...Instead of here.  Set the
output segment when known.
* resolve.cc (Symbol::override_base_with_special): Remember
the original binding.
* symtab.cc (Symbol::set_output_segment): New function.
(Symbol::set_undefined): New function.
* symtab.h (Symbol::is_weak_undefined): Check original undef
binding.
(Symbol::is_strong_undefined): New function.
(Symbol::set_output_segment): New function.
(Symbol::set_undefined): New function.
* target-reloc.h (is_strong_undefined): Remove.
(issue_undefined_symbol_error): Call Symbol::is_weak_undefined.
Check for hidden undefs.
(relocate_section): Call Symbol::is_strong_undefined.

* testsuite/Makefile.am (ehdr_start_test_1)
(ehdr_start_test_2, ehdr_start_test_3)
(ehdr_start_test_4, ehdr_start_test_5): New test cases.
* testsuite/Makefile.in: Regenerate.
* testsuite/ehdr_start_def.cc: New source file.
* testsuite/ehdr_start_test.cc: New source file.
* testsuite/ehdr_start_test.t: New linker script.
* testsuite/ehdr_start_test_4.sh: New shell script.

10 years agoExtend recognized types of SDT probe's arguments
Sergio Durigan Junior [Fri, 2 May 2014 20:50:45 +0000 (17:50 -0300)] 
Extend recognized types of SDT probe's arguments

This commit is actually an update to make the parser in
gdb/stap-probe.c be aware of all the possible prefixes that a probe
argument can have.  According to the section "Argument Format" in:

  <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation>

The bitness of the arguments can be 8, 16, 32 or 64 bits, signed or
unsigned.  Currently GDB recognizes only 32 and 64-bit arguments.
This commit extends this.  It also provides a testcase, only for
x86_64 systems.

gdb/
2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>

* stap-probe.c (enum stap_arg_bitness): New enums to represent 8
and 16-bit signed and unsigned arguments.  Update comment.
(stap_parse_probe_arguments): Extend code to handle such
arguments.  Use warning instead of complaint to notify about
unrecognized bitness.

gdb/testsuite/
2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>

* gdb.arch/amd64-stap-optional-prefix.S (main): Add several
probes to test for bitness recognition.
* gdb.arch/amd64-stap-optional-prefix.exp
(test_probe_value_without_reg): New procedure.
Add code to test for different kinds of bitness.

10 years agoFix PR breakpoints/16889: gdb segfaults when printing ASM SDT arguments
Sergio Durigan Junior [Fri, 2 May 2014 20:45:35 +0000 (17:45 -0300)] 
Fix PR breakpoints/16889: gdb segfaults when printing  ASM SDT arguments

This commit fixes PR breakpoints/16889, which is about a bug that
triggers when GDB tries to parse probes whose arguments do not contain
the initial (and optional) "N@" part.  For reference sake, the de
facto format is described here:

  <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation>

Anyway, this PR actually uncovered two bugs (related) that were
happening while parsing the arguments.  The first one was that the
parser *was* catching *some* arguments that were missing the "N@"
part, but it wasn't correctly setting the argument's type.  This was
causing a NULL pointer being dereferenced, ouch...

The second bug uncovered was that the parser was not catching all of
the cases for a probe which did not provide the "N@" part.  The fix
for that was to simplify the check that the code was making to
identify non-prefixed probes.  The code is simpler and easier to read
now.

I am also providing a testcase for this bug, only for x86_64
architectures.

gdb/
2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>

PR breakpoints/16889
* stap-probe.c (stap_parse_probe_arguments): Simplify
check for non-prefixed probes (i.e., probes whose
arguments do not start with "N@").  Always set the
argument type to a sane value.

gdb/testsuite/
2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>

PR breakpoints/16889
* gdb.arch/amd64-stap-optional-prefix.S: New file.
* gdb.arch/amd64-stap-optional-prefix.exp: Likewise.

10 years agoMove fwait test with prefix to prefix.s
H.J. Lu [Fri, 2 May 2014 15:39:09 +0000 (08:39 -0700)] 
Move fwait test with prefix to prefix.s

* gas/i386/opcode-intel.d: Undo the last change.
* gas/i386/opcode-suffix.d: Likewise.
* gas/i386/opcode.d: Likewise.
* gas/i386/opcode.s: Likewise.

* gas/i386/prefix.s: Add test for fwait with prefix.
* gas/i386/prefix.d: Updated.

10 years agoUse sigsetjmp/siglongjmp in opcodes
H.J. Lu [Fri, 2 May 2014 15:27:16 +0000 (08:27 -0700)] 
Use sigsetjmp/siglongjmp in opcodes

sigsetjmp/siglongjmp without saving the signal mask is faster than
setjmp/longjmp on systems where the signal mask is saved.  This patch
uses sigsetjmp/siglongjmp without saving the signal mask if possible.

PR binutils/16886
* config.in: Regenerated.
* configure: Likewise.
* configure.in: Check if sigsetjmp is available.
* h8500-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn_h8500): Replace setjmp with OPCODES_SIGSETJMP.
* i386-dis.c (dis_private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn): Replace setjmp with OPCODES_SIGSETJMP.
* ns32k-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn_ns32k): Replace setjmp with OPCODES_SIGSETJMP.
* sysdep.h (OPCODES_SIGJMP_BUF): New macro.
(OPCODES_SIGSETJMP): Likewise.
(OPCODES_SIGLONGJMP): Likewise.
* vax-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn_vax): Replace setjmp with OPCODES_SIGSETJMP.
* xtensa-dis.c (dis_private): Replace jmp_buf with
OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn_xtensa): Replace setjmp with OPCODES_SIGSETJMP.
* z8k-dis.c(instr_data_s): Replace jmp_buf with OPCODES_SIGJMP_BUF.
(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
(print_insn_z8k): Replace setjmp with OPCODES_SIGSETJMP.

10 years agoSort target vectors to suit renaming
Alan Modra [Fri, 2 May 2014 10:41:49 +0000 (20:11 +0930)] 
Sort target vectors to suit renaming

* targets.c: Sort bfd_target vectors somewhat alphabetically.
* configure.in: Likewise.
* configure: Regenerate.

10 years agobfd target vector rationalisation
Alan Modra [Fri, 2 May 2014 10:39:40 +0000 (20:09 +0930)] 
bfd target vector rationalisation

This renames the bfd targets to <cpu>_<format>_<other>_<endian>_vec.
So for example, bfd_elf32_ntradlittlemips_vec becomes
mips_elf32_ntrad_le_vec and hp300bsd_vec becomes m68k_aout_hp300bsd_vec.

bfd/
* aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
* aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
* cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
* coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
* coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
* coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
* coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
* coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
* coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
* coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
* demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
* elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
* elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
* elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
* elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
* elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
* elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
* elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
* elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
* elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
* elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
* elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
* elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
* elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
* elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
* elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
* elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
* elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
* epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
* hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
* i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
* i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
* irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
* m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
* makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
* nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
* ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
* pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
* pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
* pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
* pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
* sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
* sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
* vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
* vms-alpha.c, * vms-lib.c: Rename bfd targets to
<cpu>_<format>_<other>_<endian>_vec.  Adjust associated MY macros
on aout targets.
* configure: Regenerate.
binutils/
* emul_aix.c: Update bfd target vector naming.
* testsuite/binutils-all/objcopy.exp: Likewise.
ld/
* emultempl/metagelf.em: Update bfd target vector naming.
* emultempl/nios2elf.em: Likewise.
* emultempl/spuelf.em: Likewise.
* emultempl/tic6xdsbt.em: Likewise.

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

10 years agogdb_load: Fix latent bugs
Pedro Alves [Thu, 1 May 2014 23:59:31 +0000 (00:59 +0100)] 
gdb_load: Fix latent bugs

In a test I was writting, I needed a procedure that would connect to
the target, and do "load", or equivalent.

Years ago, boards would override gdb_load to implement that.  Then
gdb_reload was added, and gdb_load was relaxed to allow boards avoid
the spawing and connecting to the target.  This sped up gdbserver
testing.  See
https://www.sourceware.org/ml/gdb-patches/2007-02/msg00318.html.

To actually spawn the target and load the executable on the target
side, gdb_reload was born:

 # gdb_reload -- load a file into the target.  Called before "running",
 # either the first time or after already starting the program once,
 # for remote targets.  Most files that override gdb_load should now
 # override this instead.

 proc gdb_reload { } {
     # For the benefit of existing configurations, default to gdb_load.
     # Specifying no file defaults to the executable currently being
     # debugged.
     return [gdb_load ""]
 }

Note the comment about specifying no file.  Indeed looking at
config/sid.exp, or config/monitor.exp, we see examples of that.

However, the default gdb_load itself doesn't handle the case of no
file specified.  When passed no file, it just calls gdb_file_cmd with
no file either, which ends up invocing the "file" command with no
argument, which means unloading the file and its symbols...  That
means calling gdb_reload when testing against native targets is
broken.  We don't see that today because the only call to gdb_reload
that exists today is guarded by target_info exists
gdb,do_reload_on_run.

The native-extended-gdbserver.exp board is likewise broken here.  When
[gdb_load ""] is called, the board sets the remote exec-file to "" ...

Tested on x86_64 Fedora 17, native, remote gdbserver and
extended-remote gdbserver.

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

* lib/gdb.exp (gdb_load): Extend comment.  Skip calling
gdb_file_cmd if no file is specified.
* boards/native-extended-gdbserver.exp (gdb_load): Use the
last_loaded_file to set the remote exec-file.

10 years agold/testsuite:
Hans-Peter Nilsson [Thu, 1 May 2014 22:31:58 +0000 (00:31 +0200)] 
ld/testsuite:
* ld-mmix/sec-11.d, ld-mmix/sec-11.ld, ld-mmix/sec-10.s,
ld-mmix/sec-10.d, ld-mmix/b-offlocmis.s, ld-mmix/sec-12.d: New
tests.
* ld-mmix/b-offloc.s: Correct address in comment.

10 years ago * mmo.c (mmo File layout documentation): Add note about low bits
Hans-Peter Nilsson [Thu, 1 May 2014 22:30:42 +0000 (00:30 +0200)] 
* mmo.c (mmo File layout documentation): Add note about low bits
of address.
(mmo_write_chunk): When handling data remainder, assert that
previous remaining data is flushed.
(mmo_write_loc_chunk): Only look for trailing and leading zeros
when dealing with an aligned VMA and for aligned lengths.  Don't skip
the last 32-bit-word of zeros.
(mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
(mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
emitting data, not after updating it.
<case LOP_LOC>: Call mmo_decide_section with aligned vma.

10 years ago * config.sub, config.guess: Import from upstream.
Richard Sandiford [Thu, 1 May 2014 20:49:01 +0000 (21:49 +0100)] 
* config.sub, config.guess: Import from upstream.

10 years agoinclude/opcode/
Richard Sandiford [Thu, 1 May 2014 20:39:48 +0000 (21:39 +0100)] 
include/opcode/
* mips.h (mips_isa_table): Avoid hard-coding INSN_ISA* values.

10 years agocompare-sections: New -r option.
David Taylor [Thu, 1 May 2014 17:09:43 +0000 (18:09 +0100)] 
compare-sections: New -r option.

When connecting to a remote system, we use the compare-sections
command to verify that the box is running the code that we think it is
running.  Since the system is up and running and *NOT* 'freshly
downloaded without yet executing anything', read-write sections, of
course, differ from what they were in the executable file.

Comparing read-write sections takes time and more importantly the
MIS-MATCHED output is confusing to some users.

The compare-sections command compares all loadable sections including
read-write sections.  This patch gives the user the option to compare
just the loadable read-only sections.

gdb/
2014-05-01  David Taylor  <dtaylor@emc.com>

* remote.c (compare_sections_command): Add -r option to compare
all loadable read-only sections.

gdb/doc/
2014-05-01  David Taylor  <dtaylor@emc.com>

* gdb.texinfo (compare-sections): Document the new -r (read-only)
option.

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