platform/upstream/binutils.git
11 years agogdb/testsuite/
Yao Qi [Fri, 5 Jul 2013 08:50:22 +0000 (08:50 +0000)]
gdb/testsuite/

* boards/local-remote-host.exp: Remove obsolete comments.
* boards/native-extended-gdbserver.exp: Likewise.
* boards/native-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.

11 years agodaily update
Alan Modra [Fri, 5 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoUse allocate_optimized_out_value instead of set_value_optimized_out.
Pedro Alves [Thu, 4 Jul 2013 18:10:04 +0000 (18:10 +0000)]
Use allocate_optimized_out_value instead of set_value_optimized_out.

Allocate the value as optimized out from the start rather than allocating
a value with contents, and then marking it optimized out.

gdb/
2013-07-04  Pedro Alves  <palves@redhat.com>

* findvar.c (value_of_register): Use allocate_optimized_out_value
if the register has been optimized out, instead of
set_value_optimized_out.
* frame-unwind.c (frame_unwind_got_optimized): Use
allocate_optimized_out_value.

11 years agovalue_bits_valid: Fix latent bug.
Pedro Alves [Thu, 4 Jul 2013 16:08:22 +0000 (16:08 +0000)]
value_bits_valid: Fix latent bug.

Doing something else, I factored out the bits of the value_bits_valid
function that actually handle the check_validity hook, and
surprisingly found out that the result was misbehaving.  Turns out
value_bits_valid has a latent bug.  If the value is not lval_computed,
or doesn't have a check_validity hook, then we should assume the value
is entirely valid, not invalid.  This is currently masked by the
value->optimized_out check -- I ran the testsuite with a gdb_assert(0)
inserted in place of that return being touched by the patch, and it
never triggers.

Tested on x86_64 Fedora 17.

gdb/
2013-07-04  Pedro Alves  <palves@redhat.com>

* value.c (value_bits_valid): If the value is not lval_computed,
or doesn't have a check_validity hook, assume the value is entirely
valid.

11 years agohttp://sourceware.org/ml/gdb-patches/2013-07/msg00059.html
Andrew Burgess [Thu, 4 Jul 2013 11:11:25 +0000 (11:11 +0000)]
sourceware.org/ml/gdb-patches/2013-07/msg00059.html

gdb/ChangeLog

        * stack.c (read_frame_arg): No longer fetch lazy values.
        * value.c (value_optimized_out): If the value is not already
        marked optimized out, and is lazy then fetch it.
        (value_primitive_field): Move optimized out check to later in the
        function, after we have loaded any lazy values.
        (value_fetch_lazy): Use optimized out flag directly rather than
        calling optimized_out method.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-reg-undefined.exp: New file.
        * gdb.dwarf2/dw2-reg-undefined.c: Likewise.
        * gdb.dwarf2/dw2-reg-undefined.S: Likewise.

11 years agohttp://sourceware.org/ml/gdb-patches/2013-07/msg00056.html
Andrew Burgess [Thu, 4 Jul 2013 09:49:43 +0000 (09:49 +0000)]
sourceware.org/ml/gdb-patches/2013-07/msg00056.html

* valops.c: Don't include "user-regs.h".
(value_fetch_lazy): Moved to value.c.
* value.c: Include "user-regs.h".
(value_fetch_lazy): Moved from valops.c.

11 years ago * ppc-opc.c (powerpc_opcodes): Add tdui, twui, tdu, twu, tui, tu.
Alan Modra [Thu, 4 Jul 2013 01:42:08 +0000 (01:42 +0000)]
* ppc-opc.c (powerpc_opcodes): Add tdui, twui, tdu, twu, tui, tu.

11 years agogdb/
Yao Qi [Thu, 4 Jul 2013 01:22:38 +0000 (01:22 +0000)]
gdb/

2013-07-04  Yao Qi  <yao@codesourcery.com>

Revert:
2013-06-27  Yao Qi  <yao@codesourcery.com>

* common/create-version.sh: Update comments.  Handle the case
that TARGET_ALIAS is empty.

gdb/gdbserver/

2013-07-04  Yao Qi  <yao@codesourcery.com>

* Makefile.in (host_alias): Use @host_noncanonical@.
(target_alias): Use @target_noncanonical@.
* configure.ac: Use ACX_NONCANONICAL_TARGET and
ACX_NONCANONICAL_HOST.
* configure: Regenerated.

Revert:
2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>

* configure.ac (version_host, version_target): Set and AC_SUBST them.
* configure: Rebuild.
* Makefile.in (version_host, version_target): Get from configure.
(version.c): Use $(version_host) and $(version_target).

11 years agodaily update
Alan Modra [Thu, 4 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago[PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with :got:
Marcus Shawcroft [Wed, 3 Jul 2013 17:26:36 +0000 (17:26 +0000)]
[PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with :got:

11 years ago[AArch64] Tidy up switch statement in GAS.
Marcus Shawcroft [Wed, 3 Jul 2013 17:25:17 +0000 (17:25 +0000)]
[AArch64]  Tidy up switch statement in GAS.

11 years ago[AArch64] Tidy up switch statements in elfnn-aarch64.c
Marcus Shawcroft [Wed, 3 Jul 2013 17:23:24 +0000 (17:23 +0000)]
[AArch64] Tidy up switch statements in elfnn-aarch64.c

11 years agoOn mainline/development, also link GDBserver with -lmcheck.
Pedro Alves [Wed, 3 Jul 2013 13:25:46 +0000 (13:25 +0000)]
On mainline/development, also link GDBserver with -lmcheck.

This factors --enable-libmcheck related bits from GDB's configure.ac
and makes GDBserver use them too.  Specifically, the 'development'
global is moved to a separate script to it can be sourced by both GDB
and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits
proper are moved to a new m4 file.

I started out by defining 'development' in the m4 file, but in the end
decided against it, as a separate script has the advantage that
changing it in release branches does not require regenerating
configure, unlike today.

I had also started out by making the new GDB_AC_LIBMCHECK itself
handle the yes/no default fallback depending on release/developement,
but since I had split out 'development' to a separate script, and, GDB
needs the python checks anyway (hence we'd need to do the python
checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no'
parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping
GDB_AC_LIBMCHECK isolated from the 'development' global.  IOW, it's
the caller's business to handle it.

Tested on x86_64 Fedora 17.  Built GDB and GDBserver with and without
--enable-libmcheck, and observed --enable-libmcheck overrides the
disablement of -lmcheck caused by python supporting threads, and that
GDBserver links with -lmcheck when expected.  Also observed that
changing the 'development' global, and issuing "make" triggers a
relink, and '-lmcheck' is included or not from the link accordingly.

gdb/
2013-07-03  Pedro Alves  <palves@redhat.com>

* Makefile.in (config.status): Depend on development.sh.
(aclocal_m4_deps): Add libmcheck.m4.
* acinclude.m4: Include libmcheck.m4.
* configure.ac: Source development.sh instead of setting
'development' here.  --enable-libmcheck/--disable-libmcheck code
factored out to GDB_AC_LIBMCHECK.  Run it.
* development.sh: New file.
* libmcheck.m4: New file.
* configure: Regenerate.

gdb/gdbserver/
2013-07-03  Pedro Alves  <palves@redhat.com>

* Makefile.in (config.status): Depend on development.sh.
* acinclude.m4: Include libmcheck.m4.
* configure: Regenerate.

11 years ago * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
Alan Modra [Wed, 3 Jul 2013 09:42:56 +0000 (09:42 +0000)]
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
when relocatable.  Don't change root.type or type here.
(ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.

11 years agobfd/
Alan Modra [Wed, 3 Jul 2013 02:22:35 +0000 (02:22 +0000)]
bfd/
* elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
(ppc64_elf_size_stubs): Don't set "addend".
(ppc64_elf_relocate_section): Don't allow calls via
toc-adjusting stubs without a following nop even in an
executable, except for self-calls and both libc_start_main
and .libc_start_main.
gold/
* powerpc.cc (Target_powerpc::Relocate::relocate): Update self-call
comment.

11 years ago * elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".
Alan Modra [Wed, 3 Jul 2013 00:45:50 +0000 (00:45 +0000)]
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".

11 years agodaily update
Alan Modra [Wed, 3 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/testsuite/
Jan Kratochvil [Tue, 2 Jul 2013 20:06:12 +0000 (20:06 +0000)]
gdb/testsuite/
* gdb.base/break-on-linker-gcd-function.exp: Replace
prepare_for_testing by build_executable_from_specs and clean_restart.

11 years ago * contrib/ari/update-web-ari.sh: Update for version.in change.
Tom Tromey [Tue, 2 Jul 2013 17:58:54 +0000 (17:58 +0000)]
* contrib/ari/update-web-ari.sh: Update for version.in change.

11 years ago * common/ptid.h: Comment fixes.
Tom Tromey [Tue, 2 Jul 2013 16:58:51 +0000 (16:58 +0000)]
* common/ptid.h: Comment fixes.

11 years agoremove mention of "target nrom"
Tom Tromey [Tue, 2 Jul 2013 16:58:32 +0000 (16:58 +0000)]
remove mention of "target nrom"

The documentation refers to "target nrom", but this target doesn't
appear in the tree.  It was zapped here:

2002-12-16  Andrew Cagney  <ac131313@redhat.com>
[...]
        * remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.

This patch removes the reference from the documentation.

* gdb.texinfo (Target Commands): Don't mention "target nrom".

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 12:58:17 +0000 (12:58 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

  * coff-rs6000.c (xcoff_find_nearest_line_discriminator): Add missing
  line.

11 years agogdbserver, win32: fix some function typedefs
Mircea Gherzan [Tue, 2 Jul 2013 11:59:24 +0000 (11:59 +0000)]
gdbserver, win32: fix some function typedefs

2013-05-25  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver/
* win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
attribute inside the parentheses.
(winapi_DebugSetProcessKillOnExit): Ditto.
(winapi_DebugBreakProcess): Ditto.
(winapi_GenerateConsoleCtrlEvent): Ditto.

Change-Id: I3aab72f2a1725a46b9da0e41a4ba08d7886284b9
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years agogdbserver: avoid empty structs
Mircea Gherzan [Tue, 2 Jul 2013 10:08:01 +0000 (10:08 +0000)]
gdbserver: avoid empty structs

2013-06-25  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver/

* notif.h (notif_event): Add a dummy member to avoid compiler
errors.

Change-Id: I490dbdb70a24f52b3947371f7c0397bf7a18423c
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 09:42:25 +0000 (09:42 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* vms-alpha.c (_bfd_generic_find_nearest_line_discriminator): Define.
(_bfd_vms_find_nearest_line_discriminator): New function.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:38:51 +0000 (07:38 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:34:38 +0000 (07:34 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function.
(rs6000coff_vec): Reference it.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:27:41 +0000 (07:27 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* internal.h (C_STTLS, C_GTLS): Define.
* xcoff.h (XMC_TL, XMC_TU, XMC_TE): Define.

11 years ago[AArch64] Fix creation of .got and placement of _GLOBAL_OFFSET_TABLE_
Marcus Shawcroft [Tue, 2 Jul 2013 06:39:26 +0000 (06:39 +0000)]
[AArch64] Fix creation of .got and placement of _GLOBAL_OFFSET_TABLE_

11 years ago[AArch64] Adjust testcases for move of &_DYNAMIC to got[0].
Marcus Shawcroft [Tue, 2 Jul 2013 06:37:33 +0000 (06:37 +0000)]
[AArch64] Adjust testcases for move of &_DYNAMIC to got[0].

11 years agobfd/
Alan Modra [Tue, 2 Jul 2013 00:25:08 +0000 (00:25 +0000)]
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
.TOC. after relocatable check.
gas/
* config/tc-ppc.c (ppc_elf_adjust_symtab): Don't make .TOC. weak.

11 years agodaily update
Alan Modra [Tue, 2 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogold/
Cary Coutant [Mon, 1 Jul 2013 20:12:11 +0000 (20:12 +0000)]
gold/
* dwarf_reader.cc (Dwarf_ranges_table::read_ranges_table): Save
reloc_type_.
(Dwarf_ranges_table::read_range_list): Call lookup_reloc.
(Dwarf_ranges_table::lookup_reloc): New function.
* dwarf_reader.h (Dwarf_ranges_table::Dwarf_ranges_table): Initialize
reloc_type_.
(Dwarf_ranges_table::lookup_reloc): New function.
(Dwarf_ranges_table::reloc_type_): New data member.

11 years agochange gdb to use BFD's "dwz" functions
Tom Tromey [Mon, 1 Jul 2013 19:55:17 +0000 (19:55 +0000)]
change gdb to use BFD's "dwz" functions

BFD recently got a few functions related to "dwz" files.  This patch
changes gdb to use them, just to share a bit more code.

This changes dwarf2_get_dwz_file to possibly return NULL.  This
simplified a bit of code elsewhere.

Built and regtested on x86-64 Fedora 18.  I specifically regtested it
using my pending dwz test case.

* dwarf2read.c (dwarf2_get_dwz_file): Return NULL if
.gnu_debugaltlink not found.  Use bfd_get_alt_debug_link_info.
(dwarf2_read_index, create_all_comp_units): Update.

11 years agoadd -Wold-style-definition
Tom Tromey [Mon, 1 Jul 2013 19:52:32 +0000 (19:52 +0000)]
add -Wold-style-definition

This adds -Wold-style-definition to gdb's list of warnings.  This
found a couple of spots where "()" was used where "(void)" is more
correct.

Tested by rebuilding on x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wold-style-definition.
* configure: Rebuild.
* machoread.c (_initialize_machoread): Use "(void)".
* macrocmd.c (macro_inform_no_debuginfo): Fix formatting;
use "(void)".

11 years agoadd -Wold-style-declaration
Tom Tromey [Mon, 1 Jul 2013 19:50:11 +0000 (19:50 +0000)]
add -Wold-style-declaration

This adds -Wold-style-declaration to gdb's list of warnings.

It turns out that a few places use "const static" rather than
"static const".  The former is deprecated according to the C standard.

Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wold-style-declaration.
* configure: Rebuild.
* dsrec.c (make_srec): Use "static const", not "const static".
* h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const",
not "const static".
* mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values):
Use "static const", not "const static".
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const",
not "const static".
* moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const",
not "const static".
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const",
not "const static".
* v850-tdep.c (v850_breakpoint_from_pc): Use "static const",
not "const static".
(v850_dbtrap_breakpoint_from_pc): Likewise.
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const",
not "const static".

11 years agoadd -Wmissing-parameter-type
Tom Tromey [Mon, 1 Jul 2013 19:48:05 +0000 (19:48 +0000)]
add -Wmissing-parameter-type

This adds -Wmissing-parameter-type to gdb's list of warnings.

This one doesn't happen to trigger for a --enable-targets=all build on
x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wmissing-parameter-type.
* configure: Rebuild.

11 years agoAdjust ld-x86-64/tlsg.sd
H.J. Lu [Mon, 1 Jul 2013 16:17:11 +0000 (16:17 +0000)]
Adjust ld-x86-64/tlsg.sd

* ld-x86-64/tlsg.sd: Adjusted.

11 years ago[GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not available.
Pedro Alves [Mon, 1 Jul 2013 11:29:17 +0000 (11:29 +0000)]
[GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not available.

PATH_MAX is not defined on systems which have no limit on filename
length, such as GNU/Hurd.  As designed, the hostio RSP packets carry
the paths as parameters in the request/reply packets, which themselves
have an upper size limit, so lifting the filename limit completely
would require a redesign with new hostio packets.  While that doesn't
happen, we can at least support filename lengths as long as the packet
buffer can fit.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* hostio.c (HOSTIO_PATH_MAX): Define.
(require_filename, handle_open, handle_unlink, handle_readlink):
Use it.

11 years agoNormalize on PATH_MAX instead of MAXPATHLEN throughout.
Pedro Alves [Mon, 1 Jul 2013 11:28:30 +0000 (11:28 +0000)]
Normalize on PATH_MAX instead of MAXPATHLEN throughout.

With the pathmax gnulib module in place, we can use PATH_MAX
consistently throughout, instead of the current mixbag of PATH_MAX and
MAXPATHLEN uses.  It's no longer necessary to include sys/param.h
(supposedly, I can't check all ports touched here) for MAXPATHLEN.

Don't remove sys/param.h from GDB's configure.ac, as later tests in
the file use HAVE_SYS_PARAM_H checks.

Tested on x86_64 Fedora 17.

Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* defs.h: Include "pathmax.h".
* utils.c: Don't include sys/param.h.
(gdb_realpath): Remove code that checks for MAXPATHLEN.
* solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX
instead of MAXPATHLEN.
* solib-sunos.c: Don't include sys/param.h.
* xcoffread.c: Don't include sys/param.h.
* bsd-kvm.c: Don't include sys/param.h.
* darwin-nat.c: Don't include sys/param.h.
(darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
* darwin-nat-info.c: Don't include sys/param.h.
* fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of
MAXPATHLEN.
* i386obsd-nat.c: Don't include sys/param.h.
* inf-child.c: Don't include sys/param.h.
(inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN.
* linux-fork.c: Don't include sys/param.h.
(fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN.
* linux-nat.c: Don't include sys/param.h.
(linux_child_pid_to_exec_file, linux_proc_pending_signals)
(linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN.
* m68klinux-nat.c: Don't include sys/param.h.
* nbsd-nat.c: Don't include sys/param.h.
(nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
* ppc-linux-nat.c: Don't include sys/param.h.
* rs6000-nat.c: Don't include sys/param.h.
* spu-linux-nat.c. Don't include sys/param.h.
* windows-nat.c: Don't include sys/param.h.
* xtensa-linux-nat.c: Don't include sys/param.h.
* config/i386/nm-fbsd.h: Don't include sys/param.h.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* server.h: Include "pathmax.h".
* linux-low.c: Don't include sys/param.h.
(linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
MAXPATHLEN.
* win32-low.c: Don't include sys/param.h.
(win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.

11 years agoImport the "pathmax" gnulib module.
Pedro Alves [Mon, 1 Jul 2013 11:25:43 +0000 (11:25 +0000)]
Import the "pathmax" gnulib module.

This imports the "pathmax" gnulib module, making PATH_MAX always
available on systems that have the notion of a constant max path limit
(i.e., practically everywhere except the Hurd), along with fixing a
couple broken systems --- see pathmax.h in the patch.

This means we can normalize on PATH_MAX throughout the tree (instead
of some places using MAXPATHLEN, or defining fallback constants
ourselves).

This is the just the importing step.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add pathmax.
* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/pathmax.m4.
* gnulib/aclocal.m4: Regenerate.
* gnulib/config.in: Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/pathmax.h: New file.
* gnulib/import/Makefile.am: Regenerate.
* gnulib/import/Makefile.in: Regenerate.
* gnulib/import/m4/gnulib-cache.m4: Regenerate.
* gnulib/import/m4/gnulib-comp.m4: Regenerate.
* gnulib/import/m4/pathmax.m4: New file.

11 years agoReimplement DJGPP's .gdbinit -> gdb.ini renaming.
Pedro Alves [Mon, 1 Jul 2013 11:24:17 +0000 (11:24 +0000)]
Reimplement DJGPP's .gdbinit -> gdb.ini renaming.

This simplifies the .gdbinit filename selection logic.

We have a GDBINIT_FILENAME define that supposedly configurations would
override, but none do so.  Instead, the only configuration that wants
a different file name instead of ".gdbinit", djgpp, does a strcpy over
the gdbinit global array.  This means the array needs to be sized, and
the code that does that is doing the usual
'PATH_MAX/FILENAME_MAX/fallback constant/etc.' mess.

Instead of all that, it's much simpler to have configure specificy the
.gdbinit filename.  As bonus, we can then make the "gdbinit" global
array const.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* configure.ac (GDBINIT): Define, depending on host.
* go32-nat.c (init_go32_ops): Don't override gdbinit here.
* top.c (PATH_MAX): Delete fallback definition.
(GDBINIT_FILENAME): Delete.
(gdbinit): Reimplement as const char array set to the GDBINIT
string constant.
* top.h (gdbinit): Make const.

11 years agoConstify main.c:get_init_files.
Pedro Alves [Mon, 1 Jul 2013 11:22:12 +0000 (11:22 +0000)]
Constify main.c:get_init_files.

A following patch will want to make the "gdbinit" global array const.
As usual, that forces in a cascading series of const additions.  This
patch preemptively does those.  I went all the way up to constifying
catch_command_errors, but then that would require constifying
execute_command as well (which is a much more significant effort).  So
as stop point, I found the cleanest would be to add a variant of
catch_command_errors that takes const args, and use that in the few
spots that needed it due to the the get_init_files constification.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* cli/cli-cmds.c (source_script): Make 'file' parameter const.
* cli/cli-cmds.h (source_script): Likewise.
* exceptions.c (catch_command_errors_const): New function.
* exceptions.h (catch_command_errors_const): Declare.
* main.c (get_init_files): Make parameters const, and adjust.
(captured_main): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const.  Adjust to use
catch_command_errors_const.
(print_gdb_help): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const.

11 years agoRely on gnulib's unistd.h replacement.
Pedro Alves [Mon, 1 Jul 2013 11:19:27 +0000 (11:19 +0000)]
Rely on gnulib's unistd.h replacement.

With gnulib's unistd module, we can assume unistd.h is always present, and that
STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO are always defined.

Don't remove unistd.h from GDB's configure.ac, as later tests in the
file use HAVE_UNISTD_H checks.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* defs.h: Don't check HAVE_UNISTD_H before including <unistd.h>.
(STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete.
* tracepoint.c: Don't check HAVE_UNISTD_H before including
<unistd.h>.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* event-loop.c: Don't check HAVE_UNISTD_H before including
<unistd.h>.
* gdbreplay.c: Likewise.
* remote-utils.c: Likewise.
* server.c: Likewise.
* configure.ac: Don't check for unistd.h.
* configure: Regenerate.

11 years agoImport the "unistd" gnulib module.
Pedro Alves [Mon, 1 Jul 2013 11:18:09 +0000 (11:18 +0000)]
Import the "unistd" gnulib module.

I wanted to import the pathmax module, and that pulls in the unistd
module as dependency.  The unistd module is actually bigger than the
pathmax module.  If we're going to end up with it, might as well
import it explicitly, and make use of it throughout.

The "unistd" module makes a GNU-like <unistd.h> always available.
This means we no longer need to do:

 +#ifdef HAVE_UNISTD_H
  #include <unistd.h>
 +#endif

and we can remove a few constants from defs.h.

This is just the importing step.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

Import the "unistd" gnulib module.
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add "unistd".
* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/off_t.m4,
import/m4/ssize_t.m4, import/m4/sys_types_h.m4 and
import/m4/unistd_h.m4.
* gnulib/aclocal.m4: Renenerate.
* gnulib/config.in: Renenerate.
* gnulib/configure: Renenerate.
* gnulib/import/Makefile.am: Renenerate.
* gnulib/import/Makefile.in: Renenerate.
* gnulib/import/m4/gnulib-cache.m4: Renenerate.
* gnulib/import/m4/gnulib-comp.m4: Renenerate.
* gnulib/import/m4/off_t.m4: New file.
* gnulib/import/m4/ssize_t.m4: New file.
* gnulib/import/m4/sys_types_h.m4: New file.
* gnulib/import/m4/unistd_h.m4: New file.
* gnulib/import/sys_types.in.h: New file.
* gnulib/import/unistd.c: New file.
* gnulib/import/unistd.in.h: New file.

11 years agoutils.c: pathconf call, check for _PC_PATH_MAX instead of HAVE_UNISTD_H.
Pedro Alves [Mon, 1 Jul 2013 11:15:39 +0000 (11:15 +0000)]
utils.c: pathconf call, check for _PC_PATH_MAX instead of HAVE_UNISTD_H.

This check in utils.c for HAVE_UNISTD_H is being used as proxy for
"HAVE_PATHCONF", as pathconf is supposed to be declared in unistd.h.

It's possible that there are systems out there that have realpath,
unistd.h and alloca, but not pathconf+_PC_PATH_MAX.  I don't know of
any by heart, but if we import gnulib's unistd module (which a
following patch will do), then unistd.h ends up always available, so
the check ends up incorrect.  As pathconf is being called with
_PC_PATH_MAX, check for that instead.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* utils.c <pathconf/_PC_PATH_MAX use>: Check if _PC_PATH_MAX is
defined instead of checking HAVE_UNISTD_H.

11 years agoReimport gnulib from scratch.
Pedro Alves [Mon, 1 Jul 2013 11:14:42 +0000 (11:14 +0000)]
Reimport gnulib from scratch.

Moving aside gnulib/import/, and re-running our
gnulib/update-gnulib.sh script, surprisingly, one gets a different
result compared to what's in the tree.  This is with pristine FSF
autoconf and FSF automake, at the versions required by
update-gnulib.sh.  However, if one just runs the update-gnulib.sh
scripts against the _existing_ tree, then nothing changes...  I
suspect gnulib-tool's merge logic might be preserving some things by
design.  This gets rid of cruft that might have accumulated over
gnulib updates.  onceonly.m4 seems to fit in that category.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

Reimport gnulib from scratch.
* gnulib/Makefile.in (aclocal_m4_deps): Remove reference to
import/m4/onceonly.m4.
* gnulib/aclocal.m4: Renegerate.
* gnulib/config.in: Renegerate.
* gnulib/configure: Renegerate.
* gnulib/import/Makefile.in: Renegerate.
* gnulib/import/extra/update-copyright: Renegerate.
* gnulib/import/m4/onceonly.m4: Delete.

11 years agoDelete pagination_enabled extern declaration in tui/tui-regs.c.
Pedro Alves [Mon, 1 Jul 2013 10:09:27 +0000 (10:09 +0000)]
Delete pagination_enabled extern declaration in tui/tui-regs.c.

It's declared in utils.h.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* tui/tui-regs.c (pagination_enabled): Delete declaration.

11 years agobfd/
Alan Modra [Mon, 1 Jul 2013 03:45:05 +0000 (03:45 +0000)]
bfd/
* elf64-ppc.h (ppc64_elf_toc): Delete.
(ppc64_elf_set_toc): Declare.
* elf64-ppc.c (ppc64_elf_toc_reloc): Replace call to ppc64_elf_toc
with call the ppc64_elf_set_toc.
(ppc64_elf_toc_ha_reloc, ppc64_elf_toc64_reloc): Likewise.
(ppc64_elf_start_multitoc_partition): Likewise.
(struct ppc_link_hash_table): Delete dot_toc_dot.  Replace all uses
with elf.hgot.
(ppc64_elf_process_dot_syms): Don't make a fake function descriptor
for ".TOC.".
(ppc64_elf_check_relocs): Mark sections with a reference to .TOC.
as needing a toc pointer.
(ppc64_elf_size_stubs): Don't set dot_toc_dot here.
(ppc64_elf_set_toc): Rename from ppc64_elf_toc.  Add info param.
Set elf.hgot value.
ld/
* emultempl/ppc64elf.em: (ppc_layout_sections_again): Call
ppc64_elf_set_toc rather than ppc64_elf_toc/_bfd_set_gp_value.
(gld${EMULATION_NAME}_after_allocation): Likewise.

11 years agodaily update
Alan Modra [Mon, 1 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/
Jan Kratochvil [Sun, 30 Jun 2013 17:14:59 +0000 (17:14 +0000)]
gdb/
Code cleanup.
* remote.c (async_remote_interrupt_twice): Make it static.
* remote.h (async_remote_interrupt_twice): Remove the declaration.

11 years agoThis patch implements the support for SystemTap SDT probes on IA-64.
Sergio Durigan Junior [Sun, 30 Jun 2013 00:35:39 +0000 (00:35 +0000)]
This patch implements the support for SystemTap SDT probes on IA-64.

Joel Brobecker reported a bug which was happening because of the
"Improved linker-debugger interface", by Gary Benson, when tested on
IA-64 with rhES5.  The message is:

<http://sourceware.org/ml/gdb-patches/2013-06/msg00745.html>

The failure happened because GDB was trying to parse the probes'
operands using only the generic parser (implemented on stap-probe.c),
because the arch-specific parser was not implemented.  Thus, I am
committing the following changes which solve the bug.

2013-06-29  Sergio Durigan Junior  <sergiodj@redhat.com>

* ia64-linux-tdep.c: Include <ctype.h>.
(ia64_linux_stap_is_single_operand): New function.
(ia64_linux_init_abi): Initialize SystemTap related attributes.

11 years agodaily update
Alan Modra [Sun, 30 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sat, 29 Jun 2013 00:00:03 +0000 (00:00 +0000)]
daily update

11 years agomove version.in from gdb/common back to gdb
Tom Tromey [Fri, 28 Jun 2013 18:59:51 +0000 (18:59 +0000)]
move version.in from gdb/common back to gdb

This reverts part of the earlier version.in change.  It moves
version.in back to the gdb directory.  This works around the CVS bug
we've found.

gdb
* Makefile.in (version.c): Use version.in, not
common/version.in.
* common/create-version.sh: Likewise.
* common/version.in: Move...
* version.in: ...here.
gdb/doc
* Makefile.in (version.subst): Use version.in, not
common/version.in.
* gdbint.texinfo (Versions and Branches, Releasing GDB):
Likewise.
gdb/gdbserver
* Makefile.in (version.c): Use version.in, not
common/version.in.
sim/common
* Make-common.in (version.c): Use version.in, not
common/version.in.
* create-version.sh: Likewise.
sim/ppc:
* Make-common.in (version.c): Use version.in, not
common/version.in.

11 years agoMove pagination_enabled declaration to a proper place.
Pedro Alves [Fri, 28 Jun 2013 17:19:39 +0000 (17:19 +0000)]
Move pagination_enabled declaration to a proper place.

Declare it close to other related declarations in utils.h, and remove
local extern declaration hack.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

* infrun.c (set_observer_mode): Don't declare pagination_enabled
here.
* utils.h (pagination_enabled): Declare.

11 years agoinfrun.c: Move non_stop_1 etc., higher up in file.
Pedro Alves [Fri, 28 Jun 2013 17:06:14 +0000 (17:06 +0000)]
infrun.c: Move non_stop_1 etc., higher up in file.

The "non_stop_1" global is out of place, mixed with the observer bits.
This moves all the non-stop user-interface-related bits together.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

* infrun.c (non_stop, non_stop_1, set_non_stop, show_non_stop):
Move higher up in file.

11 years agoHandle R_X86_64_DTPOFF64
H.J. Lu [Fri, 28 Jun 2013 15:07:55 +0000 (15:07 +0000)]
Handle R_X86_64_DTPOFF64

bfd/

PR ld/15685
* elf64-x86-64.c (elf_x86_64_relocate_section): Handle
R_X86_64_DTPOFF64.

ld/testsuite/

PR ld/15685
* ld-x86-64/tlsg.s: Add a test for R_X86_64_DTPOFF64.
* ld-x86-64/tlsg.sd: Updated.

11 years ago * tracepoint.c (deprecated_readline_begin_hook)
Tom Tromey [Fri, 28 Jun 2013 14:23:11 +0000 (14:23 +0000)]
* tracepoint.c (deprecated_readline_begin_hook)
(deprecated_readline_hook, deprecated_readline_end_hook): Don't
declare.

11 years ago[PR tui/14880] Fetch values before comparing their contents.
Pedro Alves [Fri, 28 Jun 2013 12:36:48 +0000 (12:36 +0000)]
[PR tui/14880] Fetch values before comparing their contents.

PR tui/14880 shows a reproducer that triggers this assertion:

  int
  value_available_contents_eq (const struct value *val1, int offset1,
        const struct value *val2, int offset2,
        int length)
  {
    int idx1 = 0, idx2 = 0;

    /* This routine is used by printing routines, where we should
       already have read the value.  Note that we only know whether a
       value chunk is available if we've tried to read it.  */
    gdb_assert (!val1->lazy && !val2->lazy);

(top-gdb) bt
#0  internal_error (file=0x88a26c "../../src/gdb/value.c", line=549, string=0x88a220 "%s: Assertion `%s' failed.") at ../../src/gdb/utils.c:844
#1  0x000000000057b9cd in value_available_contents_eq (val1=0x10fa900, offset1=0, val2=0x10f9e10, offset2=0, length=8) at ../../src/gdb/value.c:549
#2  0x00000000004fd756 in tui_get_register (frame=0xd5c430, data=0x109a548, regnum=0, changedp=0x109a560) at ../../src/gdb/tui/tui-regs.c:736
#3  0x00000000004fd111 in tui_check_register_values (frame=0xd5c430) at ../../src/gdb/tui/tui-regs.c:521
#4  0x0000000000501884 in tui_check_data_values (frame=0xd5c430) at ../../src/gdb/tui/tui-windata.c:234
#5  0x00000000004f976f in tui_selected_frame_level_changed_hook (level=1) at ../../src/gdb/tui/tui-hooks.c:222
#6  0x00000000006f0681 in select_frame (fi=0xd5c430) at ../../src/gdb/frame.c:1490
#7  0x00000000005dd94b in up_silently_base (count_exp=0x0) at ../../src/gdb/stack.c:2268
#8  0x00000000005dd985 in up_command (count_exp=0x0, from_tty=1) at ../../src/gdb/stack.c:2280
#9  0x00000000004dc5cf in do_cfunc (c=0xd3f720, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:113
#10 0x00000000004df664 in cmd_func (cmd=0xd3f720, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:1888
#11 0x00000000006e43e1 in execute_command (p=0xc7e6c2 "", from_tty=1) at ../../src/gdb/top.c:489

The fix is to fetch the value before comparing the contents.  The
comment additions to value.h explain why it can't be
value_available_contents_eq itself that fetches the contents.

Tested on x86_64 Fedora 17.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

PR tui/14880
* tui/tui-regs.c (tui_get_register): Fetch register value contents
before checking whether they're available.
* value.c (value_available_contents_eq): Change comment.
* value.h (value_available_contents_eq): Expand comment.

11 years agogdbserver: fix the standalone build
Mircea Gherzan [Fri, 28 Jun 2013 12:29:15 +0000 (12:29 +0000)]
gdbserver: fix the standalone build

When directly invoking gdb/gdbserver/configure && make, the build will
fail because the $(host_alias) is empty and thus create-version.sh does
not get enough parameters.

The output of gdbserver --version without this patch (built like above):

  [...]
  This gdbserver was configured as ""

After applying this patch:

  [...]
  This gdbserver was configured as "x86_64-unknown-linux-gnu"

2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver:

* configure.ac (version_host, version_target): Set and AC_SUBST
them.
* configure: Rebuild.
* Makefile.in (version_host, version_target): Get from
configure.
(version.c): Use $(version_host) and $(version_target).

Change-Id: Id48240532ad3d624ec78867a6db5ebd4c09583ff
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years ago PR ld/15302
Nick Clifton [Fri, 28 Jun 2013 12:22:42 +0000 (12:22 +0000)]
PR ld/15302
* elf32-arm.c (allocate_dynrelocs_for_symbol): Revert previous patch.

11 years ago* rx.c (SHIFT_OP): A shift by zero still sets the condition codes.
Nick Clifton [Fri, 28 Jun 2013 07:19:44 +0000 (07:19 +0000)]
* rx.c (SHIFT_OP): A shift by zero still sets the condition codes.

11 years agodaily update
Alan Modra [Fri, 28 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago PR gold/15662
Cary Coutant [Thu, 27 Jun 2013 23:20:35 +0000 (23:20 +0000)]
PR gold/15662
* powerpc.cc (Output_data_brlt_powerpc::reset_brlt_sizes): New
function.
(Output_data_brlt_powerpc::finalize_brlt_sizes): New function.
(Target_powerpc::do_relax): Call the above.

11 years ago * target.c (find_run_target): Remove.
Tom Tromey [Thu, 27 Jun 2013 19:52:41 +0000 (19:52 +0000)]
* target.c (find_run_target): Remove.
* target.h (find_run_target): Remove.

11 years ago * corelow.c (core_gdbarch): Now static.
Tom Tromey [Thu, 27 Jun 2013 19:38:55 +0000 (19:38 +0000)]
* corelow.c (core_gdbarch): Now static.

11 years ago * target.c (target_struct_index): Remove.
Tom Tromey [Thu, 27 Jun 2013 19:38:24 +0000 (19:38 +0000)]
* target.c (target_struct_index): Remove.

11 years agoMove comment on the 'stepping over resolver' mechanism to the internals manual.
Pedro Alves [Thu, 27 Jun 2013 19:17:27 +0000 (19:17 +0000)]
Move comment on the 'stepping over resolver' mechanism to the internals manual.

This whole comment is now a bit out of place.  I looked into moving it
to handle_inferior_event, close to where in_solib_dynsym_resolve_code
is used, but then there are 3 such places.  I then looked at
fragmenting it, pushing bits closer to the definitions of
in_solib_dynsym_resolve_code and gdbarch_skip_solib_resolver, but then
we'd lose the main advantage which is the overview.  In the end, I
realized this can fit nicely as internals manual material.

This could possibly be a subsection of a new "run control", or "source
stepping" or "stepping" or some such a bit more general section, but
we can do that when we have more related content...  Even the "single
stepping" section is presently empty...

gdb/doc/
2013-06-27  Pedro Alves  <palves@redhat.com>

* gdbint.texinfo (Algorithms) <Stepping over runtime loader
dynamic symbol resolution code>: New section, based on infrun.c
comment.

gdb/
2013-06-27  Pedro Alves  <palves@redhat.com>

* infrun.c: Remove comment describing the 'stepping over runtime
loader dynamic symbol resolution code' mechanism; moved to
gdbint.texinfo.

11 years agoFix up broken ChangeLog entries.
Tom Tromey [Thu, 27 Jun 2013 19:04:28 +0000 (19:04 +0000)]
Fix up broken ChangeLog entries.

In some previous commits I forgot to prefix the file names with
"gdb.base".  This fixes the ChangeLog entries to be correct.

11 years agotest suite update - gdb.base/[t-z]
Tom Tromey [Thu, 27 Jun 2013 19:00:47 +0000 (19:00 +0000)]
test suite update - gdb.base/[t-z]

Convert files gdb.base/[t-z]*.exp to use standard_output_file et al.

* gdb.base/testenv.exp, gdb.base/tui-layout.exp,
gdb.base/twice.exp, gdb.base/type-opaque.exp, gdb.base/unload.exp,
gdb.base/unwindonsignal.exp, gdb.base/valgrind-db-attach.exp,
gdb.base/valgrind-infcall.exp, gdb.base/value-double-free.exp,
gdb.base/varargs.exp, gdb.base/watch-cond-infcall.exp,
gdb.base/watch-cond.exp, gdb.base/watch-non-mem.exp,
gdb.base/watch-read.exp, gdb.base/watch-vfork.exp,
gdb.base/watch_thread_num.exp, gdb.base/watchpoint-cond-gone.exp,
gdb.base/watchpoint-delete.exp, gdb.base/watchpoint-hw.exp,
gdb.base/watchpoint-solib.exp, gdb.base/watchpoint.exp,
gdb.base/watchpoints.exp, gdb.base/wchar.exp, gdb.base/whatis.exp:
Use standard_testfile, standard_output_file, prepare_for_testing,
clean_restart.

11 years agotest suite update - gdb.base/s*
Tom Tromey [Thu, 27 Jun 2013 18:58:28 +0000 (18:58 +0000)]
test suite update - gdb.base/s*

Convert files gdb.base/s*.exp to use standard_output_file et al.

* gdb.base/save-bp.exp, gdb.base/savedregs.exp,
gdb.base/scope.exp, gdb.base/sep.exp, gdb.base/sepsymtab.exp,
gdb.base/set-lang-auto.exp, gdb.base/setshow.exp,
gdb.base/setvar.exp, gdb.base/shlib-call.exp,
gdb.base/shreloc.exp, gdb.base/sigall.exp,
gdb.base/sigaltstack.exp, gdb.base/sigbpt.exp,
gdb.base/sigchld.exp, gdb.base/siginfo-addr.exp,
gdb.base/siginfo-infcall.exp, gdb.base/siginfo-obj.exp,
gdb.base/siginfo.exp, gdb.base/signals.exp, gdb.base/signest.exp,
gdb.base/signull.exp, gdb.base/sigrepeat.exp,
gdb.base/sigstep.exp, gdb.base/sizeof.exp,
gdb.base/skip-solib.exp, gdb.base/so-impl-ld.exp,
gdb.base/solib-display.exp, gdb.base/solib-nodir.exp,
gdb.base/solib-overlap.exp, gdb.base/solib-symbol.exp,
gdb.base/solib-weak.exp, gdb.base/source.exp,
gdb.base/stack-checking.exp, gdb.base/stale-infcall.exp,
gdb.base/stap-probe.exp, gdb.base/start.exp,
gdb.base/step-break.exp, gdb.base/step-bt.exp,
gdb.base/step-line.exp, gdb.base/step-resume-infcall.exp,
gdb.base/step-test.exp, gdb.base/structs.exp,
gdb.base/structs2.exp, gdb.base/structs3.exp,
gdb.base/symbol-without-target_section.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.

11 years agotest suite update - gdb.base/[n-r]
Tom Tromey [Thu, 27 Jun 2013 18:53:49 +0000 (18:53 +0000)]
test suite update - gdb.base/[n-r]

Convert files gdb.base/[n-r]*.exp to use standard_output_file et al.

* gdb.base/nextoverexit.exp, gdb.base/nextoverexit.exp,
gdb.base/nodebug.exp, gdb.base/nofield.exp, gdb.base/nostdlib.exp,
gdb.base/opaque.exp, gdb.base/overlays.exp, gdb.base/pc-fp.exp,
gdb.base/pending.exp, gdb.base/permissions.exp,
gdb.base/pie-execl.exp, gdb.base/pointers.exp,
gdb.base/pr11022.exp, gdb.base/print-file-var.exp,
gdb.base/printcmds.exp, gdb.base/prologue.exp,
gdb.base/psymtab.exp, gdb.base/ptr-typedef.exp,
gdb.base/ptype.exp, gdb.base/randomize.exp,
gdb.base/readline-ask.exp, gdb.base/recpar.exp,
gdb.base/recurse.exp, gdb.base/relativedebug.exp,
gdb.base/relocate.exp, gdb.base/remote.exp, gdb.base/reread.exp,
gdb.base/return-nodebug.exp, gdb.base/return2.exp: Use
standard_testfile, standard_output_file, prepare_for_testing,
clean_restart.

11 years agotest suite update - gdb.base/[h-m]
Tom Tromey [Thu, 27 Jun 2013 18:51:31 +0000 (18:51 +0000)]
test suite update - gdb.base/[h-m]

Convert files gdb.base/[h-m]*.exp to use standard_output_file et al.

* hook-stop-continue.exp, hook-stop-frame.exp, huge.exp,
included.exp, inferior-died.exp, infnan.exp, info-fun.exp,
info-macros.exp, info-os.exp, info-proc.exp, info-target.exp,
infoline.exp, interp.exp, interrupt.exp, jit-simple.exp,
jit-so.exp, jump.exp, kill-after-signal.exp, label.exp, langs.exp,
lineinc.exp, list.exp, logical.exp, long_long.exp, longjmp.exp,
macscp.exp, maint.exp, memattr.exp, mips_pro.exp, miscexprs.exp,
morestack.exp, moribund-step.exp, multi-forks.exp: Use
standard_testfile, standard_output_file, prepare_for_testing,
clean_restart.

11 years agotest suite update - gdb.base/[efg]
Tom Tromey [Thu, 27 Jun 2013 18:50:30 +0000 (18:50 +0000)]
test suite update - gdb.base/[efg]

Convert files gdb.base/[efg]*.exp to use standard_output_file et al.

* ena-dis-br.exp, enum_cond.exp, enumval.exp, environ.exp,
eu-strip-infcall.exp, eval-skip.exp, exe-lock.exp,
expand-psymtabs.exp, exprs.exp, fileio.exp, find.exp,
fixsection.exp, foll-exec.exp, foll-fork.exp,
fortran-sym-case.exp, frame-args.exp, freebpcmd.exp, fullname.exp,
funcargs.exp, gcore-buffer-overflow.exp, gcore.exp, gdb1090.exp,
gdb11530.exp, gdb11531.exp, gdb1250.exp, gdb1555.exp, gdb1821.exp,
gdbindex-stabs.exp, gdbvars.exp, gnu-ifunc.exp, gnu_vector.exp:
Use standard_testfile, standard_output_file, prepare_for_testing,
clean_restart.

11 years agotest suite update - gdb.base/[cd]
Tom Tromey [Thu, 27 Jun 2013 18:49:03 +0000 (18:49 +0000)]
test suite update - gdb.base/[cd]

Convert files gdb.base/[cd]*.exp to use standard_output_file et al.

* call-ar-st.exp, call-rt-st.exp, call-sc.exp,
call-signal-resume.exp, call-strs.exp, callexit.exp,
callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
commands.exp, completion.exp, complex.exp, cond-expr.exp,
condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.

11 years agotest suite update - gdb.base/[ab]
Tom Tromey [Thu, 27 Jun 2013 18:47:53 +0000 (18:47 +0000)]
test suite update - gdb.base/[ab]

Convert files gdb.base/[ab]*.exp to use standard_output_file et al.

* a2-run.exp, all-bin.exp, annota1.exp, annota3.exp, anon.exp,
args.exp, arithmet.exp, arrayidx.exp, assign.exp, async-shell.exp,
async.exp, attach-pie-misread.exp, attach-pie-noexec.exp,
attach-twice.exp, attach.exp, auxv.exp, bang.exp, bfp-test.exp,
bigcore.exp, bitfields.exp, bitfields2.exp, break-entry.exp,
break-interp.exp, break-on-linker-gcd-function.exp,
breakpoint-shadow.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.

11 years agoFix catch_command_errors's prototype.
Pedro Alves [Thu, 27 Jun 2013 17:53:40 +0000 (17:53 +0000)]
Fix catch_command_errors's prototype.

gdb/
2013-06-27  Pedro Alves  <palves@redhat.com>

* exceptions.c (catch_command_errors): Remove spurious space.
* exceptions.h (catch_command_errors): Second parameter is "arg",
not "command".

11 years ago[AArch64] Fix the placement of &_DYNAMIC in the GOT.
Marcus Shawcroft [Thu, 27 Jun 2013 15:47:55 +0000 (15:47 +0000)]
[AArch64] Fix the placement of &_DYNAMIC in the GOT.

11 years ago * powerpc.cc (Target_powerpc::symval_for_branch): Don't assert
Alan Modra [Thu, 27 Jun 2013 03:11:22 +0000 (03:11 +0000)]
* powerpc.cc (Target_powerpc::symval_for_branch): Don't assert
on garbage collected .opd section.

* powerpc.cc (Target_powerpc::do_gc_add_reference): Test dst_shndx
is non-zero.
(Target_powerpc::do_gc_mark_symbols): Likewise for sym->shndx().
(Target_powerpc::do_function_location): Likewise for loc->shndx.

11 years agogdb/
Yao Qi [Thu, 27 Jun 2013 00:12:13 +0000 (00:12 +0000)]
gdb/

* common/create-version.sh: Update comments.  Handle the case
that TARGET_ALIAS is empty.

11 years agodaily update
Alan Modra [Thu, 27 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoGarbage collect SOLIB_IN_DYNAMIC_LINKER.
Pedro Alves [Wed, 26 Jun 2013 21:38:23 +0000 (21:38 +0000)]
Garbage collect SOLIB_IN_DYNAMIC_LINKER.

This hasn't been used for years.

gdb/
2013-06-26  Pedro Alves  <palves@redhat.com>

* infrun.c (SOLIB_IN_DYNAMIC_LINKER): Delete macro and describing
comment.

11 years agoUpdate comments on stepping over resolver code.
Pedro Alves [Wed, 26 Jun 2013 21:37:53 +0000 (21:37 +0000)]
Update comments on stepping over resolver code.

This updates the comments on the step-over-resolver mechanism a bit,
adjusting it to refer to the gdbarch hooks instead of the old macros;
to mention the in_dynsym_resolve_code hook of the target_so_ops
vector; and to American English spelling (signalling->signaling).

gdb/
2013-06-26  Pedro Alves  <palves@redhat.com>

* infrun.c: Update comments on stepping over runtime loader
dynamic symbol resolution code.

11 years agoI found this issue when I was debugging something else on IA-64. Both
Sergio Durigan Junior [Wed, 26 Jun 2013 17:22:52 +0000 (17:22 +0000)]
I found this issue when I was debugging something else on IA-64.  Both
ax-gdb.h and parser-defs.h could be made more self-contained by forward
declaring types or including the necessary header files.  This commit does
this.

2013-06-26  Sergio Durigan Junior  <sergiodj@redhat.com>

* ax-gdb.h (union exp_element): Forward declare.
* parser-defs.h: Include expression.h.

11 years ago * gdbint.texinfo (Versions and Branches): Use common/version.in.
Tom Tromey [Wed, 26 Jun 2013 16:04:05 +0000 (16:04 +0000)]
* gdbint.texinfo (Versions and Branches): Use common/version.in.
Update.

11 years ago * Makefile.in (dtbdir): Don't use gdb's version.in.
Tom Tromey [Wed, 26 Jun 2013 15:55:59 +0000 (15:55 +0000)]
* Makefile.in (dtbdir): Don't use gdb's version.in.

11 years ago * mips-tdep.c (fetch_mips_16): Use unmake_compact_addr.
Maciej W. Rozycki [Wed, 26 Jun 2013 15:37:49 +0000 (15:37 +0000)]
* mips-tdep.c (fetch_mips_16): Use unmake_compact_addr.

11 years ago Fix trace status to output username without trailing colon.
Dmitry Kozlov [Wed, 26 Jun 2013 15:24:10 +0000 (15:24 +0000)]
Fix trace status to output username without trailing colon.

11 years ago Extend tsave to save starttime, stoptime.
Dmitry Kozlov [Wed, 26 Jun 2013 15:17:59 +0000 (15:17 +0000)]
Extend tsave to save starttime, stoptime.

11 years ago Fix trace-status to output proper start-time and stop-time.
Dmitry Kozlov [Wed, 26 Jun 2013 15:14:39 +0000 (15:14 +0000)]
Fix trace-status to output proper start-time and stop-time.

11 years ago * mips-tdep.c (mips_next_pc): Fix a typo.
Maciej W. Rozycki [Wed, 26 Jun 2013 15:10:33 +0000 (15:10 +0000)]
* mips-tdep.c (mips_next_pc): Fix a typo.

11 years ago * mips-tdep.c (micromips_scan_prologue): Fix a typo.
Maciej W. Rozycki [Wed, 26 Jun 2013 15:00:10 +0000 (15:00 +0000)]
* mips-tdep.c (micromips_scan_prologue): Fix a typo.

11 years ago * doc/as.texinfo (Overview): Remove @samp from MIPS ISA names.
Maciej W. Rozycki [Wed, 26 Jun 2013 12:15:43 +0000 (12:15 +0000)]
* doc/as.texinfo (Overview): Remove @samp from MIPS ISA names.
* doc/c-mips.texi (MIPS Options): Remove @sc from MIPS ISA names.
Replace @sc{mips16} with literal `MIPS16'.
(MIPS ISA): Replace @sc{mips3} with literal `MIPS III'.

11 years ago[AArch64, ILP32] Really add ld/emulparams/aarch64elf32.sh that was missed
Yufeng Zhang [Wed, 26 Jun 2013 10:59:17 +0000 (10:59 +0000)]
[AArch64, ILP32] Really add ld/emulparams/aarch64elf32.sh that was missed
from the previous commit

ld/

* emulparams/aarch64elf32.sh: New file.

11 years ago[AArch64, ILP32] 6/6 Add big-endian targets
Yufeng Zhang [Wed, 26 Jun 2013 10:56:05 +0000 (10:56 +0000)]
[AArch64, ILP32] 6/6 Add big-endian targets

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32b.c.
(eaarch64elf32b.c): New dependency and rule.
* Makefile.in: Re-generated.
* configure.tgt (aarch64-*-elf): Add aarch64elf32b.
(aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise.
* emulparams/aarch64elf32b.sh: New file.

11 years ago[AArch64, ILP32] 5/6 Improve the debugging experience with the generated file
Yufeng Zhang [Wed, 26 Jun 2013 10:52:12 +0000 (10:52 +0000)]
[AArch64, ILP32] 5/6 Improve the debugging experience with the generated file

bfd/

* Makefile.am (elf32-aarch64.c): Add a #line cpp directive at the
beginning of the generated file.
(elf64-aarch64.c): Likewise.
* Makefile.in: Re-generated.

11 years ago[AArch64, ILP32] 4/6 Split elfnn-aarch64.c to elfxx-aarch64.c
Yufeng Zhang [Wed, 26 Jun 2013 10:49:29 +0000 (10:49 +0000)]
[AArch64, ILP32] 4/6 Split elfnn-aarch64.c to elfxx-aarch64.c

bfd/

* Makefile.am (BFD64_BACKENDS): Add elfxx-aarch64.c.
(BFD64_BACKENDS_CFILES): Add elfxx-aarch64.lo.
* Makefile.in: Re-generated.
* configure.in (bfd_elf64_bigaarch64_vec): Add elfxx-aarch64.lo.
(bfd_elf64_littleaarch64_vec): Likewise.
(bfd_elf32_bigaarch64_vec): Likewise.
(bfd_elf32_littleaarch64_vec): Likewise.
* configure: Re-generated.
* elfxx-aarch64.c: New file; split from elf64-aarch64.c.
* elfxx-aarch64.h: New file.
* elfnn-aarch64.c: Include "elfxx-aarch64.h"; move the following
stuff to elfxx-aarch64.c.
(bfd_elf_aarch64_put_addend): Removed.
(PG_OFFSET, PG): Likewise.
(elfNN_aarch64_small_plt0_entry): Support ELF32.
(elfNN_aarch64_tlsdesc_small_plt_entry): Likewise.
(elf64_aarch64_grok_prstatus): Removed.
(elf_backend_grok_prstatus): Removed.
(insn32): Likewise.
(aarch64_unsigned_overflow): Likewise.
(aarch64_signed_overflow): Likewise.
(aarch64_resolve_relocation): Likewise.
(MASK): Likewise.
(decode_branch_ofs_26): Likewise.
(decode_cond_branch_ofs_19): Likewise.
(decode_ld_lit_ofs_19): Likewise.
(decode_tst_branch_ofs_14): Likewise.
(decode_movw_imm): Likewise.
(decode_adr_imm): Likewise.
(decode_add_imm): Likewise.
(reencode_branch_ofs_26): Likewise.
(reencode_cond_branch_ofs_19): Likewise.
(reencode_ld_lit_ofs_19): Likewise.
(reencode_tst_branch_ofs_14): Likewise.
(reencode_movw_imm): Likewise.
(reencode_adr_imm): Likewise.
(reencode_ldst_pos_imm): Likewise.
(reencode_add_imm): Likewise.
(reencode_movzn_to_movz): Likewise.
(reencode_movzn_to_movn): Likewise.
(aarch64_relocate): Update to call the new function names in
elfxx-aarch64.c.
(aarch64_calculate_got_entry_vma): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elf64_aarch64_update_plt_entry): Likewise; change the type of the
parameter 'r_type' to bfd_reloc_code_real_type; rename to ...
(elf_aarch64_update_plt_entry): ... this.
(elfNN_aarch64_create_small_pltn_entry): Update.
(elfNN_aarch64_init_small_plt0_entry): Remove plt_got_base; add
bfd_vma plt_got_2nd_ent; update to call elf_aarch64_update_plt_entry.
(elfNN_aarch64_finish_dynamic_sections): Add plt_entry; update to
call elf_aarch64_update_plt_entry.

11 years ago[AArch64, ILP32] 3/6 Support for ELF32 relocs and refactor reloc handling
Yufeng Zhang [Wed, 26 Jun 2013 10:47:06 +0000 (10:47 +0000)]
[AArch64, ILP32] 3/6 Support for ELF32 relocs and refactor reloc handling

bfd/

* bfd-in2.h: Re-generated.
* elfnn-aarch64.c (HOWTO64, HOWTO32): New define.
(IS_AARCH64_TLS_RELOC): Change to be based on the
bfd reloc enumerators.
(IS_AARCH64_TLSDESC_RELOC): Likewise.
(PG, PG_OFFSET): Cast literal to bfd_vma.
(elf64_aarch64_howto_table): Removed.
(elf64_aarch64_howto_dynrelocs): Removed.
(elf64_aarch64_tls_howto_table): Removed.
(elf64_aarch64_tlsdesc_howto_table): Removed.
(elfNN_aarch64_howto_table): New table to host all howto entires..
(R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*).
(elfNN_aarch64_bfd_reloc_from_howto): New function.
(elfNN_aarch64_bfd_reloc_from_type): Ditto.
(struct elf_aarch64_reloc_map): New.
(elf_aarch64_reloc_map): New table.
(elfNN_aarch64_howto_from_bfd_reloc): New function.
(elfNN_aarch64_howto_from_type): Update to look up the new table
elfNN_aarch64_howto_table.
(struct elf64_aarch64_reloc_map): Remove.
(elf64_aarch64_reloc_map): Remove.
(elfNN_aarch64_reloc_type_lookup): Change to call
elfNN_aarch64_howto_from_bfd_reloc.
(elfNN_aarch64_reloc_name_lookup): Change to look up the new table
elfNN_aarch64_howto_table.
(aarch64_resolve_relocation): Refactor to switch on the bfd
reloc enumerators.
(bfd_elf_aarch64_put_addend): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(aarch64_tls_transition_without_check): Likewise.
(aarch64_reloc_got_type): Likewise.
(aarch64_can_relax_tls): Likewise.
(aarch64_tls_transition): Likewise.
(elfNN_aarch64_tls_relax): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
(aarch64_tls_transition): Change to return a bfd reloc enumerator.
* libbfd.h: Re-generated.
* reloc.c: Re-order the AArch64 bfd reloc enumerators.
(BFD_RELOC_AARCH64_RELOC_START)
(BFD_RELOC_AARCH64_RELOC_END)
(BFD_RELOC_AARCH64_LD_GOT_LO12_NC)
(BFD_RELOC_AARCH64_LD32_GOT_LO12_NC)
(BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC)
(BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC)
(BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC)
(BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC)
(BFD_RELOC_AARCH64_IRELATIVE): New relocs.

gas/

* config/tc-aarch64.c (reloc_table): Replace
BFD_RELOC_AARCH64_LD64_GOT_LO12_NC with
BFD_RELOC_AARCH64_LD_GOT_LO12_NC; likewise to
BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC and
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC.
(md_apply_fix): Handle BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC and
BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC.
(aarch64_force_relocation): Likewise.

gas/testsuite/

* gas/aarch64/ilp32-basic.d: New file.
* gas/aarch64/ilp32-basic.s: New file.

include/elf/

* aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones.
(R_AARCH64_IRELATIVE): New reloc.

11 years ago[AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ld
Yufeng Zhang [Wed, 26 Jun 2013 10:41:42 +0000 (10:41 +0000)]
[AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ld
and gas.

bfd/

* Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo.
(BUILD_CFILES): Add elf32-aarch64.c.
(elf32-aarch64.c): New rule for generating from elfnn-aarch64.c.
* Makefile.in: Re-generated.
* archures.c (bfd_mach_aarch64_ilp32): New define.
* bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration.
(bfd_elf32_aarch64_set_options): Ditto.
(elf32_aarch64_setup_section_lists): Ditto.
(elf32_aarch64_next_input_section): Ditto.
(elf32_aarch64_size_stubs): Ditto.
(elf32_aarch64_build_stubs): Ditto.
* bfd-in2.h: Re-generated.
* config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec
and bfd_elf32_bigaarch64_vec.
(aarch64-*-linux*): Likewise.
(aarch64_be-*-elf): Likewise.
(aarch64_be-*-linux*): Likewise.
* configure.in (bfd_elf32_bigaarch64_vec)
(bfd_elf32_littleaarch64_vec): New.
* configure: Re-generated.
* cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with
lp64 ones.
(bfd_aarch64_arch_ilp32): New.
(bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32.
* elfnn-aarch64.c (ARCH_SIZE): New define.
(AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines.
(GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8).
(elf64_aarch64_*): Rename to elfNN_aarch64_*.
(ELF64_R_*): Rename to ELFNN_R_*.
Plus other paramaterization.
* targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec):
New declarations.
(_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and
bfd_elf32_littleaarch64_vec.

gas/

* config/tc-aarch64.c (ilp32_p): New static variable.
(elf64_aarch64_target_format): Return the target according to the
value of 'ilp32_p'.
(md_begin): Determine 'mach' according to the value of 'ilp32_p'.
(aarch64_opts): Add support for options '-milp32' and '-mlp64'.
(aarch64_dwarf2_addr_size): New function.
* config/tc-aarch64.h (aarch64_dwarf2_addr_size): New declaration.
(DWARF2_ADDR_SIZE): New define.

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32.c.
(eaarch64elf32.c): New dependency and rule.
* Makefile.in: Re-generated.
* configure.tgt (aarch64-*-elf): Add aarch64elf32.
(aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise.
* emulparams/aarch64elf32.sh: New file.