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

11 years ago[AArch64, ILP32] 1/6 Rename elf64-aarch64.c to elfnn-aarch64.c
Yufeng Zhang [Wed, 26 Jun 2013 10:37:46 +0000 (10:37 +0000)]
[AArch64, ILP32] 1/6 Rename elf64-aarch64.c to elfnn-aarch64.c

bfd/

* Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-aarch64.c.
(BUILD_CFILES): Add elf64-aarch64.c.
(elf64-aarch64.c): New rule for generating from elfnn-aarch64.c.
* Makefile.in: Re-generated.
* elf64-aarch64.c: Rename to ...
* elfnn-aarch64.c: ... this.

11 years ago * rx-decode.opc (rx_decode_opcode): Check sd field as well as ss
Nick Clifton [Wed, 26 Jun 2013 10:31:38 +0000 (10:31 +0000)]
* rx-decode.opc (rx_decode_opcode): Check sd field as well as ss
field when checking for type 2 nop.
* rx-decode.c: Regenerate.

11 years agogdb/testsuite/
Yao Qi [Wed, 26 Jun 2013 08:28:27 +0000 (08:28 +0000)]
gdb/testsuite/

2013-06-26  Yao Qi  <yao@codesourcery.com>

* gdb.trace/mi-trace-frame-collected.exp: New.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 08:17:27 +0000 (08:17 +0000)]
gdb/

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* gdb.texinfo (GDB/MI Tracepoint Commands): Document
-trace-frame-collected.
gdb:

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* mi/mi-cmds.c (mi_cmds): Register -trace-frame-collected.
* mi/mi-cmds.h (mi_cmd_trace_frame_collected): Declare.
* mi/mi-main.c (print_variable_or_computed): New function.
(mi_cmd_trace_frame_collected): New function.
* tracepoint.c (find_trace_state_variable_by_number): New.
(struct traceframe_info): Move to tracepoint.h
(struct collection_list): Likewise.
(do_collect_symbol): Include locals and arguments in the wholly
collected variables list.
(clear_collection_list): Clear wholly collected variables list
and computed variables list.
(append_exp): New function.
(encode_actions_1): Include variables in the wholly
collected variables list.  Include memory ranges and
full-fledged expressions in the computed expressions list.
(encode_actions): Move some code to ...
Return the cleanup chain.
(encode_actions_rsp): ... here.  New function.
(get_traceframe_location, get_traceframe_info): Remove static.
* tracepoint.h (struct memrange): Moved from tracepoint.c.
(struct collection_list): Moved from tracepoint.c.  Add two
new fields 'wholly_collected' and 'computed'.
(find_trace_state_variable_by_number): Declare.
(encode_actions): Adjust declaration.
(encode_actions_rsp): Declare.
(get_traceframe_info, get_traceframe_location): Declare.

* NEWS: Mention new MI command -trace-frame-collected.

11 years agogas/
Richard Sandiford [Wed, 26 Jun 2013 08:04:00 +0000 (08:04 +0000)]
gas/
* doc/c-mips.texi: Use ISA instead of @sc{isa}.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 08:01:57 +0000 (08:01 +0000)]
gdb/

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* ctf.c (ctf_traceframe_info): Push trace state variables
present in the trace data into the traceframe info object.
* breakpoint.c (DEF_VEC_I): Remove.
* common/filestuff.c (DEF_VEC_I): Likewise.
* dwarf2loc.c (DEF_VEC_I): Likewise.
* mi/mi-main.c (DEF_VEC_I): Likewise.
* common/gdb_vecs.h (DEF_VEC_I): Define vector for int.
* features/traceframe-info.dtd: Add tvar element and its
attributes.
* tracepoint.c (free_traceframe_info): Free vector 'tvars'.
(build_traceframe_info): Push trace state variables present in the
trace data into the traceframe info object.
(traceframe_info_start_tvar): New function.
(tvar_attributes): New.
(traceframe_info_children): Add "tvar" element.
* tracepoint.h (struct traceframe_info) <tvars>: New field.

* NEWS: Mention the change in GDB and GDBserver.

gdb/doc:

2013-06-26  Pedro Alves  <pedro@codesourcery.com>

* gdb.texinfo (Traceframe Info Format): Document tvar element and
its attributes.

gdb/gdbserver:

2013-06-26  Pedro Alves  <pedro@codesourcery.com>

* tracepoint.c (build_traceframe_info_xml): Output trace state
variables present in the trace buffer.

11 years agoinclude/opcode/
Richard Sandiford [Wed, 26 Jun 2013 07:04:57 +0000 (07:04 +0000)]
include/opcode/
* mips.h: Fix comment for "1": it is now STYPE rather than SHAMT.
Use "source" rather than "destination" for microMIPS "G".

gas/
* config/tc-mips.c (validate_mips_insn): Use STYPE rather than SHAMT.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:35:45 +0000 (05:35 +0000)]
gdb/

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* tracepoint.c (trace_dump_command): Move code to ...
(get_traceframe_location): ... here.  New.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:28:01 +0000 (05:28 +0000)]
gdb/

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* tracepoint.c (trace_dump_command): GDB emits an error
 instead of a warning when a traceframe is not selected.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:25:28 +0000 (05:25 +0000)]
gdb/

2013-06-26  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* tracepoint.c (tracepoint_list, stepping_list): Remove.
(clear_collection_list): Free fields 'aexpre_list' and 'list'
in collection_list.
(do_clear_collection_list, init_collection_list): New.
(encode_actions): Add local variables 'tracepoint_list' and
'stepping_list'.  Call init_collection_list and make cleanup
which calls do_clear_collection_list.  Don't call
clear_collection_list.
(_initialize_tracepoint): Delete references to
'tracepoint_list' and 'stepping_list'.

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

11 years ago bfd/
Maciej W. Rozycki [Tue, 25 Jun 2013 18:02:34 +0000 (18:02 +0000)]
bfd/
* elfxx-mips.h (_bfd_mips_elf_insn32): New prototype.
* elfxx-mips.c (mips_elf_link_hash_table): Add insn32 member.
(STUB_MOVE32_MICROMIPS, STUB_JALR32_MICROMIPS): New macros.
(MICROMIPS_INSN32_FUNCTION_STUB_NORMAL_SIZE): Likewise.
(MICROMIPS_INSN32_FUNCTION_STUB_BIG_SIZE): Likewise.
(micromips_insn32_o32_exec_plt0_entry): New variable.
(micromips_insn32_o32_exec_plt_entry): Likewise.
(_bfd_mips_elf_adjust_dynamic_symbol): Handle insn32 mode.
(mips_elf_estimate_stub_size): Likewise.
(_bfd_mips_elf_size_dynamic_sections): Likewise.
(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
(mips_finish_exec_plt): Likewise.
(_bfd_mips_elf_relax_section): Likewise.
(_bfd_mips_elf_insn32): New function.
(_bfd_mips_elf_get_synthetic_symtab): Handle insn32 PLT.

gas/
* config/tc-mips.c (mips_set_options): Add insn32 member.
(mips_opts): Initialize it.
(NOP_INSN, NOP_INSN_SIZE): Handle insn32 mode.
(options): Add OPTION_INSN32 and OPTION_NO_INSN32 enum values.
(md_longopts): Add "minsn32" and "mno-insn32" options.
(is_size_valid): Handle insn32 mode.
(md_assemble): Pass instruction string down to macro.
(brk_fmt): Add second dimension and insn32 mode initializers.
(mfhl_fmt): Likewise.
(BRK_FMT, MFHL_FMT): Handle insn32 mode.
(macro_build) <'c'>: Handle microMIPS 32-bit BREAK encoding.
(macro_build_jalr, move_register): Handle insn32 mode.
(macro_build_branch_rs): Likewise.
(macro): Handle insn32 mode.
<M_JRADDIUSP>, <M_JRC>, <M_MOVEP>: New cases.
(mips_ip): Handle insn32 mode.
(md_parse_option): Handle OPTION_INSN32 and OPTION_NO_INSN32.
(s_mipsset): Handle "insn32" and "noinsn32" pseudo-ops.
(mips_handle_align): Handle insn32 mode.
(md_show_usage): Add -minsn32 and -mno-insn32.

* doc/as.texinfo (Target MIPS options): Add -minsn32 and
-mno-insn32 options.
(-minsn32, -mno-insn32): New options.
* doc/c-mips.texi (MIPS Opts): Add -minsn32 and -mno-insn32
options.
(MIPS assembly options): New node.  Document .set insn32 and
.set noinsn32.
(MIPS-Dependent): List the new node.

gas/testsuite/
* gas/mips/micromips-insn32.d: New test.
* gas/mips/micromips-noinsn32.d: Likewise.
* gas/mips/micromips.l: Rename to...
* gas/mips/micromips-warn.l: ... this.
* gas/mips/micromips.d: Update accordingly.
* gas/mips/micromips-trap.d: Likewise.
* gas/mips/micromips.l: New list test.
* gas/mips/micromips.s: Add conditionals.
* gas/mips/mips.exp: Run the new tests.

include/opcode/
* mips.h: Add M_JRADDIUSP, M_JRC and M_MOVEP anonymous enum
values.

ld/
* emultempl/mipself.em (insn32): New variable.
(mips_create_output_section_statements): Handle insn32 mode.
(PARSE_AND_LIST_PROLOGUE): New macro.
(PARSE_AND_LIST_LONGOPTS): Likewise.
(PARSE_AND_LIST_OPTIONS): Likewise.

* gen-doc.texi: Set MIPS.
* ld.texinfo: Likewise.
(Options specific to MIPS targets): New section.
(ld and MIPS family): New node.
(Top, Machine Dependent): List the new node.

opcodes/
* micromips-opc.c (micromips_opcodes): Add "jraddiusp", "jrc"
and "movep" macros.

11 years ago * common/create-version.sh (date): Use "$", not "$$" in sed
Tom Tromey [Tue, 25 Jun 2013 16:04:54 +0000 (16:04 +0000)]
* common/create-version.sh (date): Use "$", not "$$" in sed
expression.

11 years ago * NEWS (New targets): Add entry for TI MSP430.
Kevin Buettner [Tue, 25 Jun 2013 15:55:12 +0000 (15:55 +0000)]
* NEWS (New targets): Add entry for TI MSP430.

11 years agoUpload tsv earlier in remote_start_remote
Yao Qi [Tue, 25 Jun 2013 13:01:28 +0000 (13:01 +0000)]
Upload tsv earlier in remote_start_remote

In extended-remote, when GDB connects the target, but target is not
running, the TSVs are not uploaded.  When GDB attaches to a process,
the TSVs are not uploaded either.  However, GDBserver has some
builtin or predefined TSV to upload, such as $trace_timestamp.  This
bug causes $trace_timestamp is never uploaded.

gdb/

2013-06-25  Yao Qi  <yao@codesourcery.com>

        * remote.c (remote_start_remote): Move code to upload tsv
        earlier.

gdb/testsuite/

2013-06-25  Yao Qi  <yao@codesourcery.com>

* boards/native-extended-gdbserver.exp: Set board_info
'gdb,predefined_tsv'.
* boards/native-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.
* gdb.server/ext-attach.exp: Load trace-support.exp.  Check
uploaded TSVs if target supports tracing.
* gdb.trace/tsv.exp: Check uploaded TSVs if target supports
tracing and target has predefined tsv.

gdb/doc/

2013-06-25  Yao Qi  <yao@codesourcery.com>

* gdbint.texinfo (Testsuite): Document 'gdb,predefined_tsv'.

11 years ago2013-06-25 Yao Qi <yao@codesourcery.com>
Hui Zhu [Tue, 25 Jun 2013 11:37:48 +0000 (11:37 +0000)]
2013-06-25  Yao Qi  <yao@codesourcery.com>
    Hui Zhu  <hui@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR breakpoints/15075
PR breakpoints/15434
* breakpoint.c (bpstat_stop_status): Call
b->ops->after_condition_true.
(update_dprintf_command_list): Don't append "continue" command
to the command list of dprintf breakpoint.
(base_breakpoint_after_condition_true): New function.
(base_breakpoint_ops): Add base_breakpoint_after_condition_true.
(dprintf_after_condition_true): New function.
(initialize_breakpoint_ops): Set dprintf_after_condition_true.
* breakpoint.h (breakpoint_ops): Add after_condition_true.

2013-06-25  Yao Qi  <yao@codesourcery.com>
    Hui Zhu  <hui@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR breakpoints/15075
PR breakpoints/15434
* gdb.base/dprintf-next.c: New file.
* gdb.base/dprintf-next.exp: New file.
* gdb.base/dprintf-non-stop.c: New file.
* gdb.base/dprintf-non-stop.exp: New file.
* gdb.base/dprintf.exp: Don't check "continue" in the output
of "info breakpoints".
* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify):
Don't check "continue" in script field.

11 years ago * config/tc-msp430.c (msp430_srcoperand): Do not allow the use of
Nick Clifton [Tue, 25 Jun 2013 08:21:43 +0000 (08:21 +0000)]
* config/tc-msp430.c (msp430_srcoperand): Do not allow the use of
the PC in indirect addressing on 430xv2 parts.
(msp430_operands): Add version test to hardware bug encoding
restrictions.

11 years ago * Makefile.in (ALL_TARGET_OBS): Add msp430-tdep.o.
Kevin Buettner [Tue, 25 Jun 2013 01:16:31 +0000 (01:16 +0000)]
* Makefile.in (ALL_TARGET_OBS): Add msp430-tdep.o.
(ALLDEPFILES): Add msp430-tdep.c.
* configure.tgt (msp430*-*-elf): New target.
* msp430-tdep.c: New file.

11 years agodaily update
Alan Modra [Tue, 25 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years ago bfd/
Maciej W. Rozycki [Mon, 24 Jun 2013 23:55:46 +0000 (23:55 +0000)]
bfd/
* elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New
prototype.
* elf32-mips.c (elf_backend_plt_sym_val): Remove macro.
(bfd_elf32_get_synthetic_symtab): New macro.
* elfxx-mips.c (plt_entry): New structure.
(mips_elf_link_hash_entry): Add use_plt_entry member.
(mips_elf_link_hash_table): Rename plt_entry_size member to
plt_mips_entry_size.  Add plt_comp_entry_size, plt_mips_offset,
plt_comp_offset, plt_got_index entries and plt_header_is_comp
members.
(STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros.
(STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise.
(STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise.
(STUB_LI16S_MICROMIPS): Likewise.
(MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise.
(MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
(micromips_o32_exec_plt0_entry): New variable.
(mips16_o32_exec_plt_entry): Likewise.
(micromips_o32_exec_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize use_plt_entry.
(mips_elf_output_extsym): Update to use gotplt_union's plist
member rather than offset.
(mips_elf_gotplt_index): Likewise.  Remove the VxWorks
restriction.  Use MIPS_ELF_GOT_SIZE to calculate GOT address.
(mips_elf_count_got_symbols): Update to use gotplt_union's plist
member rather than offset.
(mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT
entries.
(_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes
here.
(mips_elf_make_plt_record): New function.
(_bfd_mips_elf_check_relocs): Update comment.  Record occurences
of JAL relocations that might need a PLT entry.
(_bfd_mips_elf_adjust_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Set individual
PLT entry sizes here.  Handle MIPS16/microMIPS PLT entries.
Don't set the symbol's value in the symbol table for PLT
references here.  Don't set the PLT or PLT GOT section sizes
here.
(mips_elf_estimate_stub_size): Handle microMIPS stubs.
(mips_elf_allocate_lazy_stub): Likewise.
(mips_elf_lay_out_lazy_stubs): Likewise.  Define a _MIPS_STUBS_
magic symbol.
(mips_elf_set_plt_sym_value): New function.
(_bfd_mips_elf_size_dynamic_sections): Set PLT header size and
PLT and PLT GOT section sizes here.  Set the symbol values in
the symbol table for PLT references here.  Handle microMIPS
annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol.
(_bfd_mips_elf_finish_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Handle
MIPS16/microMIPS PLT entries.  Handle microMIPS stubs.
(_bfd_mips_vxworks_finish_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Use
MIPS_ELF_GOT_SIZE to calculate GOT address.
(mips_finish_exec_plt): Handle microMIPS PLT.  Return status.
(_bfd_mips_elf_finish_dynamic_sections): Handle result from
mips_finish_exec_plt.
(_bfd_mips_elf_link_hash_table_create): Update to use
gotplt_union's plist member rather than offset.
(_bfd_mips_elf_get_synthetic_symtab): New function.

include/elf/
* mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting.
(ELF_ST_SET_MIPS_PLT): Likewise.

gdb/
* mips-tdep.c (mips_elf_make_msymbol_special): Handle MIPS16 and
microMIPS synthetic symbols.

ld/
* emulparams/elf32btsmip.sh: Arrange for .got.plt to be placed
as close to .plt as possible.
* scripttempl/elf.sc: Handle $INITIAL_READWRITE_SECTIONS and
$PLT_NEXT_DATA variables.

ld/testsuite/
* ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support.
* ld-mips-elf/pic-and-nonpic-3a.dd: Update for the _MIPS_STUBS_
magic symbol.
* ld-mips-elf/pic-and-nonpic-3b.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise.
* ld-mips-elf/stub-dynsym-1-10000.d: Likewise.
* ld-mips-elf/stub-dynsym-1-2fe80.d: Likewise.
* ld-mips-elf/stub-dynsym-1-7fff.d: Likewise.
* ld-mips-elf/stub-dynsym-1-8000.d: Likewise.
* ld-mips-elf/stub-dynsym-1-fff0.d: Likewise.
* ld-mips-elf/tlslib-o32.d: Likewise.

opcodes/
* mips-dis.c (is_mips16_plt_tail): New function.
(print_insn_mips16): Handle MIPS16 PLT entry's GOT slot address
word.
(is_compressed_mode_p): Handle MIPS16/microMIPS PLT entries.

11 years agoAdapt sim to new version number & date locations.
Joel Brobecker [Mon, 24 Jun 2013 23:41:35 +0000 (23:41 +0000)]
Adapt sim to new version number & date locations.

This change is required now that gdb/version.in has been moved to
gdb/common/version.in and now that the date needs to be fetched
from bfd/version.h.

sim/common/ChangeLog:

        * create-version.sh: New script. Adapted from
        gdb/commong/create-version.sh.
        * Make-common.in (version.c): Update rule dependencies,
        and re-implement using create-version.sh.

sim/ppc/ChangeLog:

        * Makefile.in (srccom): New variable.
        (version.c): Update rule dependencies, and re-implement using
        sim/common/create-version.sh.

11 years agogas/
Roland McGrath [Mon, 24 Jun 2013 23:13:00 +0000 (23:13 +0000)]
gas/
* config/tc-arm.c (parse_reg_list): Use skip_past_char for '}',
so it skips whitespace before it.
(s_arm_unwind_save_mmxwr, s_arm_unwind_save_mmxwcg): Likewise.

gas/testsuite/
* gas/arm/macro-vld1.s: Add a case with whitespace before '}'.
* gas/arm/macro-vld1.d: Update.

11 years ago * objfiles.h (pc_in_section): New prototype.
Maciej W. Rozycki [Mon, 24 Jun 2013 22:18:32 +0000 (22:18 +0000)]
* objfiles.h (pc_in_section): New prototype.
(in_plt_section): Remove name argument, replace prototype with
static inline function.
* mips-tdep.h: Include "objfiles.h".
(in_mips_stubs_section): New function.
* hppa-tdep.h (gdbarch_tdep): Remove name argument of
in_solib_call_trampoline member.
(hppa_in_solib_call_trampoline): Remove name argument.
* objfiles.c (pc_in_section): New function.
(in_plt_section): Remove function.
* mips-linux-tdep.c: Include "objfiles.h".
(mips_linux_in_dynsym_stub): Call in_mips_stubs_section.  Remove
name argument.  Return 1 rather than the low 16-bit halfword of
any instruction examined.
(mips_linux_in_dynsym_resolve_code): Update
mips_linux_in_dynsym_stub call accordingly.
* mips-tdep.c (mips_stub_frame_sniffer): Use in_mips_stubs_section
rather than an equivalent hand-coded sequence.
* hppa-hpux-tdep.c (in_opd_section): Remove function.
(hppa32_hpux_in_solib_call_trampoline): Remove name argument.
(hppa64_hpux_in_solib_call_trampoline): Likewise.
(hppa64_hpux_find_global_pointer): Use pc_in_section rather than
in_opd_section.
* hppa-tdep.c (hppa_stub_unwind_sniffer): Remove name argument
on call to tdep->in_solib_call_trampoline.
(hppa_in_solib_call_trampoline): Remove name argument, update
according to in_plt_section change.
(hppa_skip_trampoline_code): Update according to in_plt_section
change.
* aarch64-tdep.c (aarch64_stub_unwind_sniffer): Likewise.
* arm-symbian-tdep.c (arm_symbian_skip_trampoline_code):
Likewise.
* arm-tdep.c (arm_stub_unwind_sniffer): Likewise.
* hppa-linux-tdep.c (hppa_linux_find_global_pointer): Likewise.
* hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
* nios2-tdep.c (nios2_stub_frame_sniffer): Likewise.
* nto-tdep.c (nto_relocate_section_addresses): Likewise.
* s390-tdep.c (s390_stub_frame_sniffer): Likewise.
* sh-tdep.c (sh_stub_unwind_sniffer): Likewise.
* solib-dsbt.c (dsbt_in_dynsym_resolve_code): Likewise.
* solib-frv.c (frv_in_dynsym_resolve_code): Likewise.
* solib-svr4.c (svr4_in_dynsym_resolve_code): Likewise.
* solib-target.c (solib_target_in_dynsym_resolve_code): Likewise.
* sparc-tdep.c (sparc_analyze_prologue): Likewise.
* tic6x-tdep.c (tic6x_stub_unwind_sniffer): Likewise.

11 years agoFix host_name and target_name generation by common/create-version.sh.
Joel Brobecker [Mon, 24 Jun 2013 22:03:51 +0000 (22:03 +0000)]
Fix host_name and target_name generation by common/create-version.sh.

This new script has one small snafoo, which prevented the $host_alias
and $target_alias from being expanded during the generation of the
version.c file.  As a result, the version info yields:

    This GDB was configured as "--host=$host_alias --target=$target_alias".
                                       ^^^^^^^^^^^          ^^^^^^^^^^^^^

This patch fixes this issue.

gdb/ChangeLog:

        * common/create-version.sh: Fix expansion of $host_alias
        and $target_alias in generation of HOST_NAME and TARGET_NAME
        (resp.).

11 years agogas/
Roland McGrath [Mon, 24 Jun 2013 21:05:30 +0000 (21:05 +0000)]
gas/
* config/tc-arm.c (arm_symbol_chars): Include '{' and '}'.
(arm_reg_parse_multi): Skip whitespace first.
(parse_reg_list): Likewise.
(parse_vfp_reg_list): Likewise.
(s_arm_unwind_save_mmxwcg): Likewise.

gas/testsuite/
* gas/arm/macro-pld.s: Add a 'push {r0}' case.
* gas/arm/macro-pld.d: Update expected output.
* gas/arm/macro-vld1.s: New file.
* gas/arm/macro-vld1.d: New file.

11 years ago PR gas/15623
Nick Clifton [Mon, 24 Jun 2013 15:38:53 +0000 (15:38 +0000)]
PR gas/15623
* config/tc-arm.c (do_t_smc): Mark as ending an IT block.

11 years agodon't keep a gdb-specific date
Tom Tromey [Mon, 24 Jun 2013 15:06:27 +0000 (15:06 +0000)]
don't keep a gdb-specific date

Right now there are two nightly commits to update a file in the tree
with the current date.  One commit is for BFD, one is for gdb.

It seems unnecessary to me to do this twice.  We can make do with a
single such commit.

This patch changes gdb in a minimal way to reuse the BFD date -- it
extracts it from bfd/version.h and changes version.in to use the
placeholder string "DATE" for those times when a date is wanted.

I propose removing the cron job that updates the version on trunk, and
then check in this patch.

For release branches, we can keep the cron job, but just tell it to
rewrite bfd/version.h.  I believe this is a simple change in the
crontab -- the script will work just fine on this file.

This also moves version.in and version.h into common/, to reflect
their shared status; and updates gdbserver to use version.h besides.

* common/create-version.sh: New file.
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(HFILES_NO_SRCDIR): Use common/version.h.
* version.in: Move to ...
* common/version.in: ... here.  Replace date with "DATE".
* version.h: Move to ...
* common/version.h: ... here.
gdbserver:
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(version.o): Remove.
* gdbreplay.c: Include version.h.
(version, host_name): Don't declare.
* server.h: Include version.h.
(version, host_name): Don't declare.
doc:
* Makefile.in (POD2MAN1, POD2MAN5): Use version.subst.
(GDBvn.texi): Use version.subst.
(version.subst): New target.
(mostlyclean): Remove version.subst.

11 years ago PR 15657
Nick Clifton [Mon, 24 Jun 2013 14:28:17 +0000 (14:28 +0000)]
PR 15657
* hash.c (_bfd_stringtab_add): Copy the string if COPY is true.

11 years agosim: bfin: note missing parallel handling of SEARCH
Mike Frysinger [Mon, 24 Jun 2013 02:06:32 +0000 (02:06 +0000)]
sim: bfin: note missing parallel handling of SEARCH

The SEARCH insn is an oddball when it comes to parallel usage.  It places a
big limit on what other insns it can run in parallel with, but we don't
currently track the amount of state needed to verify this (since no other insn
really requires this).  Add a note for now in case we get around to it.

11 years agosim: bfin: handle invalid HLs encoding in dsp shift insns
Mike Frysinger [Mon, 24 Jun 2013 02:03:03 +0000 (02:03 +0000)]
sim: bfin: handle invalid HLs encoding in dsp shift insns

For many of the 32bit dsp shift related insns, we were just ignoring the HLs
field.  The hardware does not though and will reject the insn if it's set
incorrectly.  Update the sim to match.

11 years agosim: bfin: run-tests.sh: fix typo in usage exit
Mike Frysinger [Mon, 24 Jun 2013 01:59:10 +0000 (01:59 +0000)]
sim: bfin: run-tests.sh: fix typo in usage exit

11 years agosim: bfin: se_all32bitopcodes: skip debug insns under the sim
Mike Frysinger [Mon, 24 Jun 2013 01:52:33 +0000 (01:52 +0000)]
sim: bfin: se_all32bitopcodes: skip debug insns under the sim

Since the sim has a few fake debug insns that the hardware does not, we
need to check for those before attempting to run them.  Otherwise we'll
randomly trigger the sim debug asserts/aborts/halts insns.  On the
hardware, these are proper invalid insns, and the table catches that.

11 years agosim: bfin: speed up all insn testcases slightly
Mike Frysinger [Mon, 24 Jun 2013 01:44:55 +0000 (01:44 +0000)]
sim: bfin: speed up all insn testcases slightly

The main body of the "all insn" test is executed once per tested insn, and
we test millions of insns here.  Any shrinkage we can do in this loop will
speed things up nicely (since it's multiplied per tested insn).

To that end, simplify the end-of-table test into one less insn, and omit
the SSYNC when we build for the sim.  When we build to run on the hardware,
this insn matters, but the sim doesn't have write store buffers in the chip
that might get in the way (memory writes are atomic).

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

11 years ago*** empty log message ***
gdbadmin [Mon, 24 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

11 years agoinclude/opcode/
Richard Sandiford [Sun, 23 Jun 2013 20:12:53 +0000 (20:12 +0000)]
include/opcode/
* mips.h: Fix comment typo: "G" is _RS rather than _RD for microMIPS.

gas/
* config/tc-mips.c (mips_ip): Fix swapped bit numbers in comments.

11 years agobfd/
Richard Sandiford [Sun, 23 Jun 2013 20:08:23 +0000 (20:08 +0000)]
bfd/
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
files to...
(BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
* Makefile.in: Regenerate.
* config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
Set want64 to true for them at the end.
* targets.c (_bfd_target_vector): Protect MIPS ELF targets with
#ifdef BFD64.

gas/
* config/tc-mips.c: Assert that offsetT and valueT are at least
8 bytes in size.
(GPR_SMIN, GPR_SMAX): New macros.
(macro, mips_ip): Remove code for 4-byte valueT and offsetT.

ld/
* Makefile.am (ALL_EMULATION_SOURCES): Move MIPS ELF emulations to...
(ALL_64_EMULATION_SOURCES): ...here.
* Makefile.in: Regenerate.

11 years agosim: bfin: trim trailing whitespace
Mike Frysinger [Sun, 23 Jun 2013 06:23:54 +0000 (06:23 +0000)]
sim: bfin: trim trailing whitespace

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