aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-25Fix crash when section ends with a .lloc directive not followed by an insn.users/ccoutant/two-level-line-tablesCary Coutant1-14/+21
gas/ * dwarf2dbg.c (emit_logicals): Handle case where e->label is NULL.
2015-02-22Improve ODR checking.Cary Coutant2-11/+34
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.
2015-02-22Support compressed debug in dyn objects.Cary Coutant4-130/+96
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.
2015-02-22Add gold support for two-level line tables.Cary Coutant4-59/+471
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.
2015-02-22Fix formatting.Cary Coutant1-4/+4
2015-02-06 Cary Coutant <ccoutant@google.com> binutils/ * dwarf.c (display_debug_lines_raw): Fix formatting.
2015-01-30For ODR checking, when we see two .lloc directives in a row, output them both.Cary Coutant1-1/+1
2015-01-30 Cary Coutant <ccoutant@google.com> gas/ * dwarf2dbg.c (dwarf2_directive_loc): Always emit extra .lloc.
2015-01-28Reformat experimental header for compatibility with old DWARF consumers.Cary Coutant2-20/+34
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.
2015-01-28Reformat experimental header for compatibility with old DWARF consumers.Cary Coutant1-44/+74
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.
2015-01-28Some minor cleanups in two-level line table support.Cary Coutant1-5/+6
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.
2015-01-26Fix to read signed LEB128 for operand to DW_LNS_set_address_from_logical.Cary Coutant1-1/+1
2015-01-26 Cary Coutant <ccoutant@google.com> binutils/ * dwarf.c (display_line_program): Operand to DW_LNS_set_address_from_logical is signed.
2015-01-26Reset discriminator after each row.Cary Coutant1-0/+2
2015-01-26 Cary Coutant <ccoutant@google.com> binutils/ * dwarf.c (display_line_program): Reset discriminator after each row.
2015-01-23Set entsize for .debug_line_str section.Cary Coutant1-0/+1
2015-01-23 Cary Coutant <ccoutant@google.com> gas/ * dwarf2dbg.c (dwarf2_finish): Set entsize for .debug_line_str section.
2015-01-23Emit address_size and segment_size for version 5 line number tables.Cary Coutant1-0/+7
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.
2015-01-23Add address_size and segment_size to line number program header version 5.Cary Coutant2-0/+20
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.
2015-01-23Update DW_LNS_opcodes for two-level line tables.Cary Coutant1-9/+16
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.
2015-01-23Update DW_LNS opcodes for two-level line tables.Cary Coutant1-9/+14
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.
2015-01-23Update DW_LNS opcodes.Cary Coutant1-2/+2
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.
2015-01-21Track discriminator when processing line number table.Cary Coutant1-2/+8
2015-01-21 Cary Coutant <ccoutant@google.com> binutils/ * dwarf.c (process_extended_line_op): Track discriminator.
2015-01-21Ignore line tables whose versions we don't support.Cary Coutant1-2/+11
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.
2015-01-21Silence "may be uninitialized" warnings.Cary Coutant1-0/+2
2015-01-21 Cary Coutant <ccoutant@google.com> binutils/ * dwarf.c (display_debug_lines_raw): Silence "may be uninitialized" warnings.
2015-01-15Fix bugs displaying DW_LNS_set_context and DW_LNS_pop_context.Cary Coutant1-4/+10
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.
2015-01-15Fix problems with DW_LNS_pop_context in logicals table.Cary Coutant1-12/+13
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.
2015-01-06Add support for DWARF-5 and experimental two-level line number tables.Cary Coutant3-254/+622
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.
2015-01-06Update support for DWARF-5 and experimental two-level line number tables.Cary Coutant1-37/+44
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.
2015-01-06Update experimental DWARF-5 values for two-level line number tables.Cary Coutant1-3/+4
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.
2015-01-01Add support for DWARF-5 and experimental two-level line number tables.Cary Coutant3-62/+681
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.
2015-01-01Add experimental DWARF-5 values for two-level line number tables.Cary Coutant2-1/+24
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.
2015-01-02Correct printed year in copyright noticesAlan Modra6-3/+15
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra2507-13634/+13808
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker4354-4358/+4362
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-01-01Update copyright year printed by gdb, gdbserver and gdbreplay.Joel Brobecker5-3/+12
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.
2015-01-01Yearly gdb/ChangeLog rotation.Joel Brobecker3-16650/+16664
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.
2015-01-01Automatic date update in version.inGDB Administrator1-1/+1
2014-12-31Remove "add-shared-symbol-files", "dll-symbols" and "assf" commands doc.Joel Brobecker4-24/+16
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.
2014-12-30Assign file position for .strtab only if neededH.J. Lu5-24/+47
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.
2014-12-31Automatic date update in version.inGDB Administrator1-1/+1
2014-12-30Fix executable indicator in file name completion on Windows.Eli Zaretskii2-0/+19
* 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.
2014-12-30Remove "dll-symbols", "add-shared-symbol-files" and assf" commands.Joel Brobecker2-93/+9
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.
2014-12-30Automatic date update in version.inGDB Administrator1-1/+1
2014-12-29Sanitize input_interrupt outputSergio Durigan Junior2-3/+19
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.
2014-12-29[PATCH] Remove cast in Tag_ABI_VFP_args switch case stmtsJiong Wang2-4/+9
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.
2014-12-29Clean up gdb.trace/entry-values.expYao Qi2-9/+14
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.
2014-12-29Add moxiebox target supportAnthony Green2-1/+5
2014-12-29Automatic date update in version.inGDB Administrator1-1/+1
2014-12-28Misplaced parenthesis calculates two too few bytes for stringAlan Modra2-3/+10
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.
2014-12-28Fix small spelling mistake in gdb/ChangeLog.Joel Brobecker1-1/+1
2014-12-28Automatic date update in version.inGDB Administrator1-1/+1
2014-12-27Update for moxie ISA changesAnthony Green2-29/+51
2014-12-27Update sto/ldo implementations with 16 bit offsetsAnthony Green2-20/+32
2014-12-27Limit moxie sto/ldo offsets to 16 bitsAnthony Green7-28/+44