binutils-gdb.git
11 years ago * dwarf2read.c (lookup_dwo_cutu): Improve complaint text.
Doug Evans [Fri, 29 Mar 2013 18:46:07 +0000 (18:46 +0000)]
* dwarf2read.c (lookup_dwo_cutu): Improve complaint text.

11 years ago * dwarf2read.c (read_cutu_die_from_dwo): New function.
Doug Evans [Fri, 29 Mar 2013 17:48:48 +0000 (17:48 +0000)]
* dwarf2read.c (read_cutu_die_from_dwo): New function.
(lookup_dwo_unit): New function.
(init_cutu_and_read_dies): Move DWO handling to new functions.

11 years ago * dwarf2read.c (struct signatured_type): Tweak comment.
Doug Evans [Fri, 29 Mar 2013 16:55:57 +0000 (16:55 +0000)]
* dwarf2read.c (struct signatured_type): Tweak comment.
(struct dwo_unit): Tweak comment.
(create_debug_types_hash_table): Tweak comment.  Reformat long line.
(create_dwo_debug_info_hash_table): Tweak comment.
(dwarf2_per_cu_offset_and_type): Tweak comment.

11 years ago * dwarf2read.c (lookup_signatured_type): Remove complaint about
Doug Evans [Fri, 29 Mar 2013 16:38:52 +0000 (16:38 +0000)]
* dwarf2read.c (lookup_signatured_type): Remove complaint about
missing .debug_types section.

11 years agogdb/
Yao Qi [Fri, 29 Mar 2013 15:21:23 +0000 (15:21 +0000)]
gdb/

2013-03-29  Yao Qi  <yao@codesourcery.com>

* corelow.c: Include "completer.h".
(_initialize_corelow): Call add_target_with_completer with
argument 'filename_completer'.
* tracepoint.c: Likewise.
* exec.c (_initialize_exec): Likewise.
* target.c (add_target): Rename to ...
(add_target_with_completer): ... this.  Call set_cmd_completer
if parameter completer is not NULL.
(add_target): New.
* target.h: Include "command.h".
(add_target_with_completer): Declare it.

gdb/testsuite:

2013-03-29  Yao Qi  <yao@codesourcery.com>

* gdb.base/completion.exp: Test completion of commands
"target core", "target tfile" and "target exec".
* gdb.trace/tfile.exp: Test completion of command
"target tfile".

11 years agoIgnore __fu<digits>__ symbols from COFF symbol tables
Joel Brobecker [Fri, 29 Mar 2013 02:04:15 +0000 (02:04 +0000)]
Ignore __fu<digits>__ symbols from COFF symbol tables

The debugger sometimes prints strange function names for given
addresses. For instance, with the following source code...

4    procedure Foo is
5       A : Integer;
6    begin
7       Do_Nothing (A'Address);
8    end Foo;

... we can see...

    (gdb) info line 5
    Line 5 of "foo.adb" starts at address 0x4017ca <_ada_foo+6>
       and ends at 0x4017d2 <_fu29__system__scalar_values__is_is4+7>.
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

_fu29__system__scalar_values__is_is4 is an artificial symbol
generated by the linker, and interferes with the pc-to-symbol
resolution.  There isn't much in the general minimal_symbol
data that could help us identify them, so this patch changes
the COFF reader to simply ignore them.

gdb/ChangeLog:

* coffread.c (is_import_fixup_symbol): New function.
(record_minimal_symbol): Use is_import_fixup_symbol to
detect import fixup symbols, and discard them.

gdb/testsuite/ChangeLog:

        * gdb.ada/win_fu_syms: New testcase.

11 years ago * dwarf2read.c (create_debug_types_hash_table): Don't allocate the
Doug Evans [Fri, 29 Mar 2013 00:35:20 +0000 (00:35 +0000)]
* dwarf2read.c (create_debug_types_hash_table): Don't allocate the
types hash table until we know we need it.

11 years ago * dwarf2read.c (create_addrmap_from_index): Complain about bad CU
Doug Evans [Fri, 29 Mar 2013 00:18:32 +0000 (00:18 +0000)]
* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
index numbers.

11 years ago * dwarf2read.c (dw2_get_file_names): Delete arg "objfile".
Doug Evans [Fri, 29 Mar 2013 00:11:10 +0000 (00:11 +0000)]
* dwarf2read.c (dw2_get_file_names): Delete arg "objfile".
All callers updated.
(dw2_print_stats): Print #read CUs too.
(dump_die_shallow): Print signatured types better.

testsuite/
* gdb.base/maint.exp (maint print statistics): Update expected output.

11 years ago*** empty log message ***
gdbadmin [Fri, 29 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
Kaz Kojima [Thu, 28 Mar 2013 23:52:44 +0000 (23:52 +0000)]
* elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
R_SH_REL32 relocations against undefined weak symbols.

11 years agodaily update
Alan Modra [Thu, 28 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years ago * dwarf2read.c (struct dwarf2_per_cu_data): Rename member
Doug Evans [Thu, 28 Mar 2013 22:59:47 +0000 (22:59 +0000)]
* dwarf2read.c (struct dwarf2_per_cu_data): Rename member
info_or_types_section to section.  All uses updated.
(struct dwo_unit): Ditto.

11 years agoStop sending qTStatus if the target doesn't recognize it; add packet configuration...
Pedro Alves [Thu, 28 Mar 2013 21:58:03 +0000 (21:58 +0000)]
Stop sending qTStatus if the target doesn't recognize it; add packet configuration command.

GDB currently sends a qTStatus even if the target previously replied
an empty packet to a previous qTStatus.  If the target doesn't
recognize the packet, there's no point in trying again.

The machinery we have in place is packet_ok, which has the nice side
effect of forcing one to install a configuration command/knob for the
packet in question, which is often handy when you need to debug
things, and/or emulate a target that doesn't support the packet, or even,
it can be used as workaround for the old broken kgdb's that return error
to qTSTatus instead of an empty packet.

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

* NEWS (New options): New section.
(New options): Mention set/show remote trace-status-packet.
* remote.c (PACKET_qTStatus): New enumeration value.
(remote_get_trace_status): Skip sending qTStatus if the packet is
disabled.  Use packet_ok.
(_initialize_remote): Register a configuration command for
qTStatus packet.

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

* gdb.texinfo (Remote Configuration) <set remote @var{name}-packet
table>: Add entry for "trace-status".

11 years agoFix Doug Evans's commit of 2013-03-21.
Eli Zaretskii [Thu, 28 Mar 2013 21:07:56 +0000 (21:07 +0000)]
Fix Doug Evans's commit of 2013-03-21.

* gdb.texinfo (Maintenance Commands): Use @enumerate, not "@table
@bullet", which is invalid (makeinfo 5.1 barfs).

11 years ago * symfile.c (find_separate_debug_file): Add comment.
Doug Evans [Thu, 28 Mar 2013 18:17:38 +0000 (18:17 +0000)]
* symfile.c (find_separate_debug_file): Add comment.
(terminate_after_last_dir_separator): Tweak comment.

11 years ago * dwarf2read.c (create_partial_symtab): Add forward decl.
Doug Evans [Thu, 28 Mar 2013 17:41:03 +0000 (17:41 +0000)]
* dwarf2read.c (create_partial_symtab): Add forward decl.
(create_partial_symtab): Move to be closer to other psymtab functions.
(process_psymtab_comp_unit_reader, process_psymtab_comp_unit): Ditto.

11 years ago * dwarf2read.c (dwarf2_physname): Move declaration to better spot.
Doug Evans [Thu, 28 Mar 2013 17:35:01 +0000 (17:35 +0000)]
* dwarf2read.c (dwarf2_physname): Move declaration to better spot.
(compute_symtab_includes): Remove unnecessary forward declaration.
(die_needs_namespace): Add comment marking group of functions for
dwarf2 name computation.

11 years ago * typeprint.c (_initialize_typeprint): Improve type help text.
Doug Evans [Thu, 28 Mar 2013 17:25:47 +0000 (17:25 +0000)]
* typeprint.c (_initialize_typeprint): Improve type help text.

11 years ago * python/python.c (finish_python_initialization): Provide suggestion
Doug Evans [Thu, 28 Mar 2013 16:39:09 +0000 (16:39 +0000)]
* python/python.c (finish_python_initialization): Provide suggestion
for how to tell gdb to find its python files.

11 years ago * elf64-ppc.c (struct ppc_dyn_relocs): New.
Alan Modra [Thu, 28 Mar 2013 13:36:32 +0000 (13:36 +0000)]
* elf64-ppc.c (struct ppc_dyn_relocs): New.
(ppc64_elf_check_relocs): Separate dynrel counts for local syms
into ifunc and non-ifunc.
(dec_dynrel_count): Pass in sym rather than sym_sec.  Handle
separate ifunc/non-ifunc dynrel counts.
(allocate_got): Always use reliplt for ifunc.
(allocate_dynrelocs): Likewise.
(ppc64_elf_size_dynamic_sections): Likewise.
(ppc64_elf_layout_multitoc): Likewise.
(ppc64_elf_relocate_section): Likewise.

11 years agoFix PR gdb/15294: list with unlimited listsize broken
Pedro Alves [Thu, 28 Mar 2013 11:57:47 +0000 (11:57 +0000)]
Fix PR gdb/15294: list with unlimited listsize broken

Currently, "set listsize -1" is supposed to mean "unlimited" source
lines, but, alas, it doesn't actually work:

 (gdb) set listsize -1
 (gdb) show listsize
 Number of source lines gdb will list by default is unlimited.
 (gdb) list 1
 (gdb) list 1
 (gdb) list 1
 (gdb) set listsize 10
 (gdb) list 1
 1       /* Main function for CLI gdb.
 2          Copyright (C) 2002-2013 Free Software Foundation, Inc.
 3
 4          This file is part of GDB.
 5
 6          This program is free software; you can redistribute it and/or modify
 7          it under the terms of the GNU General Public License as published by
 8          the Free Software Foundation; either version 3 of the License, or
 9          (at your option) any later version.
 10

Before this patch:

     http://sourceware.org/ml/gdb-patches/2012-08/msg00367.html

was applied, the "set listsize" command was a var_integer command, and
"unlimited" was set with 0.  Internally, var_integer maps 0 to INT_MAX

   case var_integer:
      {
      ...
if (val == 0 && c->var_type == var_integer)
  val = INT_MAX;

The change in that patch to zuinteger_unlimited command, meant that -1
is left as -1 in the command's control variable (lines_to_list), and
the code in source.c isn't expecting that -- it only expects positive
numbers.

I previously suggested fixing the code and keeping the new behavior,
but I found that "set listsize 0" is currently used in the wild, and
we do have a bunch of other commands where "0" means unlimited, so I'm
thinking that changing this command alone in isolation is not a good
idea.

So I now strongly prefer reverting back the behavior in 7.6 to the
same behavior the command has had since 2006 (0==unlimited, -1=error).
Before that, set listsize -1 would be accepted as unlimited as well.

After 7.6 is out, in mainline, we can get back to reconsidering
changing this command's behavior, if there's a real need for being
able to suppress output.  For now, let's play it safe.

The "list line 1 with unlimited listsize" test in list.exp was
originally written years and years ago expecting 0 to mean "no
output", but GDB never actually worked that way, even when the tests
were written, so the tests had been xfailed then.  This patch now
adjusts the test to the new behavior, so that the test actually
passes, and the xfail is removed.

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

PR gdb/15294

* source.c (_initialize_source): Change back "set listsize" to an
integer command.

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

PR gdb/15294

* gdb.base/list.exp (set_listsize): Adjust to accept $arg == 0 to
mean unlimited instead of $arg < 0.
(test_listsize): Remove "listsize of 0 suppresses output" test.
Test that "set listsize 0" ends up with an unlimited listsize.

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

PR gdb/15294

* gdb.texinfo (List) <set listsize>: Adjust to document that
listsize 0 means no limit, and remove mention of -1.

11 years agolist.exp: Avoid hardcoding line numbers.
Pedro Alves [Thu, 28 Mar 2013 11:56:51 +0000 (11:56 +0000)]
list.exp: Avoid hardcoding line numbers.

The previous patch actually wasn't the first time I had to update line
numbers in this file.

This avoids hard coding line numbers, hopefully making the next time a
little easier.

Tested on x86_64 Fedora 17.

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

* gdb.base/list.exp (last_line): New global.
(last_line_re): New global.
(test_listsize, test_list_function, test_list_forward)
(test_repeat_list_command, test_list_range)
(test_list_filename_and_function): Use them.
* gdb.base/list0.c: Comment the last line of the file with "last
line".

11 years agolist.exp: Adjust "set listsize -1" to current test source's real line count.
Pedro Alves [Thu, 28 Mar 2013 11:56:15 +0000 (11:56 +0000)]
list.exp: Adjust "set listsize -1" to current test source's real line count.

The "set listsize -1" test in list.exp can't work correct anymore
nowadays, because the test's source files grew over time, and this
particular test was never updated.

This fixes it in the obvious way.

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

* gdb.base/list.exp (test_listsize): Adjust test to make sure we
list the whole file.

11 years agolist.exp: Catch "set listsize" failures (and "set listsize -1/0"'s history).
Pedro Alves [Thu, 28 Mar 2013 11:55:40 +0000 (11:55 +0000)]
list.exp: Catch "set listsize" failures (and "set listsize -1/0"'s history).

Before the changes starting at
<http://sourceware.org/ml/gdb-patches/2012-08/msg00020.html>, the 'set
listsize' command only accepted "0" as special value, meaning
"unlimited".  The testsuite actually tried "set listsize -1" and
expected that to mean unlimited too.

If you tried testing list.exp at the time of that patch above,
you'd get:

  (gdb) PASS: gdb.base/list.exp: list line 10 with listsize 100
  set listsize 0
  (gdb) PASS: gdb.base/list.exp: setting listsize to 0 #6
  show listsize
  Number of source lines gdb will list by default is unlimited.
  (gdb) PASS: gdb.base/list.exp: show listsize unlimited #6
  list 1
  1       #include "list0.h"
  2
  ...
  42          /* Not used for anything */
  43      }
  (gdb) PASS: gdb.base/list.exp: listsize of 0 suppresses output
  set listsize -1
  integer 4294967295 out of range
  (gdb) PASS: gdb.base/list.exp: setting listsize to -1 #7
  show listsize
  Number of source lines gdb will list by default is unlimited.
  (gdb) PASS: gdb.base/list.exp: show listsize unlimited #7
  list 1
  1       #include "list0.h"

Notice that "set listsize -1" actually failed with "integer 4294967295
out of range", but we issued a PASS anyway.

(and notice how the "listsize of 0 suppresses output" test passes bogusly too.)

This patch fixes that testsuite problem in the obvious way.

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

* gdb.base/list.exp (set_listsize): Use gdb_test_no_output for
"set listsize".

11 years agoAdd support for Cortex-A53 and Cortex-A57.
Ramana Radhakrishnan [Thu, 28 Mar 2013 11:00:15 +0000 (11:00 +0000)]
Add support for Cortex-A53 and Cortex-A57.

11 years ago PR binutils/15068
Nick Clifton [Thu, 28 Mar 2013 09:25:11 +0000 (09:25 +0000)]
PR binutils/15068
* tic6x-opcode-table.h: Fix patterns for add, ldnw and xor.
* gas/tic6x/insns16-lsd-unit.s: Correct bit patterns for mvk, add
and xor.
* gas/tic6x/insns16-lsd-unit.d: Update expected output.

11 years ago * elf32-ppc.c (struct ppc_dyn_relocs): New.
Alan Modra [Thu, 28 Mar 2013 07:07:25 +0000 (07:07 +0000)]
* elf32-ppc.c (struct ppc_dyn_relocs): New.
(ppc_elf_check_relocs): Separate dynrel counts for local syms
into ifunc and non-ifunc.
(allocate_dynrelocs): Always put ifunc relocs into reliplt.
(ppc_elf_size_dynamic_sections): Likewise.
(ppc_elf_relocate_section): Likewise.

11 years agomerge from gcc
DJ Delorie [Thu, 28 Mar 2013 02:00:05 +0000 (02:00 +0000)]
merge from gcc

11 years ago*** empty log message ***
gdbadmin [Thu, 28 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Wed, 27 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years agoProperly check address mode for SIB
H.J. Lu [Wed, 27 Mar 2013 18:49:10 +0000 (18:49 +0000)]
Properly check address mode for SIB

gas/testsuite/

* gas/i386/addr32.s: Add an SIB test.
* gas/i386/addr32.d: Updated.

opcodes/

* i386-dis.c (get_sib): Add the sizeflag argument.  Properly
check address mode.
(print_insn): Pass sizeflag to get_sib.

11 years agogdb/
Jan Kratochvil [Wed, 27 Mar 2013 18:20:10 +0000 (18:20 +0000)]
gdb/
PR gdb/15275
* remote.c (remote_get_trace_status): Include putpkt in TRY_CATCH.

11 years ago * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
Alan Modra [Wed, 27 Mar 2013 13:37:51 +0000 (13:37 +0000)]
* elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
(struct elf_backend_data <elf_backed_reloc_type_class>): Add
bfd_link_info* and asection* params.
(_bfd_elf_reloc_type_class): Likewise.
* elf.c (_bfd_elf_reloc_type_class): Likewise.
* elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
(elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
* elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
for any reliplt reloc.  Don't return reloc_class_plt for
R_PPC_REL24 and R_PPC_ADDR24.
* elf64-ppc.c (allocate_got): Formatting.
(ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
reliplt reloc.
* elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
* elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
* elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
* elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
* elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
Add extra params to the various reloc_type_class functions.

11 years ago * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
Alan Modra [Wed, 27 Mar 2013 13:25:48 +0000 (13:25 +0000)]
* elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
masks for all local ifunc syms.
(allocate_dynrelocs): Don't use htab->relgot for ifunc.
(ppc_elf_size_dynamic_sections): Likewise.
(ppc_elf_relocate_section): Likewise.

11 years ago PR ld/13812
Nick Clifton [Wed, 27 Mar 2013 13:21:38 +0000 (13:21 +0000)]
PR ld/13812
* scripttempl/avr.sc: Place trampolines before .progmem section.

11 years agoForbid "set history size (INT_MAX..UINT_MAX)"
Pedro Alves [Wed, 27 Mar 2013 12:14:09 +0000 (12:14 +0000)]
Forbid "set history size (INT_MAX..UINT_MAX)"

The whole readline interface is signed, and works with the 0..INT_MAX
range.

We don't allow setting the size to UINT_MAX directly.  The documented
user visible interface is "use 0 for unlimited".  The UINT_MAX
representation is an implementation detail we could change, e.g., by
keeping a separate flag for "unlimited", which is actually what the
readline interface does (stifled vs non stifled).  Generically
speaking, exposing this detail to clients of the interface may make
our lives complicated when we find the need to extend the range of
some command in the future, and it's better if users
(frontends/scripts) aren't relying on anything but what we tell them
to use for "unlimited".  Making values other than 0 error out is the
way to prevent users from using those ranges inappropriately.  Quite
related, note:

    (gdb) set history size 0xffffffff
    integer 4294967295 out of range

  But,

    (gdb) set history size 0xfffffffe
    (gdb) show history size
    The size of the command history is unlimited.

    (gdb) set history size 0x100000000
    integer 4294967296 out of range

If values over INT_MAX are accepted as unlimited, then there's no good
argument for only accepting [INT_MAX..UINT_MAX) as valid "unlimited"
magic numbers, while not accepting [UINT_MAX..inf).

Making the setting's control variable of different type (unsigned int)
of the rest of the related code (int) adds the need to recall that one
variable among all these is unsigned, and that one need to think about
whether these comparisons are signed or unsigned, along with the
promotion/conversion rules.  Since this is an easy to forget detail,
this patch renames the variable to at least make it more obvious that
this variable is not one of GNU history's public int variables, which
are all signed.  We don't actually need the only code that presently
is affected by this, though, the code that is computing the current
history's length.  We can just use GNU history's history_length
instead:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Variable: int history_length
    The number of entries currently stored in the history list.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/* Return the history entry which is logically at OFFSET in the history array.
   OFFSET is relative to history_base. */
HIST_ENTRY *
history_get (offset)
     int offset;
{
  int local_index;

  local_index = offset - history_base;
  return (local_index >= history_length || local_index < 0 || the_history == 0)
? (HIST_ENTRY *)NULL
: the_history[local_index];
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

At the time this code was added (gdb 4.13 ~1994), 'history_length' was
extern, but not documented in readline's GNU history documents, so I
guess it wasn't considered public then and the loop was the
workaround.

One of the warts of GDB choosing 0 to mean unlimited is that "set
history size 0" behaves differently from 'HISTSIZE=0 gdb'.  The latter
leaves GDB with no history, while the former means "unlimited"...

 $ HISTSIZE=0 ./gdb
 ...
 (gdb) show history size
 The size of the command history is 0.

We shouldn't really change what HISTSIZE=0 means, as bash, etc. also
handle 0 as real zero, and zero it's what really makes sense.

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

* top.c (history_size): Rename to ...
(history_size_setshow_var): ... this.  Add comment.
(show_commands): Use readline's 'history_length' instead of
computing the history length by calling history_get in a loop.
(set_history_size_command): Error out for sizes over INT_MAX.
Restore previous history size on invalid size.
(init_history): If HISTSIZE is negative, leave the history size as
zero.  Add comments.
(init_main): Adjust.

11 years ago PR binutils/13409
Nick Clifton [Wed, 27 Mar 2013 11:53:46 +0000 (11:53 +0000)]
PR binutils/13409
* winduni.c (codepages[]): Use UTF-16LE.
(wind_MultiByteToWideChar): Likewise.
(wind_WideCharToMultiByte): Likewise.

11 years ago PR binutils/15068
Nick Clifton [Wed, 27 Mar 2013 11:43:37 +0000 (11:43 +0000)]
PR binutils/15068
* tic6x-dis.c: Add support for displaying 16-bit insns.
* tic6xc-insn-formats.h (FLD): Add use of bitfield array.
Add 16-bit opcodes.
* tic6xc-opcode-table.h: Add 16-bit insns.
* tic6x.h: Add support for 16-bit insns.
* config/tc-tic6x.c (tic6x_try_encode): Add use of bitfields array.
* gas/tic6x/insns16-d-unit.s: New test.
* gas/tic6x/insns16-d-unit.d: Expected disassembly.
* gas/tic6x/insns16-ddec.s: New test.
* gas/tic6x/insns16-ddec.d: Expected disassembly.
* gas/tic6x/insns16-dinc.s: New test.
* gas/tic6x/insns16-dinc.d: Expected disassembly.
* gas/tic6x/insns16-dind.s: New test.
* gas/tic6x/insns16-dind.d: Expected disassembly.
* gas/tic6x/insns16-doff4.s: New test.
* gas/tic6x/insns16-doff4.d: Expected disassembly.
* gas/tic6x/insns16-l-unit.s: New test.
* gas/tic6x/insns16-l-unit.d: Expected disassembly.
* gas/tic6x/insns16-lsd-unit.s: New test.
* gas/tic6x/insns16-lsd-unit.d: Expected disassembly.
* gas/tic6x/insns16-m-unit.s: New test.
* gas/tic6x/insns16-m-unit.d: Expected disassembly.
* gas/tic6x/insns16-s-unit-pcrel.s: New test.
* gas/tic6x/insns16-s-unit-pcrel.d: Expected disassembly.
* gas/tic6x/insns16-s-unit: New test.
* gas/tic6x/insns16-s-unit.d: Expected disassembly.

11 years agobfd/ChangeLog:
Will Newton [Wed, 27 Mar 2013 09:51:46 +0000 (09:51 +0000)]
bfd/ChangeLog:

2013-03-20  Will Newton  <will.newton@linaro.org>

* elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
dynamic reloc for symbols with dynindx == -1.
(allocate_dynrelocs_for_symbol): Avoid allocating space for a
dynamic reloc for symbols with dynindx == -1.

11 years agobfd/ChangeLog:
Will Newton [Wed, 27 Mar 2013 09:48:46 +0000 (09:48 +0000)]
bfd/ChangeLog:

2013-03-20  Will Newton  <will.newton@linaro.org>

* elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
dynamic reloc for symbols with dynindx == -1.
(allocate_dynrelocs_for_symbol): Avoid allocating space for a
dynamic reloc for symbols with dynindx == -1.

11 years agoRename "set debug coff_pe_read" command to "set debug coff-pe-read".
Pedro Alves [Wed, 27 Mar 2013 09:47:41 +0000 (09:47 +0000)]
Rename "set debug coff_pe_read" command to "set debug coff-pe-read".

Hyphens are much more common than underscores in command names.

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

* coff-pe-read.c (_initialize_coff_pe_read): Rename "set debug
coff_pe_read" command to "set debug coff-pe-read".

11 years agorecord: fix instruction-history-size regression
Markus Metzger [Wed, 27 Mar 2013 09:42:47 +0000 (09:42 +0000)]
record: fix instruction-history-size regression

* record.c (command_size_to_target_size): Fix size comparison.
Change parameter type from pointer to integer to integer.
Update all users.

11 years ago * windows-nat.c (handle_output_debug_string): Avoid typecast
Pierre Muller [Wed, 27 Mar 2013 08:57:09 +0000 (08:57 +0000)]
* windows-nat.c (handle_output_debug_string): Avoid typecast
from integer of different size warning.

11 years ago * gdb.base/dprintf.exp: Fix typo preventing "dprintf info 2"
Keith Seitz [Wed, 27 Mar 2013 05:28:57 +0000 (05:28 +0000)]
* gdb.base/dprintf.exp: Fix typo preventing "dprintf info 2"
from passing.

11 years ago*** empty log message ***
gdbadmin [Wed, 27 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago PR binutils/15206
Alan Modra [Tue, 26 Mar 2013 23:55:54 +0000 (23:55 +0000)]
PR binutils/15206
* dwarf.c (read_and_display_attr_value): Cast format '*' arg to int.

11 years agowindows-nat.c: Add empty line after local block variable definitions.
Joel Brobecker [Tue, 26 Mar 2013 23:40:08 +0000 (23:40 +0000)]
windows-nat.c: Add empty line after local block variable definitions.

gdb/ChangeLog:

        * windows-nat.c (handle_output_debug_string): Add empty line
        after local block variable definition.

11 years agodaily update
Alan Modra [Tue, 26 Mar 2013 23:00:04 +0000 (23:00 +0000)]
daily update

11 years agooops - fix PR attributation
Nick Clifton [Tue, 26 Mar 2013 22:52:05 +0000 (22:52 +0000)]
oops - fix PR attributation

11 years ago PR binutils/15205
Nick Clifton [Tue, 26 Mar 2013 22:51:12 +0000 (22:51 +0000)]
PR binutils/15205
* dwarf.c (SAFE_BYTE_GET): New macro - checks remaining buffer
space before calling byte_get.
(SAFE_BYTE_GET_AND_INC): New macro.
(SAFE_SIGNED_BYTE_GET): New macro.
(SAFE_SIGNED_BYTE_GET_AND_INC): New macro.
(SAFE_BYTE_GET64): New macro.
(process_extened_line_op): Use new macros.  Use strnlen when
appropriate.
(fetch_indirect_string): Likewise.
(get_FORM_name): Likewise.
(decode_location_expression): Likewise.
(read_and_display_attr_value): Likewise.
(process_debug_info): Likewise.
(display_debug_lines_raw): Likewise.
(display_debug_lines_decoded): Likewise.
(display_debug_pubnames): Likewise.
(display_debug_macinfo): Likewise.
(get_line_filename_and_dirname): Likewise.
(display_debug_macro): Likewise.
(display_loc_list): Likewise.
(display_loc_list_dwo): Likewise.
(display_debug_aranges): Likewise.
(display_debug_ranges): Likewise.
(frame_display_row): Likewise.
(display_debug_frames): Likewise.

11 years agoser-tcp.c: Small signed->unsigned cleanup.
Pedro Alves [Tue, 26 Mar 2013 20:29:47 +0000 (20:29 +0000)]
ser-tcp.c: Small signed->unsigned cleanup.

The "set tcp connect-timeout" variable is unsigned:

  /* Timeout period for connections, in seconds.  */

  static unsigned int tcp_retry_limit = 15;

And used like:

  /* Check for timeout.  */
  if (*polls > tcp_retry_limit * POLL_INTERVAL)
    {
      errno = ETIMEDOUT;
      return -1;
    }

Which made me stop and look over why is it that 'polls' is signed.
What I found is there's really no reason.

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

* ser-tcp.c (wait_for_connect): Make 'polls' parameter unsigned.
(net_open): Make 'polls' local unsigned.

11 years agoMake "set/show remoteaddresssize" a zuinteger command instead of uinteger.
Pedro Alves [Tue, 26 Mar 2013 20:19:31 +0000 (20:19 +0000)]
Make "set/show remoteaddresssize" a zuinteger command instead of uinteger.

It makes no sense to talk about an "unlimited" address size in this
context.

 (gdb) show remoteaddresssize
 The maximum size of the address (in bits) in a memory packet is 0.
 (gdb) set remoteaddresssize 0
 (gdb) show remoteaddresssize
 The maximum size of the address (in bits) in a memory packet is unlimited.

"set remoteaddresssize 0" mapping to UINT_MAX means you can't
force gdb through this path twice in the same GDB run:

  static CORE_ADDR
  remote_address_masked (CORE_ADDR addr)
  {
    unsigned int address_size = remote_address_size;

    /* If "remoteaddresssize" was not set, default to target address size.  */
    if (!address_size)
      address_size = gdbarch_addr_bit (target_gdbarch ());

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

* remote.c (_initialize_remote): Make "set remoteaddresssize"
a zuinteger command instead of uinteger.

11 years agorecord-full.c: Remove always true checks.
Pedro Alves [Tue, 26 Mar 2013 20:01:03 +0000 (20:01 +0000)]
record-full.c: Remove always true checks.

The "set record full insn-number-max" command is an uinteger command.
If the variable that holds the maximum count of logged instructions is
unsigned, it's better if the variable that holds the current number of
logged instructions is also unsigned.  Looking over the code, there's
no case the variable could end up negative.

Then, tests like "if (record_full_insn_max_num)" are always true,
because being a uinteger command means that "set record full
insn-number-max 0" is actually mapped to UINT_MAX internally.  IOW,
the command's variable is never 0.  The checks might make some sense
if 0 wasn't mapped to UINT_MAX, and 0 meant unlimited, but, that's not
how things work.

Tested on x86_64 Fedora 17.

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

* record-full.c (record_full_insn_num): Make it unsigned.
(record_full_check_insn_num, record_full_message)
(record_full_registers_change, record_full_xfer_partial): Remove
record_full_insn_max_num check (it's always != 0).
(record_full_info, record_full_restore): Use %u as format string.
(): Use %u as format string.
(set_record_full_insn_max_num): Remove record_full_insn_max_num
check (it's always != 0).

11 years agoMake "set/show dcache line-size" and "set/show dcache size" zinteger commands instead...
Pedro Alves [Tue, 26 Mar 2013 19:16:05 +0000 (19:16 +0000)]
Make "set/show dcache line-size" and "set/show dcache size" zinteger commands instead of uinteger.

It doesn't make sense to request an "unlimited" dcache.  You want to
configure the cache with specific lines and length of lines.

It doesn't actually work anyway:

  (gdb) set dcache line-size 0
  Invalid dcache line size: 4294967295 (must be power of 2).

  (gdb) set dcache size 0
  (gdb) show dcache size
  Number of dcache lines is unlimited.

  (gdb) info dcache
  Dcache 4294967295 lines of 64 bytes each.
  No data cache available.

The code already has guards in place to forbid 0s:

static void
set_dcache_size (char *args, int from_tty,
 struct cmd_list_element *c)
{
  if (dcache_size == 0)
    {
      dcache_size = DCACHE_DEFAULT_SIZE;
      error (_("Dcache size must be greater than 0."));
    }
  if (last_cache)
    dcache_invalidate (last_cache);
}

static void
set_dcache_line_size (char *args, int from_tty,
      struct cmd_list_element *c)
{
  if (dcache_line_size < 2
      || (dcache_line_size & (dcache_line_size - 1)) != 0)
    {
      unsigned d = dcache_line_size;
      dcache_line_size = DCACHE_DEFAULT_LINE_SIZE;
      error (_("Invalid dcache line size: %u (must be power of 2)."), d);
    }
  if (last_cache)
    dcache_invalidate (last_cache);
}

So we now get:

  (gdb) set dcache line-size 0
  Invalid dcache line size: 0 (must be power of 2).
  (gdb) set dcache size 0
  Dcache size must be greater than 0.

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

* dcache.c (_initialize_dcache): Make the "set dcache line-size"
and "set dcache size" commands zuinteger instead of uinteger.

11 years agoMake "set/show cris-version" a zuinteger instead of uinteger.
Pedro Alves [Tue, 26 Mar 2013 18:55:51 +0000 (18:55 +0000)]
Make "set/show cris-version" a zuinteger instead of uinteger.

Being a uinteger means you revert back to having GDB decide the
version.  It makes no sense to have an "unlimited" version.

  (gdb) show cris-version
  The current CRIS version is 0.
  (gdb) set cris-version 0
  (gdb) show cris-version
  The current CRIS version is unlimited.
  (gdb)

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

* cris-tdep.c (_initialize_cris_tdep): Make the "set cris-version"
command zuinteger instead of uinteger.

11 years agoMake "set/show debug coff_pe_read" a zuinteger instead of uinteger.
Pedro Alves [Tue, 26 Mar 2013 18:40:46 +0000 (18:40 +0000)]
Make "set/show debug coff_pe_read" a zuinteger instead of uinteger.

Being a uinteger means you can't disable debug output after enabling it...

  (gdb) show debug coff_pe_read
  Coff PE read debugging is 0.
  (gdb) set debug coff_pe_read 0
  (gdb) show debug coff_pe_read
  Coff PE read debugging is unlimited.
  (gdb)

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

* coff-pe-read.c (_initialize_coff_pe_read): Make the command
zuinteger instead of uinteger.

11 years agoGet rid of "No such file or directory" in the testsuite's btrace support detection.
Pedro Alves [Tue, 26 Mar 2013 18:26:05 +0000 (18:26 +0000)]
Get rid of "No such file or directory" in the testsuite's btrace support detection.

When I tried running the btrace tests, I noticed something odd in the gdb.log file:

 (gdb) run
 Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.x
 Breakpoint 1, main () at /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.c:1
 1       /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.c: No such file or directory.
                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^
 (gdb) record btrace
 Target does not support branch tracing.
 (gdb) testcase ../../../src/gdb/testsuite/gdb.btrace/enable.exp completed in 0 seconds

I knew that the btrace tests on my machine weren't supposed to work,
but still, that error made me wonder if the test had something broken,
and waste a few minutes looking up where that is coming from.

The issue is that the btrace detection deletes the source file right
after compiling it, and before GDB has a chance to open it.  It's
really harmless, but I'd rather spare others from going through the
same exercise.

We now get the regular:

 (gdb) run
 Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace24210.x
 ...
 Breakpoint 1, main () at /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace24210.c:1
 1       int main(void) { return 0; }
 ...

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

* lib/gdb.exp (skip_btrace_tests): Delay deleting the source file
until after GDB has run.

11 years ago"set record instruction-history-size"/"set record function-call-history-size" range...
Pedro Alves [Tue, 26 Mar 2013 18:03:03 +0000 (18:03 +0000)]
"set record instruction-history-size"/"set record function-call-history-size" range validation.

While the commands are uinteger, the target interfaces are limited to
INT_MAX.  Don't let the user request more than we can handle.

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

* record.c (record_insn_history_size_setshow_var)
(record_call_history_size_setshow_var): New globals.
(command_size_to_target_size): New function.
(cmd_record_insn_history, cmd_record_call_history): Use
command_size_to_target_size instead of cast.
(validate_history_size, set_record_insn_history_size)
(set_record_call_history_size): New functions.
(_initialize_record): Install set_record_insn_history_size and
set_record_call_history_size as "set" hooks of "set record
instruction-history-size" and "set record
function-call-history-size".

11 years agosim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify things
Mike Frysinger [Tue, 26 Mar 2013 18:00:04 +0000 (18:00 +0000)]
sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify things

There's no need to put the majority of the logic into the 3rd arg of the
AC_ARG_ENABLE.  Coupled with the lack of indentation, it makes it hard to
follow, error prone to update, and duplicates code (with the 4th arg).

So pull the logic out of the 3rd arg and outside of the AC_ARG_ENABLE
macro.  This allows us to gut the 4th arg entirely, merge with the code
that followed the macro, and fix bugs related to the new dv-sockser in
the process.

Hopefully building the various sims with the default sim-hardware
settings, as well as with explicit --{dis,en}able-sim-hardware flags,
should all just work now.

11 years agoUse readline's 'history_max_entries' instead of the old 'max_input_history'.
Pedro Alves [Tue, 26 Mar 2013 16:47:02 +0000 (16:47 +0000)]
Use readline's 'history_max_entries' instead of the old 'max_input_history'.

Ref: http://www.sourceware.org/ml/gdb-patches/2002-08/msg00486.html

We've long since imported a newer readline, no need to use the old
compatibility variable anymore.

Tested on x86_64 Fedora 17.

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

* top.c (gdb_rl_operate_and_get_next): Replace max_input_history
use with history_max_entries use.  Remove FIXME note.

11 years ago PR gas/15295
Nick Clifton [Tue, 26 Mar 2013 14:16:59 +0000 (14:16 +0000)]
PR gas/15295
* listing.c (rebuffer_line): Rewrite to avoid seeking back to the
start of the file each time.

11 years ago PR gas/15178
Nick Clifton [Tue, 26 Mar 2013 13:49:12 +0000 (13:49 +0000)]
PR gas/15178
* config/tc-sparc.h (ELF_TARGET_FORMAT): Set to elf32-sparc for
FreeBSD targets.

11 years agogdb/testsuite/
Yao Qi [Tue, 26 Mar 2013 12:46:24 +0000 (12:46 +0000)]
gdb/testsuite/
* gdb.trace/actions.c, gdb.trace/circ.c: Add license header.
* gdb.trace/collection.c, gdb.trace/tfile.c: Likewise.

11 years agoFix typo in added CL entry.
Tristan Gingold [Tue, 26 Mar 2013 09:14:31 +0000 (09:14 +0000)]
Fix typo in added CL entry.

11 years agogas/
Tristan Gingold [Tue, 26 Mar 2013 09:13:17 +0000 (09:13 +0000)]
gas/
2013-03-26  Douglas B Rupp  <rupp@gnat.com>

* config/tc-ia64.c (emit_one_bundle): Move last_slot adjustment
after fixup.

gas/testsuite/
2013-03-26  Douglas B Rupp  <rupp@adacore.com

* gas/ia64/ia64.exp: Add new test reloc-mlx
* gas/ia64/reloc-mlx.[sd]: New test for X-unit reloc.
* gas/ia64/pcrel.d: Fix output for X-unit reloc.

11 years agorecord-btrace: fix assertion when enabling recording after re-run
Markus Metzger [Tue, 26 Mar 2013 07:15:09 +0000 (07:15 +0000)]
record-btrace: fix assertion when enabling recording after re-run

Reading symbols from /bin/true...(no debugging symbols found)...done.
(gdb) b _start
Function "_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_start) pending.
(gdb) r
Starting program: /bin/true

Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) rec b
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /bin/true

Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) rec b
gdb/record-btrace.c:154: internal-error: record_btrace_open:
 Assertion `record_btrace_thread_observer == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

gdb/
* record-btrace.c (record_btrace_close): Call
record_btrace_auto_disable.

testsuite/
* gdb.btrace/enable.exp: Add regression test.

11 years ago * elflink.c (_bfd_elf_add_default_symbol): Preserve section
Alan Modra [Tue, 26 Mar 2013 07:02:52 +0000 (07:02 +0000)]
* elflink.c (_bfd_elf_add_default_symbol): Preserve section
over _bfd_elf_merge_symbol calls.

11 years ago * elflink.c (elf_link_add_object_symbols): Add assertion for
Alan Modra [Tue, 26 Mar 2013 06:08:14 +0000 (06:08 +0000)]
* elflink.c (elf_link_add_object_symbols): Add assertion for
common override alignment check code.  Formatting.

11 years agoDelete rs6000-nat.c:fixup_breakpoints extern declaration.
Joel Brobecker [Tue, 26 Mar 2013 00:13:08 +0000 (00:13 +0000)]
Delete rs6000-nat.c:fixup_breakpoints extern declaration.

This function does not exist...

gdb/ChangeLog:

        * rs6000-nat.c (fixup_breakpoints): Delete declaration.

11 years ago*** empty log message ***
gdbadmin [Tue, 26 Mar 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Mon, 25 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years ago * contrib/cc-with-tweaks.sh: Check exit code of dwp.
Doug Evans [Mon, 25 Mar 2013 22:53:54 +0000 (22:53 +0000)]
* contrib/cc-with-tweaks.sh: Check exit code of dwp.

11 years ago * ld.texinfo (--disable-runtime-pseudo-reloc): Adjust default.
Kai Tietz [Mon, 25 Mar 2013 18:09:04 +0000 (18:09 +0000)]
    * ld.texinfo (--disable-runtime-pseudo-reloc): Adjust default.

11 years ago PR symtab/11462:
Tom Tromey [Mon, 25 Mar 2013 17:28:03 +0000 (17:28 +0000)]
PR symtab/11462:
* c-exp.y (exp): Add new productions for destructors after '.' and
'->'.
(write_destructor_name): New function.
gdb/testsuite
* gdb.cp/m-static.exp: Add destructor-printing tests.

11 years ago PR c++/9197:
Tom Tromey [Mon, 25 Mar 2013 17:26:18 +0000 (17:26 +0000)]
PR c++/9197:
* opencl-lang.c (evaluate_subexp_opencl) <STRUCTOP_STRUCT>: Use
value_struct_elt, not lookup_struct_elt_type.
* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT,
STRUCTOP_PTR>: Use value_struct_elt, not lookup_struct_elt_type.
* expression.h (EVAL_AVOID_SIDE_EFFECTS): Update comment.
gdb/testsuite
* gdb.cp/m-static.exp: Add constructor ptype tests.
* gdb.cp/m-static.cc (single_constructor): New class.
(main): Make instance of single_constructor.

11 years ago PR binutils/15202
Nick Clifton [Mon, 25 Mar 2013 13:16:41 +0000 (13:16 +0000)]
PR binutils/15202
* dwarf.c (read_leb128): Add END parameter.  Do not read at or
beyond end.
(read_sleb128): Add END parameter.
(read_uleb128): New function.
(process_extended_line_op): Pass END to leb128 functions.
(process_abbrev_section): Likewise.
(decode_location_expression): Likewise.
(read_and_display_attr_value): Likewise.
(read_and_display_attr): Likewise.
(process_debug_info): Likewise.
(display_debug_lines_raw): Likewise.
(display_debug_lines_decoded): Likewise.
(display_debug_macinfo): Likewise.
(get_line_filename_and_dirname): Likewise.
(display_debug_macro): Likewise.
(display_loc_list_dwo): Likewise.
(display_debug_ranges): Likewise.
* dwarf.h (read_leb128): Update prototype.
* readelf.c (read_uleb128): Add END parameter.
(decode_arm_unwind_bytecode): Pass END to read_uleb128.
(decode_tic6x_unwind_bytecode): Likewise.
(display_tag_value): New function.
(display_arm_attribute): Add END parameter. Pass END to
read_uleb128.  Use display_tag_value.
(display_gnu_attribute): Likewise.
(display_power_gnu_attribute): Likewise.
(display_sparc_gnu_attribute): Likewise.
(display_mips_gnu_attribute): Likewise.
(display_tic6x_attribute): Likewise.
(process_attributes): Likewise.
(display_raw_attribute): New function.

11 years agogdb/
Yao Qi [Mon, 25 Mar 2013 10:55:28 +0000 (10:55 +0000)]
gdb/

* ctf.c [USE_WIN32API]: Undef 'mkdir' and use 'mkdir'
instead of '_mkdir'.

11 years ago * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
Alan Modra [Mon, 25 Mar 2013 06:12:06 +0000 (06:12 +0000)]
* elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
usual common symbols as well as for dynamic.  Add poldbfd param.
Save old bfd.  Adjust callers.
(_bfd_elf_add_default_symbol): Add poldbfd param.  Pass "section"
and "value" by value, not pointer.  Adjust caller.
(elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
Delete code to set same.  Use old_bfd and old_alignment from
_bfd_elf_merge_symbol instead.  Add default symbol before
alignment and size checks.  Wrap overlong lines.

11 years ago * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
Alan Modra [Mon, 25 Mar 2013 06:06:35 +0000 (06:06 +0000)]
* elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
(elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
when override is true.

11 years ago * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
Alan Modra [Mon, 25 Mar 2013 06:03:48 +0000 (06:03 +0000)]
* elflink.c (_bfd_elf_merge_symbol): Use local var holding value
of *sym_hash.

11 years ago * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
Alan Modra [Mon, 25 Mar 2013 06:02:28 +0000 (06:02 +0000)]
* elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
Wrap long lines.
(elf_link_add_object_symbols): Discard TLS symbols for --just-syms
early in symbol loop.

11 years ago * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
Alan Modra [Mon, 25 Mar 2013 06:00:06 +0000 (06:00 +0000)]
* elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
(_bfd_elf_init_reloc_shdr): Delete.
* elf.c (_bfd_elf_init_reloc_shdr): Make static.
* elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
just what is needed.
* elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.

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

11 years agodaily update
Alan Modra [Sun, 24 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update

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

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

11 years ago2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill [Sat, 23 Mar 2013 15:08:07 +0000 (15:08 +0000)]
2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>

* configure.ac: Use $SIM_DV_SOCKSER_O.
* configure: Regenerated.

11 years ago2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill [Sat, 23 Mar 2013 15:07:30 +0000 (15:07 +0000)]
2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>

* configure.ac: Fail if dv-sockser.o not available.
Error when --disable-sim-hardware is specified.
* configure: Regenerated.

11 years ago2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill [Sat, 23 Mar 2013 15:06:59 +0000 (15:06 +0000)]
2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>

* configure.ac: Fail if dv-sockser.o not available.
Error when --disable-sim-hardware is specified.
* tconfig.in: Conditionalize use of dv_sockser_install.
* configure: Regenerated.
* config.in: Regenerated.

11 years ago2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill [Sat, 23 Mar 2013 15:05:07 +0000 (15:05 +0000)]
2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>

* configure.ac: Address use of dv-sockser.o.
* tconfig.in: Conditionalize use of dv_sockser_install.
* configure: Regenerated.
* config.in: Regenerated.

11 years ago2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill [Sat, 23 Mar 2013 15:03:01 +0000 (15:03 +0000)]
2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>

* acinclude.m4: Add SIM_DV_SOCKSER_O which is empty  on hosts
which do not support dv-sockser.o.  Add always as option to
first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware
is always required to be enabled by simulator.

11 years agoFix relocation of directories in the MinGW build.
Eli Zaretskii [Sat, 23 Mar 2013 10:48:23 +0000 (10:48 +0000)]
Fix relocation of directories in the MinGW build.

 windows-nat.c (windows_get_absolute_argv0): New function.
 windows-nat.h: Add its prototype.
 main.c (get_init_files): Use filename_ncmp instead of strncmp.
 Use IS_DIR_SEPARATOR instead of looking for a character inside
 SLASH_STRING.  Include filenames.h.
 (captured_main) [__MINGW32__]: Make argv[0] absolute, so that
 relocate_gdb_directory works when passed gdb_program_name.
 Include windows-nat.h.

11 years ago * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
Alan Modra [Sat, 23 Mar 2013 10:25:02 +0000 (10:25 +0000)]
* elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
* elflink.c (_bfd_elf_merge_symbol): Make static.
* elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
_bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.

11 years ago*** empty log message ***
gdbadmin [Sat, 23 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago PR ld/15270
Alan Modra [Fri, 22 Mar 2013 23:35:55 +0000 (23:35 +0000)]
PR ld/15270
* elflink.c (elf_link_add_object_symbols): Don't set def_regular
or ref_regular for BFD_PLUGIN owned syms, or have them affect
def_dynamic/ref_dynamic.
(_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
owned syms.

11 years agosrc-release: fix version look up for bfd based projects
Mike Frysinger [Fri, 22 Mar 2013 23:16:40 +0000 (23:16 +0000)]
src-release: fix version look up for bfd based projects

11 years agodaily update
Alan Modra [Fri, 22 Mar 2013 23:00:06 +0000 (23:00 +0000)]
daily update

11 years agogdb/
Jan Kratochvil [Fri, 22 Mar 2013 20:39:29 +0000 (20:39 +0000)]
gdb/
* exceptions.h (enum errors): New entry TARGET_CLOSE_ERROR.
* remote.c (trace_error): Remove the special handling of '2'.
(readchar) <SERIAL_EOF>
(readchar) <SERIAL_ERROR>
(getpkt_or_notif_sane_1): Use TARGET_CLOSE_ERROR for them.
(remote_get_trace_status): Call throw_exception if EX is
TARGET_CLOSE_ERROR.
* utils.c (perror_with_name): Rename to ...
(throw_perror_with_name): ... here.  New parameter errcode, describe it
in the function comment.
(perror_with_name): New function wrapper.
* utils.h (enum errors): New stub declaration.
(throw_perror_with_name): New declaration.

gdb/testsuite/
* gdb.server/server-kill.c: New file.
* gdb.server/server-kill.exp: New file.

11 years agoSubject: Fix range validation of integer commands with "unlimited".
Pedro Alves [Fri, 22 Mar 2013 20:25:40 +0000 (20:25 +0000)]
Subject: Fix range validation of integer commands with "unlimited".

The range validation added by

  http://sourceware.org/ml/gdb-patches/2013-03/msg00767.html

Changes things to allow setting the command to INT_MAX or UINT_MAX
directly, with signed and unsigned commands respectively.  However,
that went a little bit too far, as in the cases of var_integer and
var_uinteger, those values are actually implementation detail.  It's
better to not expose them in the interface, and have users assume
those values mean "unlimited" too, so to be safer to expand the range
of the commands in the future if we want to.  Yes, it's pedantic, and
it's not likely users actually will do this, but MI frontends and
Python scripts might.

gdb/
2013-03-22  Pedro Alves  <palves@redhat.com>
    Yao Qi  <yao@codesourcery.com>
    Mark Kettenis  <kettenis@gnu.org>

* cli/cli-setshow.c (do_set_command) <var_uinteger>:
Don't let the user set the value to UINT_MAX directly.
<var_integer>: Don't let the user set the value to INT_MAX
directly.