]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
10 years agoFix crash when section ends with a .lloc directive not followed by an insn. users/ccoutant/two-level-line-tables
Cary Coutant [Wed, 25 Mar 2015 22:27:52 +0000 (15:27 -0700)] 
Fix crash when section ends with a .lloc directive not followed by an insn.

gas/
* dwarf2dbg.c (emit_logicals): Handle case where e->label is NULL.

10 years agoImprove ODR checking.
Cary Coutant [Mon, 9 Feb 2015 23:58:57 +0000 (15:58 -0800)] 
Improve ODR checking.

2015-02-09  Cary Coutant  <ccoutant@google.com>

gold/
* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Fix debug
output to print correct context.
(Sized_dwarf_line_info::do_addr2line): Add debug output. Return
up to 4 more locations at the beginning of the function.
* symtab.cc (Symbol_table::detect_odr_violations): Get canonical
result before sorting list of line numbers.

10 years agoSupport compressed debug in dyn objects.
Cary Coutant [Mon, 9 Feb 2015 23:58:33 +0000 (15:58 -0800)] 
Support compressed debug in dyn objects.

2015-02-09  Cary Coutant  <ccoutant@google.com>

gold/
* dwp.cc (Sized_relobj_dwo::do_decompressed_section_contents): Delete.
(Sized_relobj_dwo::setup): Setup map of compressed sections.
(print_version): Update copyright.
* dynobj.cc (Sized_dynobj::base_read_symbols): Set up map of compressed
sections.
* object.cc (Sized_relobj_file::compressed_sections): Delete.
(build_compressed_section_map): Add decompress_if_needed parameter.
Adjust callers.
(Sized_relobj_file::do_find_special_sections): Set compressed sections
map in Object base class.
(Sized_relobj_file::do_decompressed_section_contents): Rename to
Object::decompressed_section_contents.
(Sized_relobj_file::do_discard_decompressed_sections): Rename to
Object::discard_decompressed_sections.
* object.h (Object::compressed_sections_): New data member.
(Object::section_is_compressed): Remove virtual, implement here.
(Object::decompressed_section_contents): Remove virtual.
(Object::do_section_is_compressed): Delete.
(Object::do_decompressed_section_contents): Delete.
(Object::set_compressed_sections): New method.
(Object::compressed_sections): New method.
(Sized_relobj_file::do_section_is_compressed): Delete.
(Sized_relobj_file::do_decompressed_section_contents): Delete.
(Sized_relobj_file::do_discard_decompressed_sections): Delete.
(Sized_relobj_file::compressed_sections): Delete.

10 years agoAdd gold support for two-level line tables.
Cary Coutant [Fri, 30 Jan 2015 12:22:19 +0000 (04:22 -0800)] 
Add gold support for two-level line tables.

2015-01-30  Cary Coutant  <ccoutant@google.com>

elfcpp/
* dwarf.h (enum DW_LNS): Add experimental two-level line table opcodes.
(enum DW_LNCT): New enum for DWARF-5.

gold/
* debug.h (DEBUG_LOCATION): New constant.
(debug_string_to_enum): Add DEBUG_LOCATION.
* dwarf_reader.cc (struct LineStateMachine): Add context field.
(ResetLineStateMachine): Likewise.
(Sized_dwarf_line_info::Sized_dwarf_line_info): Add support for
two-level line tables.
(Sized_dwarf_line_info::read_header_prolog): Likewise. Also add
support for DWARF-3+ line tables.
(Sized_dwarf_line_info::read_header_tables_v5): New method.
(Sized_dwarf_line_info::process_one_opcode): Add support for two-level
line tables.
(Sized_dwarf_line_info::read_lines): Likewise.
(Sized_dwarf_line_info::read_line_mappings): Likewise.
(Sized_dwarf_line_info::do_addr2line): Add debug output.
* dwarf_reader.h (Sized_dwarf_line_info::~Sized_dwarf_line_info):
Delete str_buffer_start_.
(DWARF5_EXPERIMENTAL_LINE_TABLE): New constant.
(Sized_dwarf_line_info::read_header_tables_v5): New method.
(Sized_dwarf_line_info::read_lines): Update prototype.
(Sized_dwarf_line_info::process_one_opcode): Likewise.
(Sized_dwarf_line_info::max_ops_per_insn): New data member.
(Sized_dwarf_line_info::str_buffer_): New data member.
(Sized_dwarf_line_info::str_buffer_end_): New data member.
(Sized_dwarf_line_info::str_buffer_start_): New data member.
(Sized_dwarf_line_info::end_of_header_length_): New data member.
(Sized_dwarf_line_info::logicals_start_): New data member.
(Sized_dwarf_line_info::actuals_start_): New data member.
(Sized_dwarf_line_info::end_of_unit_): New data member.

10 years agoFix formatting.
Cary Coutant [Fri, 6 Feb 2015 21:09:21 +0000 (13:09 -0800)] 
Fix formatting.

2015-02-06  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (display_debug_lines_raw): Fix formatting.

10 years agoFor ODR checking, when we see two .lloc directives in a row, output them both.
Cary Coutant [Fri, 30 Jan 2015 12:16:46 +0000 (04:16 -0800)] 
For ODR checking, when we see two .lloc directives in a row, output them both.

2015-01-30  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (dwarf2_directive_loc): Always emit extra .lloc.

10 years agoReformat experimental header for compatibility with old DWARF consumers.
Cary Coutant [Thu, 29 Jan 2015 06:05:06 +0000 (22:05 -0800)] 
Reformat experimental header for compatibility with old DWARF consumers.

2015-01-28  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (read_debug_line_header): Adjust to reformatted header.
(display_line_program): Add missing space in output.
(display_debug_lines_raw): Adjust to reformatted header.
* dwarf.h (DWARF2_Internal_LineInfo): Remove li_actuals_table_offset.

10 years agoReformat experimental header for compatibility with old DWARF consumers.
Cary Coutant [Thu, 29 Jan 2015 06:01:38 +0000 (22:01 -0800)] 
Reformat experimental header for compatibility with old DWARF consumers.

Old consumers will now see a DWARF-4 header, with new fields added at the
end of the header. The new fields and the entire logicals and actuals
tables are wrapped in a single extended opcode so that old consumers
will see just the single opcode.

2015-01-28  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (line_base): New variable.
(line_range): New variable.
(DWARF2_EXPERIMENTAL_LINE_OPCODE_BASE): Rename.
(DWARF2_LINE_BASE): Restore to original value.
(DWARF2_LINE_RANGE): Likewise.
(DWARF5_EXPERIMENTAL_LINE_BASE): New macro.
(DWARF5_EXPERIMENTAL_LINE_RANGE): New macro.
(SPECIAL_LINE): Use line_base, line_range.
(size_inc_line_addr): Likewise.
(emit_inc_line_addr): Likewise.
(out_debug_line): Reformat header for compatibility with old DWARF
consumers.

10 years agoSome minor cleanups in two-level line table support.
Cary Coutant [Wed, 28 Jan 2015 19:22:01 +0000 (11:22 -0800)] 
Some minor cleanups in two-level line table support.

2015-01-28  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (free_logicals): Set logicals_table to NULL.
(fetch_indirect_string): Correct boundary check.
(fetch_indirect_line_string): Likewise.
(fetch_indexed_string): Likewise.
(display_dir_file_table_v5): Print unsigned value.

10 years agoFix to read signed LEB128 for operand to DW_LNS_set_address_from_logical.
Cary Coutant [Mon, 26 Jan 2015 23:02:54 +0000 (15:02 -0800)] 
Fix to read signed LEB128 for operand to DW_LNS_set_address_from_logical.

2015-01-26  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (display_line_program): Operand to
DW_LNS_set_address_from_logical is signed.

10 years agoReset discriminator after each row.
Cary Coutant [Mon, 26 Jan 2015 20:21:11 +0000 (12:21 -0800)] 
Reset discriminator after each row.

2015-01-26  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (display_line_program): Reset discriminator after each row.

10 years agoSet entsize for .debug_line_str section.
Cary Coutant [Sat, 24 Jan 2015 00:34:27 +0000 (16:34 -0800)] 
Set entsize for .debug_line_str section.

2015-01-23  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (dwarf2_finish): Set entsize for .debug_line_str section.

10 years agoEmit address_size and segment_size for version 5 line number tables.
Cary Coutant [Fri, 23 Jan 2015 21:53:30 +0000 (13:53 -0800)] 
Emit address_size and segment_size for version 5 line number tables.

2015-01-23  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (out_debug_line): Emit address_size and segment_size
for version 5 line number tables.

10 years agoAdd address_size and segment_size to line number program header version 5.
Cary Coutant [Fri, 23 Jan 2015 21:51:56 +0000 (13:51 -0800)] 
Add address_size and segment_size to line number program header version 5.

2015-01-23  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.h (struct DWARF2_Internal_LineInfo): Add li_address_size and
li_segment_size.
* dwarf.c (read_debug_line_header): Read li_address_size and
li_segment_size.
(display_debug_lines_raw): Print li_address_size and li_segment_size.

10 years agoUpdate DW_LNS_opcodes for two-level line tables.
Cary Coutant [Fri, 23 Jan 2015 21:14:41 +0000 (13:14 -0800)] 
Update DW_LNS_opcodes for two-level line tables.

2015-01-23  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (append_logical): Fix format string.
(display_line_program): Replace DW_LNS_set_context with
DW_LNS_inlined_call. Fix format strings.

10 years agoUpdate DW_LNS opcodes for two-level line tables.
Cary Coutant [Fri, 23 Jan 2015 21:12:29 +0000 (13:12 -0800)] 
Update DW_LNS opcodes for two-level line tables.

2015-01-23  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (emit_logicals): Increase max number of
DW_LNS_pop_context opcodes. Change DW_LNS_set_context
to DW_LNS_inlined_call.
(out_debug_line): Adjust operand lengths array.

10 years agoUpdate DW_LNS opcodes.
Cary Coutant [Fri, 23 Jan 2015 21:09:15 +0000 (13:09 -0800)] 
Update DW_LNS opcodes.

2015-01-23  Cary Coutant  <ccoutant@google.com>

include/
* dwarf2.h (enum dwarf_line_number_ops): Remove
DW_LNS_set_context, add DW_LNS_inlined_call; renumber
new opcodes.

10 years agoTrack discriminator when processing line number table.
Cary Coutant [Thu, 22 Jan 2015 00:01:18 +0000 (16:01 -0800)] 
Track discriminator when processing line number table.

2015-01-21  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (process_extended_line_op): Track discriminator.

10 years agoIgnore line tables whose versions we don't support.
Cary Coutant [Wed, 21 Jan 2015 23:45:55 +0000 (15:45 -0800)] 
Ignore line tables whose versions we don't support.

2015-01-21  Cary Coutant  <ccoutant@google.com>

gold/
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Check
line table version number.
(Sized_dwarf_line_info::read_line_mappings): Likewise.

10 years agoSilence "may be uninitialized" warnings.
Cary Coutant [Wed, 21 Jan 2015 23:43:52 +0000 (15:43 -0800)] 
Silence "may be uninitialized" warnings.

2015-01-21  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (display_debug_lines_raw): Silence "may be uninitialized"
warnings.

10 years agoFix bugs displaying DW_LNS_set_context and DW_LNS_pop_context.
Cary Coutant [Thu, 15 Jan 2015 21:51:18 +0000 (13:51 -0800)] 
Fix bugs displaying DW_LNS_set_context and DW_LNS_pop_context.

2015-01-15  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (append_logical): Print summary for each logical row.
(display_line_program): Remove incorrect consumption of an LEB128
when reading DW_LNS_set_context and DW_LNS_pop_context.

10 years agoFix problems with DW_LNS_pop_context in logicals table.
Cary Coutant [Thu, 15 Jan 2015 21:48:31 +0000 (13:48 -0800)] 
Fix problems with DW_LNS_pop_context in logicals table.

2015-01-15  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (emit_logicals): Fix bug in generating
DW_LNS_pop_context.
(process_entries): Don't always emit DW_LNS_set_address_from_logical
when crossing frag boundaries.

10 years agoAdd support for DWARF-5 and experimental two-level line number tables.
Cary Coutant [Wed, 7 Jan 2015 00:56:43 +0000 (16:56 -0800)] 
Add support for DWARF-5 and experimental two-level line number tables.

http://wiki.dwarfstd.org/index.php?title=TwoLevelLineTables

2015-01-06  Cary Coutant  <ccoutant@google.com>

binutils/
* dwarf.c (struct State_Machine_Registers): Add discriminator,
context, and subprogram.
(reset_state_machine): Likewise.
(logicals_table, logicals_allocated, logicals_count): New variables.
(free_logicals): New function.
(append_logical): New function.
(process_extended_line_op): Add is_logical parameter.
(fetch_indirect_line_string): New function.
(DWARF2_LINE_EXPERIMENTAL_VERSION): New macro.
(read_debug_line_header): Add pinitial_length_size, poffset_size
parameters.  Update all callers.  Check for new line table versions.
(display_directory_table_v4): New function, factored out from
display_debug_lines_raw.
(display_file_name_table_v4): Likewise.
(display_dir_file_table_v5): New function.
(display_line_program): New function, factored out from
display_debug_lines_raw.
(display_debug_lines_raw): Support new line table versions.
(display_debug_lines_decoded): Add missing newline to warning.
(display_debug_lines): Load .debug_line_str section.
(debug_displays): Add .debug_line_str section.
* dwarf.h (DWARF2_Internal_LineInfo): Add li_actuals_table_offset field.
(dwarf_section_display_enum): Add line_str.
* readelf.c (process_section_headers): Add .debug_line_str.

10 years agoUpdate support for DWARF-5 and experimental two-level line number tables.
Cary Coutant [Wed, 7 Jan 2015 00:40:43 +0000 (16:40 -0800)] 
Update support for DWARF-5 and experimental two-level line number tables.

2015-01-06  Cary Coutant  <ccoutant@google.com>

gas/
* dwarf2dbg.c (emit_logicals): Replace DW_LNS_inlined_call with
DW_LNS_set_context and DW_LNS_set_subprogram.
Fix bug where we emit wrong value for line number.
(process_entries): Don't emit DW_LNS_negate_stmt in actuals table.
(out_dwarf5_file_list): Fix bug where dir list or file list is empty.
(out_debug_line): Update table of opcode lengths.

10 years agoUpdate experimental DWARF-5 values for two-level line number tables.
Cary Coutant [Wed, 7 Jan 2015 00:20:14 +0000 (16:20 -0800)] 
Update experimental DWARF-5 values for two-level line number tables.

http://wiki.dwarfstd.org/index.php?title=TwoLevelLineTables

2015-01-06  Cary Coutant  <ccoutant@google.com>

include/
    * dwarf2.h (enum dwarf_line_number_ops): Replace DW_LNS_inlined_call
    with DW_LNS_set_context and DW_LNS_set_subprogram.  Renumber subsequent
    opcodes.

10 years agoAdd support for DWARF-5 and experimental two-level line number tables.
Cary Coutant [Tue, 23 Dec 2014 23:01:40 +0000 (15:01 -0800)] 
Add support for DWARF-5 and experimental two-level line number tables.

2014-12-23  Cary Coutant  <ccoutant@google.com>

gas/
* config/obj-elf.c (elf_pseudo_table): Add .lloc and .subprog
directives.
* dwarf2dbg.h (struct dwarf2_line_info): Add logical field.
(dwarf2_directive_subprog): New function.
(dwarf2_directive_loc): Add is_lloc parameter.
* dwarf2dbg.c: Include "hash.h".
(DWARF2_LINE_EXPERIMENTAL_VERSION): New macro.
(DWARF2_EXPERIMENTAL_LINE_OPCODE_BASE): New macro.
(opcode_base): New static variable.
(DWARF2_LINE_BASE, DWARF2_LINE_RANGE): Adjust parameters.
(DWARF2_LINE_MAX_OPS_PER_INSN): New macro.
(SPECIAL_LINE, SPECIAL_ADDR): Use opcode_base.
(struct subprog_entry): New struct.
(subprogs, subprogs_in_use, subprogs_allocated): New variables.
(struct logicals_entry): New struct.
(logicals, logicals_in_use, logicals_allocated, logicals_with_labels):
New variables.
(struct string_table): New struct.
(debug_line_str_table): New variable.
(current): Add logical field.
(dwarf2_gen_line_info): Fill in symbol and segment for recent logicals.
(dwarf2_where): Add logical field.
(make_subprog_entry): New function.
(make_logical): New function.
(dwarf2_directive_subprog): New function.
(dwarf2_directive_loc): Add is_lloc parameter; add support for .lloc
directive.
(out_set_addr_from_logical): New function.
(size_inc_line_addr): Fix signed/unsigned warnings. Use opcode_base.
(emit_inc_line_addr): Likewise.
(emit_logicals): New function.
(process_entries): Add support for two-level line tables.
(add_to_string_table): New function.
(out_string_table): New function.
(out_dwarf5_file_list): New function.
(out_subprog_list): New function.
(out_debug_line): Add support for DWARF-5 line tables and for
experimental two-level line number tables.
(dwarf2_finish): Likewise.

10 years agoAdd experimental DWARF-5 values for two-level line number tables.
Cary Coutant [Tue, 23 Dec 2014 22:44:58 +0000 (14:44 -0800)] 
Add experimental DWARF-5 values for two-level line number tables.

http://wiki.dwarfstd.org/index.php?title=TwoLevelLineTables

2014-12-23  Cary Coutant  <ccoutant@google.com>

include/
* dwarf2.def (DW_FORM_line_strp): New constant.
* dwarf2.h (enum dwarf_line_number_ops): Add DW_LNS_inlined_call,
DW_LNS_pop_context, DW_LNS_set_address_from_logical.
(enum dwarf_line_number_content_type): Add new DW_LNCT_ codes.

10 years agoCorrect printed year in copyright notices
Alan Modra [Thu, 1 Jan 2015 14:38:15 +0000 (01:08 +1030)] 
Correct printed year in copyright notices

10 years agoChangeLog rotatation and copyright year update
Alan Modra [Thu, 1 Jan 2015 14:15:26 +0000 (00:45 +1030)] 
ChangeLog rotatation and copyright year update

10 years agoUpdate year range in copyright notice of all files owned by the GDB project.
Joel Brobecker [Thu, 1 Jan 2015 09:32:14 +0000 (13:32 +0400)] 
Update year range in copyright notice of all files owned by the GDB project.

gdb/ChangeLog:

        Update year range in copyright notice of all files.

10 years agoUpdate copyright year printed by gdb, gdbserver and gdbreplay.
Joel Brobecker [Thu, 1 Jan 2015 09:24:41 +0000 (13:24 +0400)] 
Update copyright year printed by gdb, gdbserver and gdbreplay.

gdb/ChangeLog:

        * top.c (print_gdb_version): Update copyright year to 2015.

gdbserver/ChangeLog:

        * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
        * server.c (gdbserver_version): Likewise.

10 years agoYearly gdb/ChangeLog rotation.
Joel Brobecker [Thu, 1 Jan 2015 09:21:14 +0000 (13:21 +0400)] 
Yearly gdb/ChangeLog rotation.

This patch renames gdb/'s ChangeLog to ChangeLog-2014 and creates
a new one for 2015. config/djgpp/fnchange.lst is updated accordingly.

gdb/ChangeLog:

  * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Jan 2015 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoRemove "add-shared-symbol-files", "dll-symbols" and "assf" commands doc.
Joel Brobecker [Tue, 30 Dec 2014 07:36:53 +0000 (11:36 +0400)] 
Remove "add-shared-symbol-files", "dll-symbols" and "assf" commands doc.

This patch removes documentation from some commands whose support has
been recently removed.

gdb/ChangeLog:

        * NEWS: Document removal of "dll-symbols", "add-shared-symbol-files"
        and "assf" commands.

gdb/doc/ChangeLog:

        * gdb.texinfo (Files): Remove documentation of the
        "add-shared-symbol-files" and "assf" commands.
        (Cygwin Native): Remove documentation of the "dll-symbols"
        command.

10 years agoAssign file position for .strtab only if needed
H.J. Lu [Wed, 31 Dec 2014 03:09:11 +0000 (19:09 -0800)] 
Assign file position for .strtab only if needed

bfd/

PR ld/17773
* elflink.c (bfd_elf_final_link): Assign the file position for
the symbol string table only there are symbols to be emitted.

ld/testsuite/

PR ld/17773
* ld-elf/binutils.exp (binutils_test): Add an optional
readelf_options.  Replace -l with $readelf_options.  Add a
gap test.
* ld/testsuite/ld-elf/gap.s: New file.

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Dec 2014 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoFix executable indicator in file name completion on Windows.
Eli Zaretskii [Tue, 30 Dec 2014 19:14:25 +0000 (21:14 +0200)] 
Fix executable indicator in file name completion on Windows.

* complete.c (stat_char) [_WIN32]: Don't use 'access' and X_OK on
Windows, they don't work.  Instead, look at the file-name
extension to determine whether the file is executable.

10 years agoRemove "dll-symbols", "add-shared-symbol-files" and assf" commands.
Joel Brobecker [Tue, 30 Dec 2014 07:30:01 +0000 (11:30 +0400)] 
Remove "dll-symbols", "add-shared-symbol-files" and assf" commands.

This patch removes a set of commands that have been deprecated for
a while, and which we agreed to remove after the GDB 7.8 release.

gdb/ChangeLog:

* windows-nat.c (safe_symbol_file_add_stub)
(safe_symbol_file_add_cleanup, safe_symbol_file_add)
(dll_symbol_command): Delete.
(_initialize_windows_nat): Delete local variable "c".
Remove "dll-symbols", "add-shared-symbol-files" and assf"
commands.

Tested by rebuilding GDB on x86-windows.

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Dec 2014 00:00:13 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoSanitize input_interrupt output
Sergio Durigan Junior [Mon, 29 Dec 2014 19:22:20 +0000 (14:22 -0500)] 
Sanitize input_interrupt output

Hi,

This patch is a follow-up of the following discussions:

  <https://sourceware.org/ml/gdb-patches/2014-12/msg00421.html>
  <https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01293.html>

input_interrupt is currently emiting non-printable characters, which
is confusing the dg-extract-results.sh script.  This is obviously not
a good thing, and, by following Pedro's advices here:

  <https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01320.html>

I adapted the function to print "client connection closed" when it
receives a NUL character, or use the "isprint" function to decide how
to print the received char.  I tested it by running the testcases that
were printing the non-printable chars before:

  gdb.base/gdb-sigterm.exp
  gdb.threads/non-ldr-exc-1.exp
  gdb.threads/non-ldr-exc-2.exp
  gdb.threads/non-ldr-exc-3.exp
  gdb.threads/non-ldr-exc-4.exp
  gdb.threads/thread-execl.exp

and confirming that they print the right message.  I tried a bit to
come up with a testcase for this, but failed, and since I did not want
to spend too much time on it, I'm sending the patch anyway.

Comments are welcome, as usual.

gdb/gdbserver/ChangeLog:
2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>

* remote-utils.c: Include ctype.h.
(input_interrupt): Explicitly handle the case when the char
received is the NUL byte.  Improve the printing of non-ASCII
characters.

10 years ago[PATCH] Remove cast in Tag_ABI_VFP_args switch case stmts
Jiong Wang [Mon, 29 Dec 2014 14:56:36 +0000 (14:56 +0000)] 
[PATCH] Remove cast in Tag_ABI_VFP_args switch case stmts

  2014-12-29  Thomas Preud'homme  <thomas.preudhomme@arm.com>

  gdb/
    * arm-tdep.c (arm_gdbarch_init): Remove casts in Tag_ABI_VFP_args
    switch case statements.

10 years agoClean up gdb.trace/entry-values.exp
Yao Qi [Mon, 29 Dec 2014 03:56:51 +0000 (11:56 +0800)] 
Clean up gdb.trace/entry-values.exp

This patch is to clean up gdb.trace/entry-values.exp as a preparation
of the next patch.  It updates the comments to reflect the code.

One DIE generated in dwarf assembler is

  GNU_call_site {
    {low_pc "$bar_start + $bar_call_foo" addr}
      {abstract_origin :$foo_label}

the DW_AT_low_pc attribute is the return address after the call, so I
rename variable bar_call_foo to returned_from_foo.

gdb/testsuite:

2014-12-29  Yao Qi  <yao@codesourcery.com>

* gdb.trace/entry-values.exp: Update comments.  Rename variable
bar_call_foo to returned_from_foo.

10 years agoAdd moxiebox target support
Anthony Green [Mon, 29 Dec 2014 05:42:55 +0000 (00:42 -0500)] 
Add moxiebox target support

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Dec 2014 00:00:14 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoMisplaced parenthesis calculates two too few bytes for string
Alan Modra [Sun, 28 Dec 2014 04:58:19 +0000 (15:28 +1030)] 
Misplaced parenthesis calculates two too few bytes for string

Factor out strlen to give better code and less likelihood of a repeat
of this problem.

PR 17766
* pei-x86_64.c (pex64_bfd_print_pdata_section): Correct string
length.  Use memcpy rather than strcpy.

10 years agoFix small spelling mistake in gdb/ChangeLog.
Joel Brobecker [Sun, 28 Dec 2014 03:44:49 +0000 (07:44 +0400)] 
Fix small spelling mistake in gdb/ChangeLog.

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Dec 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoUpdate for moxie ISA changes
Anthony Green [Sat, 27 Dec 2014 23:37:58 +0000 (18:37 -0500)] 
Update for moxie ISA changes

10 years agoUpdate sto/ldo implementations with 16 bit offsets
Anthony Green [Sat, 27 Dec 2014 23:19:49 +0000 (18:19 -0500)] 
Update sto/ldo implementations with 16 bit offsets

10 years agoLimit moxie sto/ldo offsets to 16 bits
Anthony Green [Sat, 27 Dec 2014 15:57:04 +0000 (10:57 -0500)] 
Limit moxie sto/ldo offsets to 16 bits

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Dec 2014 00:00:12 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoUpdate two sh64 ld test's expected output
Alan Modra [Fri, 26 Dec 2014 11:40:52 +0000 (22:10 +1030)] 
Update two sh64 ld test's expected output

At some stage someone fixed a bug in ld -r output, preserving
SHF_INFO_LINK from input objects.  These two tests expected the old
wrong output.

* ld-sh/sh64/crangerel1.rd: Update.
* ld-sh/sh64/crangerel2.rd: Update.

10 years agoDelete unnecessary code copying SHF_SH5_ISA32 flag
Alan Modra [Fri, 26 Dec 2014 07:56:38 +0000 (18:26 +1030)] 
Delete unnecessary code copying SHF_SH5_ISA32 flag

Since 2006, commit d270463e9, _bfd_elf_copy_private_section_data has
copied over SHF_MASKOS and SHF_MASKPROC flags.  That makes the buggy
code in sh_elf64_copy_private_data_internal redundant.

bfd/
PR 17755
* elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code
copying SHF_SH5_ISA32.
binutils/testsuite/
* binutils-all/strip-11.d: New test.
* binutils-all/objcopy.exp: Run it.

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Dec 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoWhitespace cleanup
Anthony Green [Thu, 25 Dec 2014 13:26:57 +0000 (08:26 -0500)] 
Whitespace cleanup

10 years agoWhitespace cleanup
Anthony Green [Thu, 25 Dec 2014 13:26:57 +0000 (08:26 -0500)] 
Whitespace cleanup

10 years agoARM: Add support for value 3 of Tag_ABI_VFP_args attribute
Alan Modra [Thu, 25 Dec 2014 11:45:14 +0000 (22:15 +1030)] 
ARM: Add support for value 3 of Tag_ABI_VFP_args attribute

Missing from 5c294fee

elfcpp/
* arm.h: Add enums for Tag_ABI_FP_number_model and Tag_ABI_VFP_args.
gold/
* arm.cc (Target_arm::do_adjust_elf_header): Provide namespace on
new enums.
(Target_arm::merge_object_attributes, ): Likewise.

10 years agoDon't pass unadorned zeros to varargs functions
Yaakov Selkowitz [Thu, 25 Dec 2014 10:55:38 +0000 (21:25 +1030)] 
Don't pass unadorned zeros to varargs functions

PR gas/17753
* config/tc-mep.c (md_begin): Specify types of vararg literals.

10 years agoARM: Add support for value 3 of Tag_ABI_VFP_args attribute
Terry Guo [Thu, 25 Dec 2014 01:50:48 +0000 (09:50 +0800)] 
ARM: Add support for value 3 of Tag_ABI_VFP_args attribute

*** bfd/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
Tag_ABI_VFP_args value and replace hardcoded values by enum
values.
(elf32_arm_post_process_headers): Set e_flags in ELF header
as hard float only when Tag_ABI_VFP_args is 1, using new enum
value AEABI_VFP_args_vfp to check that.

*** binutils/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* readelf.c (arm_attr_tag_ABI_VFP_args): Add "compatible".

*** gdb/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* arm-tdep.c (arm_gdbarch_init): Explicitely handle value 3 of
Tag_ABI_VFP_args. Also replace hardcoded values by enum values
in the switch handling the different values of Tag_ABI_VFP_args.

*** gold/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* arm.cc (Target_arm::do_adjust_elf_header): Set e_flags in ELF
header as hard float only when Tag_ABI_VFP_args is 1, using new
enum value AEABI_VFP_args_vfp to check that.
(Target_arm::merge_object_attributes): Handle new Tag_ABI_VFP_args
value and replace hardcoded values by enum values.

*** include/elf/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum
values.

*** ld/testsuite/ChangeLog ***

2014-12-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* ld-arm/attr-merge-2a.s: Add Tag_ABI_VFP_args.
* ld-arm/attr-merge-2b.s: Likewise.
* ld-arm/attr-merge-2.attr: Likewise.
* ld-arm/attr-merge-4a.s: Add Tag_ABI_FP_number_model and
Tag_ABI_VFP_args.
* ld-arm/attr-merge-4b.s: Likewise.
* ld-arm/attr-merge-4.attr: Likewise.
* ld-arm/attr-merge-6a.s: Likewise.
* ld-arm/attr-merge-6b.s: Likewise.
* ld-arm/attr-merge-6.attr: Add Tag_ABI_FP_number_model.

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Dec 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAdd cast to unsigned long
H.J. Lu [Wed, 24 Dec 2014 22:14:14 +0000 (14:14 -0800)] 
Add cast to unsigned long

* pei-x86_64.c (pex64_bfd_print_pdata_section): Add cast to
unsigned long.

10 years agoAVR: Document linker relaxation related options.
Andrew Burgess [Tue, 23 Dec 2014 17:46:45 +0000 (17:46 +0000)] 
AVR: Document linker relaxation related options.

Adds documentation describing the -mlink-relax and -mno-link-relax
command line options.

gas/ChangeLog:

* doc/c-avr.texi: Document -mlink-relax and -mno-link-relax.

10 years agoAVR: Assembler now prepares for linker relaxation by default.
Andrew Burgess [Mon, 27 Oct 2014 10:51:17 +0000 (10:51 +0000)] 
AVR: Assembler now prepares for linker relaxation by default.

Have the assembler prepare for linker relaxation by default.  This
means that users will be able to make use of linker relaxation without
having to adjust the assembler flags, this can make life easier when
compiling libraries.

Having this on by default in the assembler should make no difference to
the assembler code produced, however, some of the debug information will
be slightly less compressed.

A few tests needed to be updated as a result of this change as they
relied on linker relaxation support being off by default.

I've tightened up the definition of which sections can be relaxed on AVR
as part of this commit, the assembler used to think that all
non-debugging sections could be relaxed, when in reality only code
sections can be relaxed for AVR.  The previous definition was not
dangerous, just over cautious.  The new tighter definition allows an
extra test (gas/testsuite/gas/all/forward.d) to continue to pass.

gas/ChangeLog:

* config/tc-avr.c (struct avr_opt_s): Change link_relax to
no_link_relax, extend comment.
(enum options): Add new OPTION_NO_LINK_RELAX.
(md_longopts): Add entry for -mno-link-relax.
(md_parse_option): Handle OPTION_NO_LINK_RELAX, and update
OPTION_LINK_RELAX.
(md_begin): Initialise linkrelax from no_link_relax.
(md_show_usage): Include -mno-link-relax option.
(relaxable_section): Only allocatable code sections can be
relaxed.
* config/tc-avr.h (TC_LINKRELAX_FIXUP): Define.

gas/testsuite/ChangeLog:

* gas/all/gas.exp: Test will not pass on AVR due to linker
relaxation support.
* gas/avr/noreloc_withoutrelax.d: Add -mno-link-relax option.
* gas/avr/link-relax-elf-flag-clear.d: Likewise.

ld/testsuite/ChangeLog:

* ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax
option.
* ld/testsuite/ld-avr/relax-elf-flags-03.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-04.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-05.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-06.d: Likewise.

10 years agoThis patch fixes a snafu where the -D and -U short versions of the
Alexander Cherepanov [Wed, 24 Dec 2014 14:50:53 +0000 (14:50 +0000)] 
This patch fixes a snafu where the -D and -U short versions of the
--enable-deterministic-archives and --disable-deteministic-archive
options were not being accepted.

PR binutils/17671
* objcopy.c (copy_main, strip_main): Add D and U to the list of
accepted short versions of long options.

10 years agoAdd support for moxie's mul.x and umul.x instructions
Anthony Green [Wed, 24 Dec 2014 13:37:16 +0000 (08:37 -0500)] 
Add support for moxie's mul.x and umul.x instructions

10 years agoAdd mul.x and umul.x instructions to moxie port
Anthony Green [Wed, 24 Dec 2014 13:34:23 +0000 (08:34 -0500)] 
Add mul.x and umul.x instructions to moxie port

10 years agoDon't create .eh_frame_hdr on shared lib bfd
Alan Modra [Wed, 24 Dec 2014 11:37:42 +0000 (22:07 +1030)] 
Don't create .eh_frame_hdr on shared lib bfd

If no object files have .eh_frame, but some shared library does, then
ld creates a .eh_frame_hdr section using the shared library bfd.  This
is silly since shared library .eh_frame sections don't contribute to
the output .eh_frame and thus no .eh_frame_hdr is needed.

Also, the bfd section list and count is cleared for shared libraries,
and a zero section count used as a flag in lang_check to omit a call
to bfd_merge_private_bfd_data for shared libraries.  If we create a
section on a shared lib bfd then ld will wrongly attempt to merge the
shared library private bfd data.

PR 17742
* ld/emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Exclude
shared libraries in loop looking for .eh_frame sections.
Similarly for build-id loop.

10 years agoThis patch adds support for printing out the pdata section of PE objects.
Pierre Muller [Wed, 24 Dec 2014 10:06:57 +0000 (10:06 +0000)] 
This patch adds support for printing out the pdata section of PE objects.

* pe-x86_64.c (pex64_bfd_print_pdata): Add external
declaration.
(bfd_pe_print_data): Set macro to pex64_bfd_print_data.
* pei-x86_64.c (pex64_bfd_print_pdata): Changed to
global function. Now handles multiple .pdata sections.
(pex_bfd_print_pdata_section): New static helper function,
using most of old pex_bfd_print_pdata function code, but adding
support for coff pe objects, which might have some fields
starting at zero offset.
(pex64_print_all_pdata_sections) : New static helper function,
used in call to bfd_map_over_sections inside new
pex66_bfd_print_pdata function.
(bfd_boolean pdata_count): New static variable, used to return
bfd_boolean value for pex64_bfd_print_pdata function.

10 years agoReverts an "enhancement" made in a previous delta which complained of
Nick Clifton [Wed, 24 Dec 2014 08:21:50 +0000 (08:21 +0000)] 
Reverts an "enhancement" made in a previous delta which complained of
unprocessed augmentation data at the end of a CIE.

* dwarf.c (read_cie): Revert check for unused augmentation data -
it was bogus.

10 years agoFix generic linker symbol output when weak is overridden by strong
Alan Modra [Wed, 24 Dec 2014 01:22:26 +0000 (11:52 +1030)] 
Fix generic linker symbol output when weak is overridden by strong

Yes, I know this also affects bfd_link_hash_indirect, but output of
indirect and warning symbols looks quite broken anyway.

* linker.c (_bfd_generic_link_output_symbols): Remove BSF_WEAK
flag from bfd_link_hash_defined symbols.

10 years agoYet another DEFINED testcase
Alan Modra [Tue, 23 Dec 2014 14:33:44 +0000 (01:03 +1030)] 
Yet another DEFINED testcase

* ld-scripts/defined6.s,
* ld-scripts/defined6.t,
* ld-scripts/defined6.d: New test.
* ld-scripts/defined.exp: Run it.

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Dec 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoClarify strip docs.
Andrew Stubbs [Tue, 23 Dec 2014 20:28:16 +0000 (20:28 +0000)] 
Clarify strip docs.

binutils/
* objcopy.c (strip_usage): Reword --remove-section description.
* doc/binutils.texi (strip): Likewise.

10 years agoLook up primitive types as symbols.
Doug Evans [Tue, 23 Dec 2014 15:55:39 +0000 (07:55 -0800)] 
Look up primitive types as symbols.

gdb/ChangeLog:

* ada-lang.c (user_select_syms): Only fetch symtab if symbol is
objfile-owned.
(cache_symbol): Ignore symbols that are not objfile-owned.
* block.c (block_objfile): New function.
(block_gdbarch): New function.
* block.h (block_objfile): Declare.
(block_gdbarch): Declare.
* c-exp.y (classify_name): Remove call to
language_lookup_primitive_type.  No longer necessary.
* gdbtypes.c (lookup_typename): Call lookup_symbol_in_language.
Remove call to language_lookup_primitive_type.  No longer necessary.
* guile/scm-symbol.c (syscm_gdbarch_data_key): New static global.
(syscm_gdbarch_data): New struct.
(syscm_init_arch_symbols): New function.
(syscm_get_symbol_map): Renamed from syscm_objfile_symbol_map.
All callers updated.  Handle symbols owned by arches.
(gdbscm_symbol_symtab): Handle symbols owned by arches.
(gdbscm_initialize_symbols): Initialize syscm_gdbarch_data_key.
* language.c (language_lookup_primitive_type_1): New function.
(language_lookup_primitive_type): Call it.
(language_alloc_type_symbol): New function.
(language_init_primitive_type_symbols): New function.
(language_lookup_primitive_type_as_symbol): New function.
* language.h (struct language_arch_info) <primitive_type_symbols>:
New member.
(language_lookup_primitive_type): Add function comment.
(language_lookup_primitive_type_as_symbol): Declare.
* printcmd.c (address_info): Handle arch-owned symbols.
* python/py-symbol.c (sympy_get_symtab): Ditto.
(set_symbol): Ditto.
(sympy_dealloc): Ditto.
* symmisc.c (print_symbol): Ditto.
* symtab.c (fixup_symbol_section): Ditto.
(lookup_symbol_aux): Initialize block_found.
(basic_lookup_symbol_nonlocal): Try looking up the symbol as a
primitive type.
(initialize_objfile_symbol_1): New function.
(initialize_objfile_symbol): Call it.
(allocate_symbol): Call it.
(allocate_template_symbol): Call it.
(symbol_objfile): Assert symbol is objfile-owned.
(symbol_arch, symbol_symtab, symbol_set_symtab): Ditto.
* symtab.h (struct symbol) <owner>: Replaces member "symtab".
(struct symbol) <is_objfile_owned>: New member.
(SYMBOL_OBJFILE_OWNED): New macro.
* cp-namespace.c (cp_lookup_bare_symbol): New arg langdef.
All callers updated.  Try to find the symbol as a primitive type.
(lookup_namespace_scope): New arg langdef.  All callers updated.
Call cp_lookup_bare_symbol directly for simple bare symbols.

10 years agoAVR/ld: Propagate link-relax elf header flag correctly.
Andrew Burgess [Sat, 22 Nov 2014 23:25:17 +0000 (23:25 +0000)] 
AVR/ld: Propagate link-relax elf header flag correctly.

The AVR target has an elf header flag to indicate if an object was
assembler ready for linker relaxation.  If a partial link is performed
then it is important that the link-relax flag in the output object is
set correctly, otherwise, during the final link, we might try to perform
linker relaxation on code that was not assembled suitably.

As the link-relax elf header covers the entire object file we must be
conservative when setting the flag in the output object, so, for a
partial link, any input object that does not have the link-relax flag
set will cause the output object to also not have the link-relax flag
set.

This conservative approach could be softened in future, we only need to
disable the link relax flag if an input file is not marked link-relax
ready, and the input file contains a relaxable section.  However, I've
left this optimisation for a later day.

For the final link I've overloaded the use of the link-relax elf header
flag, in a final executable, the flag now indicates if the executable
was built with linker relaxation on or not.

ld/ChangeLog:

* emultempl/avrelf.em: Add include of elf/avr.h.
(avr_finish): New function.
(LDEMUL_FINISH): Added.

ld/testsuite/ChangeLog:

* ld-avr/relax-elf-flags-01.d: New file.
* ld-avr/relax-elf-flags-02.d: New file.
* ld-avr/relax-elf-flags-03.d: New file.
* ld-avr/relax-elf-flags-04.d: New file.
* ld-avr/relax-elf-flags-05.d: New file.
* ld-avr/relax-elf-flags-06.d: New file.
* ld-avr/relax-elf-flags-07.d: New file.
* ld-avr/relax-elf-flags-08.d: New file.
* ld-avr/relax-elf-flags-a.s: New file.
* ld-avr/relax-elf-flags-b.s: New file.

10 years agoAVR: Only set link-relax elf flag when appropriate.
Andrew Burgess [Sat, 22 Nov 2014 23:19:31 +0000 (23:19 +0000)] 
AVR: Only set link-relax elf flag when appropriate.

The AVR target uses a bit in the elf header flags to indicate if the
object was assembled ready for linker relaxation.  Previously this flag
was always set, even when the object was not assembled ready for linker
relaxation.

This patch moves setting of the flag into the assembler, and sets it
only when the assembler is preparing the file for linker relaxation.

bfd/ChangeLog:

* elf32-avr.c (bfd_elf_avr_final_write_processing): Don't set
EF_AVR_LINKRELAX_PREPARED unconditionally.

gas/ChangeLog:

* config/tc-avr.c: Add include for elf/avr.h.
(avr_elf_final_processing): New function.
* config/tc-avr.h (elf_tc_final_processing): Define.
(avr_elf_final_processing): Declare

gas/testsuite/ChangeLog:

* gas/avr/link-relax-elf-flag-clear.d: New file.
* gas/avr/link-relax-elf-flag-set.d: New file.
* gas/avr/link-relax-elf-flag.s: New file.

10 years agosymtab.h (SYMBOL_DOMAIN_BITS): New macro.
Doug Evans [Tue, 23 Dec 2014 15:31:00 +0000 (07:31 -0800)] 
symtab.h (SYMBOL_DOMAIN_BITS): New macro.

gdb/ChangeLog:

* symtab.h (SYMBOL_DOMAIN_BITS): New macro.
(struct symbol) <domain>: Use it.

10 years agoinitialize_objfile_symbol: Renamed from initialize_symbol.
Doug Evans [Tue, 23 Dec 2014 15:28:28 +0000 (07:28 -0800)] 
initialize_objfile_symbol: Renamed from initialize_symbol.

gdb/ChangeLog:

* symtab.c (initialize_objfile_symbol): Renamed from initialize_symbol.
All callers updated.

10 years agoAdd langdef arg to la_lookup_symbol_nonlocal.
Doug Evans [Tue, 23 Dec 2014 15:24:48 +0000 (07:24 -0800)] 
Add langdef arg to la_lookup_symbol_nonlocal.

gdb/ChangeLog:

* language.h (struct language_defn) <la_lookup_symbol_nonlocal>:
New arg language_defn.  All uses updated.

10 years agoReplace some symbol accessor macros with functions.
Doug Evans [Tue, 23 Dec 2014 15:21:10 +0000 (07:21 -0800)] 
Replace some symbol accessor macros with functions.

gdb/ChangeLog:

* symtab.h (SYMBOL_SYMTAB): Delete
(SYMBOL_OBJFILE): Delete.
(symbol_symtab, symbol_set_symtab): Declare.
(symbol_objfile, symbol_arch): Declare.
* symtab.c (symbol_symtab): Replaces SYMBOL_SYMTAB.  All uses updated.
All references to symbol->symtab redirected through here.
(symbol_set_symtab): New function.  All assignments to SYMBOL_SYMTAB
redirected through here.
(symbol_arch): New function.
(symbol_objfile): New function.  Replaces SYMBOL_OBJFILE.
All uses updated.
* cp-namespace.c (cp_lookup_symbol_imports_or_template): Call
symbol_arch.
* findvar.c (default_read_var_value): Call symbol_arch.
* guile/scm-frame.c (gdbscm_frame_block): Call symbol_objfile.
* jv-lang.c (add_class_symtab_symbol): Call symbol_arch.
* printcmd.c (address_info): Call symbol_arch.
* tracepoint.c (scope_info): Call symbol_arch.

10 years agoThis patch add support for cpu marvell-whitney.
Nick Clifton [Tue, 23 Dec 2014 13:41:13 +0000 (13:41 +0000)] 
This patch add support for cpu marvell-whitney.

         * gas/config/tc-arm.c (arm_cpus): Add core marvell-whitney.

10 years agoReformat the objdump.1 man output to avoid overlong lines.
Nick Clifton [Tue, 23 Dec 2014 13:11:10 +0000 (13:11 +0000)] 
Reformat the objdump.1 man output to avoid overlong lines.

10 years agoReport an error for script multiply defined symbols
Alan Modra [Mon, 22 Dec 2014 00:41:50 +0000 (11:11 +1030)] 
Report an error for script multiply defined symbols

or maybe not just yet, but this is better than a FIXME.

* ldexp.c (update_definedness): Return false if script symbol is
redefining a strong symbol in an object.
(exp_fold_tree_1 <etree_assign>): Set up for reporting a multiple
definition error, but for now leave disabled.

10 years agoUse a symbol flag bit to mark linker defined symbols
Alan Modra [Tue, 23 Dec 2014 08:37:23 +0000 (19:07 +1030)] 
Use a symbol flag bit to mark linker defined symbols

Trying to use the SEC_LINKER_CREATED section flag to determine whether
a symbol is linker defined fails to work on targets like alpha that
define special SEC_COMMON sections.  These might contain symbols that
originated in an object file.

include/
* bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref.  Add
linker_def.
bfd/
* elflink.c (_bfd_elf_define_linkage_sym): Set linker_def.
* linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def
for CDEF, DEF, DEFW, COM.
ld/
* ldexp.c (exp_fold_tree_1 <etree_provide>): Test linker_def.
ld/testsuite/
* ld-powerpc/sdabase.s,
* ld-powerpc/sdabase.t,
* ld-powerpc/sdabase.d: New test.
* ld-powerpc/sdabase2.t,
* ld-powerpc/sdabase2.d: New test.
* ld-powerpc/powerpc.exp: Run them.

10 years agoDon't PROVIDE over top of common symbols
Alan Modra [Mon, 22 Dec 2014 00:19:23 +0000 (10:49 +1030)] 
Don't PROVIDE over top of common symbols

This:
  int end[100000];
  int main(void) { end[99999] = 0; return 0; }
should not segfault.

ld/
* ldexp.c (exp_fold_tree_1 <etree_provide>): Leave bfd_link_hash_common
symbols alone.
ld/testsuite/
* ld-elf/endsym.s, *ld-elf/endsym.d: New test.

10 years agoCorrect logic for "defined by object"
Alan Modra [Mon, 22 Dec 2014 04:13:49 +0000 (14:43 +1030)] 
Correct logic for "defined by object"

The old code missed testing bfd_link_hash_undefweak, and wrongly
excluded bfd_link_hash_common symbols.  It is also clearer to invert
the set of enum bfd_link_hash_type values tested.
bfd_link_hash_indirect and bfd_link_hash_warning will never appear
here.

* ldexp.c (update_definedness): Correct logic setting by_object.

10 years agoMove support code for linker script DEFINED to ldexp.c
Alan Modra [Mon, 22 Dec 2014 00:15:13 +0000 (10:45 +1030)] 
Move support code for linker script DEFINED to ldexp.c

This moves support code for DEFINED to ldexp.c where it is used,
losing the lang_ prefix on identifiers.  Two new functions are needed
to initialize and clean up to hash table, but other than that there
are no functional changes here.

* ldexp.c (struct definedness_hash_entry, definedness_table)
(definedness_newfunc, symbol_defined, update_definedness): Move
and rename from..
* ldlang.h (struct lang_definedness_hash_entry): ..here,..
* ldlang.c (lang_definedness_table, lang_definedness_newfunc)
(lang_symbol_defined, lang_update_definedness): ..and here.
* ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from..
* ldlang.c (lang_init, lang_finish): ..here.
* ldexp.h (ldexp_init, ldexp_finish): Declare.
* ldlang.h (lang_symbol_defined, lang_update_definedness): Delete.
* ldmain.c (main): Call ldexp_init and ldexp_finish.

10 years agoUpdated translations for the gas and gprof tools.
Nick Clifton [Tue, 23 Dec 2014 12:39:34 +0000 (12:39 +0000)] 
Updated translations for the gas and gprof tools.

* po/es.po: Updated Esperanto translation.
* po/fr.po: Updated French translation.
* po/uk.po: Updated Ukrainian translation.

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Dec 2014 00:00:12 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoCast size to long to warn
H.J. Lu [Mon, 22 Dec 2014 23:29:21 +0000 (15:29 -0800)] 
Cast size to long to warn

* dwarf.c (read_cie): Cast size to long to warn.

10 years agoMore fixes for invalid memory accesses exposed by fuzzed binaries.
Nick Clifton [Mon, 22 Dec 2014 22:44:34 +0000 (22:44 +0000)] 
More fixes for invalid memory accesses exposed by fuzzed binaries.

PR binutils/17531
* dwarf.c (decode_location_expression): Check for an out of range
value for a DW_OP_GNU_entry_value expression.
(display_debug_lines_raw): Check for a partial
.debug_line. section being encountered without a prior, full
.debug.line section.
(display_debug_lines_decoded): Likewise.  Also check for
li_line_range being zero.
(display_debug_pubnames_worker): Check for an invalid pn_length
field.
(read_cie): Add range checks.
* elfcomm.c (setup_archive): Check for a negative longnames_size.

10 years agoMore fixes for memory access violations exposed by fuzzed binaries.
Nick Clifton [Mon, 22 Dec 2014 20:59:00 +0000 (20:59 +0000)] 
More fixes for memory access violations exposed by fuzzed binaries.

PR binutils/17512
* archive.c (do_slurp_bsd_armap): Return if the parsed_size is
zero.
(bfd_slurp_armap): Zero terminate the name.
(bfd_generic_stat_arch_elt): If there is no header, fail.
* elf32-arc.c (arc_info_to_howto_rel): Replace BFD_ASSERT with
error message.
* elf32-avr.c (avr_info_to_howto_rela): Likewise.
* elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
* elf32-cris.c (cris_info_to_howto_rela): Likewise.
* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
* elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
* elf32-dlx.c (dlx_rtype_to_howto): Likewise.
* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
* elf32-frv.c (frv_info_to_howto_rela): Likewise.
* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
* elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
* elf32-mep.c (mep_info_to_howto_rela): Likewise.
* elf32-metag.c (metag_info_to_howto_rela): Likewise.
* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
* elf32-mt.c (mt_info_to_howto_rela): Likewise.
* elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
* elf32-rx.c (rx_info_to_howto_rela): Likewise.
* elf32-v850.c (v850_elf_info_to_howto_rel): Likewise.
* elf32-visium.c (visium_info_to_howto_rela): Likewise.
* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
* elf64-x86-64.c (elf_x86_64_reloc_type_lookup): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_bfd_reloc_from_type): Likewise.
* elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Add range
checking of reloc symbol index.
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): If no symbols have
been provided then set the reloc's symbol to undefined.
* reloc.c (bfd_generic_get_relocated_section_contents): Add range
checking of the reloc to be applied.
* versados.c (process_otr): Add more range checks.
(versados_canonicalize_reloc): If the section is unknown, set the
symbol to undefined.
* vms-alpha.c (_bfd_vms_slurp_eisd): Add range checks.
(alpha_vms_object_p): Likewise.

10 years agogold/
Cary Coutant [Mon, 22 Dec 2014 18:13:37 +0000 (10:13 -0800)] 
gold/
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.

10 years agocp-namespace.c (cp_lookup_symbol_via_all_imports): New function.
Doug Evans [Mon, 22 Dec 2014 17:29:25 +0000 (09:29 -0800)] 
cp-namespace.c (cp_lookup_symbol_via_all_imports): New function.

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_symbol_via_all_imports): New function.
(cp_lookup_symbol_namespace): Call it.
(cp_lookup_symbol_nonlocal): Ditto.

10 years agocp-namespace.c (cp_lookup_symbol_via_imports): New arg "search_scope_first".
Doug Evans [Mon, 22 Dec 2014 17:20:50 +0000 (09:20 -0800)] 
cp-namespace.c (cp_lookup_symbol_via_imports): New arg "search_scope_first".

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_symbol_via_imports): New arg
"search_scope_first".  All callers updated.

10 years agocp-namespace.c (cp_lookup_nested_symbol_1): New function.
Doug Evans [Mon, 22 Dec 2014 17:11:44 +0000 (09:11 -0800)] 
cp-namespace.c (cp_lookup_nested_symbol_1): New function.

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_nested_symbol_1): New function.
(cp_basic_lookup_symbol): Renamed from lookup_symbol_file.  Delete
arg "search".  All callers updated.
(cp_lookup_bare_symbol): New function.
(cp_search_static_and_baseclasses): New function.
(cp_lookup_symbol_in_namespace): Rewrite, move more logic here.
(find_symbol_in_baseclass): Simplify, call cp_lookup_nested_symbol_1.
(cp_lookup_nested_symbol): Ditto.

10 years agocp-namespace.c (cp_lookup_symbol_in_namespace): Simplify.
Doug Evans [Mon, 22 Dec 2014 16:44:50 +0000 (08:44 -0800)] 
cp-namespace.c (cp_lookup_symbol_in_namespace): Simplify.

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_symbol_in_namespace): Simplify.

10 years agocp-namespace.c: Whitespace cleanup.
Doug Evans [Mon, 22 Dec 2014 16:42:02 +0000 (08:42 -0800)] 
cp-namespace.c: Whitespace cleanup.

gdb/ChangeLog:

* cp-namespace.c: Whitespace cleanup.

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Dec 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Dec 2014 00:00:16 +0000 (00:00 +0000)] 
Automatic date update in version.in