1. 28 Aug, 2019 3 commits
    • Niklas G?rtler's avatar
      Add an option to objcopy to change the alignment of sections. · fa463e9f
      Niklas G?rtler authored
      	PR 24942
      	* objcopy.c (SECTION_CONTEXT_SET_ALIGNMENT): New constant.
      	(struct section_list): Add alignment field.
      	(command_line_switch): Add OPTION_SET_SECTION_ALIGNMENT.
      	(copy_options): Add --set-section-alignment.
      	(copy_usage): Describe --set-section-alignment.
      	(find_section_list): Initialise the alignment field.
      	(setup_section): Handle the alignment field.
      	(copy_main): Handle OPTION_SET_SECTION_ALIGNMENT.
      	* doc/binutils.texi: Document the new feature.
      	* NEWS: Mention the new feature.
      fa463e9f
    • Nick Clifton's avatar
      Add a --source-comment=<text> option to objdump which provides a prefix to... · a1c110a3
      Nick Clifton authored
      Add a --source-comment=<text> option to objdump which provides a prefix to dipslayed source code lines.
      
      	PR 24931
      	* objdump.c (source_comment): New static variable.
      	(option_values): Add OPTION_SOURCE_COMMENT.
      	(long_opions): Add --source-comment.
      	(print_line): If source comment is set, use it as a prefix to the
      	source code line.
      	(main): Handle OPTION_SOURCE_COMMENT.
      	* doc/binutils.texi: Document the new option.
      	* NEWS: Mention the new feature.
      	* testsuite/binutils-all/objdump.exp (test_objdump_S): Add tests
      	of the -S and --source-comment options.
      a1c110a3
    • GDB Administrator's avatar
      Automatic date update in version.in · 72dd1784
      GDB Administrator authored
      72dd1784
  2. 27 Aug, 2019 5 commits
    • Christian Biesinger's avatar
      Fix compiler warning in linux-namespaces.c · 550105b7
      Christian Biesinger authored
      ../../gdb/nat/linux-namespaces.c: In function ‘void mnsh_main(int)’:
      ../../gdb/nat/linux-namespaces.c:604:8: warning: ‘fd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        close (fd);
        ~~~~~~^~~~
      
      And the warning is correct -- mnsh_recv_message can return -1 and leave fd
      uninitialized, and mnsh_main will still call close (fd) if that happens.
      
      Initialize fd to -1 to avoid that.
      
      gdb/ChangeLog:
      
      2019-08-27  Christian Biesinger  <cbiesinger@google.com>
      
      	* nat/linux-namespaces.c (mnsh_main): Initialize fd (to -1).
      550105b7
    • Nick Clifton's avatar
      Improve the DWARF decoder's ability to describe the DW_AT_discr_list attribute. · ec1b0fbb
      Nick Clifton authored
      	PR 24510
      	* dwarf.c (MAX_CU_NESTING): New constant.
      	(level_type_signed): New static array.
      	(skip_attr_bytes): New function.
      	(get_type_signedness): New function.
      	(read_and_print_leb128): New function.
      	(display_discr_list): New function.
      	(read_and_display_attr_value): Add start parameter.
      	Use new functions when handling DW_AT_type and DW_AT_discr_list.
      	(read_and_display_attr): Add start parameter.  Pass to
      	read_and_display_attr_value.
      	(process_debug_info): Update call to read_and_display_attr.
      	(display_formatted_table): Likewise.
      	(display_debug_lines_decoded): Likewise.  Also add start
      	parameter.
      	(display_debug_lines): Likewise.
      	* testsuite/binutils-all/dwarf-attributes.S: Update discrimination
      	lists.
      	* testsuite/binutils-all/dwarf-attributes.W: Update expected
      	output.
      ec1b0fbb
    • Andrew Burgess's avatar
      gdb: Add new -n flag to some info commands · 4acfdd20
      Andrew Burgess authored
      The 'info variables', its alias 'whereis', and 'info functions' all
      include non-debug symbols in the output by default.  The list of
      non-debug symbols can sometimes be quite long, resulting in the
      debug symbol based results being scrolled off the screen.
      
      This commit adds a '-n' flag to all of the commands listed above that
      excludes the non-debug symbols from the results, leaving just the
      debug symbol based results.
      
      gdb/ChangeLog:
      
      	* cli/cli-utils.c (info_print_options_defs): Delete.
      	(make_info_print_options_def_group): Delete.
      	(extract_info_print_options): Delete.
      	(info_print_command_completer): Delete.
      	(info_print_args_help): Add extra parameter, and optionally
      	include text about -n flag.
      	* cli/cli-utils.h (struct info_print_options): Delete.
      	(extract_info_print_options): Delete declaration.
      	(info_print_command_completer): Delete declaration.
      	(info_print_args_help): Add extra parameter, extend header
      	comment.
      	* python/python.c (gdbpy_rbreak): Pass additional parameter to
      	search_symbols.
      	* stack.c (struct info_print_options): New type.
      	(info_print_options_defs): New file scoped variable.
      	(make_info_print_options_def_group): New static function.
      	(info_print_command_completer): New static function.
      	(info_locals_command): Update to use new local functions.
      	(info_args_command): Likewise.
      	(_initialize_stack): Add extra parameter to calls to
      	info_print_args_help.
      	* symtab.c (search_symbols): Add extra parameter, use this to
      	possibly excluse non-debug symbols.
      	(symtab_symbol_info): Add extra parameter, which is passed on to
      	search_symbols.
      	(struct info_print_options): New type.
      	(info_print_options_defs): New file scoped variable.
      	(make_info_print_options_def_group): New static function.
      	(info_print_command_completer): New static function.
      	(info_variables_command): Update to use local functions, and pass
      	extra parameter through to symtab_symbol_info.
      	(info_functions_command): Likewise.
      	(info_types_command): Pass additional argument through to
      	symtab_symbol_info.
      	(rbreak_command): Pass extra argument to search_symbols.
      	(_initialize_symtab): Add extra arguments for calls to
      	info_print_args_help, and update help text for 'info variables',
      	'whereis', and 'info functions' commands.
      	* symtab.h (search_symbols): Add extra argument to declaration.
      	* NEWS: Mention new flags.
      
      gdb/doc/ChangeLog:
      
      	* gdb.texinfo (Symbols): Add information about the -n flag to
      	"info variables" and "info functions".
      
      gdb/testsuite/ChangeLog:
      
      	* gdb.base/info-fun.exp: Extend to test the -n flag for 'info
      	functions'.  Reindent as needed.
      	* gdb.base/info-var-f1.c: New file.
      	* gdb.base/info-var-f2.c: New file.
      	* gdb.base/info-var.exp: New file.
      	* gdb.base/info-var.h: New file.
      4acfdd20
    • Srinath Parvathaneni's avatar
      Add support for the MVE VMOV instruction to the ARM assembler. This... · c4a23bf8
      Srinath Parvathaneni authored
      Add support for the MVE VMOV instruction to the ARM assembler.  This instruction copies the value of one vector register to another vector register.  The patch also modifies the decoding of VORR instruction which is effecting decoding of VMOV instruction.
      
      gas     * config/tc-arm.c (parse_neon_mov): Add check to accept vector
      	register to both the arguments in VMOV instruction.
      	* testsuite/gas/arm/mve-vmov-1.d: Modify.
      	* testsuite/gas/arm/mve-vmov-1.s: Likewise.
      	* testsuite/gas/arm/mve-vorr.d: Likewise.
      
      opcodes	* arm-dis.c (mve_opcodes): Add entry for MVE_VMOV_VEC_TO_VEC.
      	(is_mve_undefined): Add case for MVE_VMOV_VEC_TO_VEC.
      	(print_insn_mve): Add condition to check Qm==Qn of VORR instruction.
      c4a23bf8
    • GDB Administrator's avatar
      Automatic date update in version.in · e8fffdff
      GDB Administrator authored
      e8fffdff
  3. 26 Aug, 2019 8 commits
    • Christian Biesinger's avatar
      Factor out the common code in lookup_{static,global}_symbol · 9aa55206
      Christian Biesinger authored
      The two functions are extremely similar; this factors out their code into
      a shared _internal function.
      
      gdb/ChangeLog:
      
      2019-08-26  Christian Biesinger  <cbiesinger@google.com>
      
      	* symtab.c (lookup_static_symbol): Call the new function (and move
      	it down to be next to lookup_global_symbol).
      	(struct global_sym_lookup_data): Add block_enum member and rename to...
      	(struct global_or_static_sym_lookup_data): ...this.
      	(lookup_symbol_global_iterator_cb): Pass block_index instead of
      	GLOBAL_BLOCK to lookup_symbol_in_objfile and rename to...
      	(lookup_symbol_global_or_static_iterator_cb): ...this.
      	(lookup_global_or_static_symbol): New function.
      	(lookup_global_symbol): Call new function.
      9aa55206
    • Tom de Vries's avatar
      [gdb, c++] Improve error message when using libstdcxx without SDT probes · 5c31b358
      Tom de Vries authored
      When using catch catch/rethrow/catch, a libstdcxx with SDT probes is required
      for both the regexp argument, and the convenience variable $_exception (
      https://sourceware.org/gdb/current/onlinedocs/gdb/Set-Catchpoints.html ).
      
      Currently, when using these features with a libstdcxx without SDT probes, we
      get the cryptic error message:
      ...
      not stopped at a C++ exception catchpoint
      ...
      
      Improve this by instead emitting the more helpful:
      ...
      did not find exception probe (does libstdcxx have SDT probes?)
      ...
      
      Tested on x86_64-linux.
      
      gdb/ChangeLog:
      
      2019-08-26  Tom de Vries  <tdevries@suse.de>
      
      	PR c++/24852
      	* break-catch-throw.c (fetch_probe_arguments): Improve error mesage
      	when pc_probe.prob == NULL.
      
      gdb/testsuite/ChangeLog:
      
      2019-08-26  Tom de Vries  <tdevries@suse.de>
      
      	PR c++/24852
      	* gdb.cp/no-libstdcxx-probe.exp: New test.
      5c31b358
    • Tom de Vries's avatar
      [gdb/testsuite] Make skip_libstdcxx_probe_tests return 1 if true · b694989f
      Tom de Vries authored
      The tcl proc skip_libstdcxx_probe_tests currently returns 0 if the probe tests
      need to be skipped, while tcl interprets 0 as false rather than true, which is
      confusing.
      
      Fix this by making skip_libstdcxx_probe_tests return 1 if the probe tests need
      to be skipped.
      
      Tested on x86_64-linux.
      
      gdb/testsuite/ChangeLog:
      
      2019-08-26  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gdb.exp (skip_libstdcxx_probe_tests_prompt): Return 1 if probe
      	* tests need to be skipped.
      	* gdb.cp/exceptprint.exp: Update call to skip_libstdcxx_probe_tests.
      	* gdb.mi/mi-catch-cpp-exceptions.exp: Update call to
      	mi_skip_libstdcxx_probe_tests.
      b694989f
    • Sergio Durigan Junior's avatar
      Use raw strings on gdb.python/py-xmethods.exp (and fix Python 3.8's... · d9c4ba53
      Sergio Durigan Junior authored
      Use raw strings on gdb.python/py-xmethods.exp (and fix Python 3.8's "SyntaxWarning: invalid escape sequence")
      
      The way unrecognized escape sequences are handled has changed in
      Python 3.8: users now see a SyntaxWarning message, which will
      eventually become a SyntaxError in future versions of Python:
      
        (gdb) source /blabla/gdb.python/py-xmethods/py-xmethods.py
        /blabla/gdb.python/py-xmethods/py-xmethods.py:204: SyntaxWarning: invalid escape seque
        nce \+
          'operator\+',
        /blabla/gdb.python/py-xmethods/py-xmethods.py:211: SyntaxWarning: invalid escape seque
        nce \+
          'operator\+\+',
      
      One of our testcases, gdb.python/py-xmethods.exp, contains strings in
      the form of "operator\+".  This is not recognized by Python, but is
      still needed by the testsuite to work properly.  The solution is
      simple: we just have to make sure these strings are marked as
      raw (i.e, r"").  This is what this patch does.  I took the opportunity
      to also convert other strings to raw, which, in two cases, allowed the
      removal of an extra backslash.
      
      I tested this using Python 3.7 and Python 3.8, and everything works
      fine.
      
      I think I could push this as obvious, but decided to send it to
      gdb-patches just in case.
      
      gdb/testsuite/ChangeLog:
      2019-08-26  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* gdb.python/py-xmethods.exp: Use raw strings when passing
      	arguments to SimpleXMethodMatcher.
      d9c4ba53
    • Alan Modra's avatar
      PR24938, Null Pointer Dereference in debug.c:debug_write_type · 37606e67
      Alan Modra authored
      	PR 24938
      	* debug.c (debug_write_type): Call empty_type for NULL type here..
      	(debug_write_type): ..rather than in just one case here.
      37606e67
    • Kito Cheng's avatar
      RISC-V: Improve li expansion for better code density. · db3b6ecc
      Kito Cheng authored
      li is a pseudo instruction in RISC-V, it might expand to more than one
      instructions if the immediate value can't fit addi or lui, but the
      assembler will always using 4-byte instructions during expansion.
      
      For example:
      
       li a0, 0x12345001
      
      will expand into
      
       12345537 lui a0,0x12345
       00150513 addi a0,a0,1
      
      but addi could be compress into
      
       0505 addi a0,a0,1
      
      It because load_const use macro_build to emit instructions,
      and macro_build call append_insn, and expect it will compress
      it if possible, but the fact is append_insn never compress anything,
      
      So this patch redirect the li expansion flow to normal instruction
      emission flow via md_assemble, added md_assemblef as an wrapper for
      that for easier emit instruction with printf-style argument to build
      instruction.
      
      gas/ChangeLog:
      
      	* tc-riscv.c (md_assemblef): New.
      	(load_const) Use md_assemblef instead of macro_build to emit
      	instructions.
      	* testsuite/gas/riscv/li32.d: New.
      	* testsuite/gas/riscv/li32.s: Ditto.
      	* testsuite/gas/riscv/li64.d: Ditto.
      	* testsuite/gas/riscv/li64.s: Ditto.
      db3b6ecc
    • Simon Marchi's avatar
      dwarf2read: fix compilation issue with gcc 4.8 · 23c13d42
      Simon Marchi authored
      gcc 4.8 (and probably other versions too) doesn't like that the local
      variable symbol_linkage has the same name as the enum class defined in
      the same context:
      
            CXX    dwarf2read.o
          /home/smarchi/src/binutils-gdb/gdb/dwarf2read.c: In member function ‘dwarf2_per_cu_data* dw2_debug_names_iterator::next()’:
          /home/smarchi/src/binutils-gdb/gdb/dwarf2read.c:5850:22: error: ‘symbol_linkage’ is not a class, namespace, or enumeration
             } symbol_linkage = symbol_linkage::unknown;
                            ^
      
      Rename the local variable to avoid this.
      
      This problem was originally reported with the Netbsd builder on the
      buildbot, which uses gcc 5.5, I believe.  I am not able to test it on
      that builder right now, but chances are that the fix will work there
      too.
      
      gdb/ChangeLog:
      
      	* dwarf2read.c (dw2_debug_names_iterator::next): Rename local
      	variable symbol_linkage to symbol_linkage_.
      23c13d42
    • GDB Administrator's avatar
      Automatic date update in version.in · c9d136da
      GDB Administrator authored
      c9d136da
  4. 25 Aug, 2019 3 commits
    • Simon Marchi's avatar
      dwarf2read: replace gdb::optional<bool> with enum · beadd3e8
      Simon Marchi authored
      gdb::optional<bool> is dangerous, because it's easy to do:
      
        if (opt_bool)
      
      when you actually meant
      
        if (*opt_bool)
      
      or vice-versa.  The first checks if the optional is set, the second
      checks if the wrapped bool is true.
      
      Replace it with an enum that explicitly defines the three possible
      states.
      
      gdb/ChangeLog:
      
      	* dwarf2read.c (dw2_debug_names_iterator::next): Use enum to
      	represent whether the symbol is static, dynamic, or we don't
      	know.
      beadd3e8
    • Yoshinori Sato's avatar
      Convert the RX target to make use of target descriptions. · e3ec872f
      Yoshinori Sato authored
      gdb/ChangeLog
      
      2019-08-25  Yoshinori Sato <ysato@users.sourceforge.jp>
      
      	* gdb/rx-tdep.c (rx_register_names): New.
      	(rx_register_name): Delete.
      	(rx_psw_type): Delete.
      	(rx_fpsw_type): Delete.
      	(rx_register_type): Delete.
      	(rx_gdbarch_init): Convert target-descriptions.
      	(_initialize_rx_tdep): Add initialize_tdesc_rx.
      	* gdb/features/Makefile: Add rx.xml.
      	* gdb/features/rx.xml: New.
      	* gdb/features/rx.c: Generated.
      	* gdb/NEWS: Mention target description support.
      
      gdb/doc/ChangeLog:
      
      2019-08-25  Yoshinori Sato <ysato@users.sourceforge.jp>
      
      	* gdb.texinfo (Standard Target Features): Add RX Features sub-section.
      e3ec872f
    • GDB Administrator's avatar
      Automatic date update in version.in · 25602020
      GDB Administrator authored
      25602020
  5. 24 Aug, 2019 3 commits
    • Christian Biesinger's avatar
      Fix compile warning in symtab.c · d0509ba4
      Christian Biesinger authored
      My compiler (g++ 8.2) can't tell that *bsc_ptr and *slot_ptr are
      only used in the cases when it does get initialized. Just initialize
      the vars earlier to avoid the warning, there does not seem to be a
      downside to it.
      
      ../../gdb/symtab.c: In function ‘block_symbol lookup_static_symbol(const char*, domain_enum)’:
      ../../gdb/symtab.c:1366:11: warning: ‘slot’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           xfree (slot->value.not_found.name);
           ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../gdb/symtab.c:2578:29: note: ‘slot’ was declared here
         struct symbol_cache_slot *slot;
                                   ^~~~
      ../../gdb/symtab.c:1405:3: warning: ‘bsc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (bsc == NULL)
         ^~
      ../../gdb/symtab.c:2577:30: note: ‘bsc’ was declared here
         struct block_symbol_cache *bsc;
                                    ^~~
      ../../gdb/symtab.c: In function ‘block_symbol lookup_global_symbol(const char*, const block*, domain_enum)’:
      ../../gdb/symtab.c:1366:11: warning: ‘slot’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           xfree (slot->value.not_found.name);
           ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../gdb/symtab.c:2658:29: note: ‘slot’ was declared here
         struct symbol_cache_slot *slot;
                                   ^~~~
      ../../gdb/symtab.c:1409:14: warning: ‘bsc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             ++bsc->collisions;
               ~~~~~^~~~~~~~~~
      ../../gdb/symtab.c:2657:30: note: ‘bsc’ was declared here
         struct block_symbol_cache *bsc;
                                    ^~~
      
      gdb/ChangeLog:
      
      2019-08-22  Christian Biesinger  <cbiesinger@google.com>
      
      	* symtab.c (symbol_cache_lookup): Always initialize *bsc_ptr and *slot_ptr.
      d0509ba4
    • Alan Modra's avatar
      PowerPC64 segfault in ppc64_elf_edit_toc · 6d5554a6
      Alan Modra authored
      Found on a GOT reference to __ehdr_start, which is tweaked to be
      undefined weak at some stages of linking.  SYMBOL_REFERENCES_LOCAL
      isn't a sufficient test.
      
      	* elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
      	symbols from GOT optimisation.
      6d5554a6
    • GDB Administrator's avatar
      Automatic date update in version.in · 8a9455cc
      GDB Administrator authored
      8a9455cc
  6. 23 Aug, 2019 8 commits
    • Sergio Durigan Junior's avatar
      Move gdb-dlfcn.[ch] to gdbsupport/ · 2d41fa11
      Sergio Durigan Junior authored
      I need to use 'gdb_dlopen' inside 'gdbsupport/', but it's not yet
      supported there.  This commit moves 'gdb-dlfcn.[ch]' to 'gdbsupport/',
      which makes it available also on gdbserver.
      
      gdb/ChangeLog:
      2019-08-23  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* configure.ac: Don't check for 'dlfcn.h' (moved to
      	gdbsupport/common.m4).
      	* Makefile.in (COMMON_SFILES): Move 'gdb-dlfcn.c' to
      	'gdbsupport/'.
      	(HFILES_NO_SRCDIR): Likewise, for 'gdb-dlfcn.h'.
      	* compile/compile-c-support.c: Include
      	'gdbsupport/gdb-dlfcn.h'.
      	* gdbsupport/common.m4: Check for 'dlfcn.h'.
      	* gdb-dlfcn.c: Move to...
      	* gdbsupport/gdb-dlfcn.c: ... here.
      	* gdb-dlfcn.h: Move to...
      	* gdbsupport/gdb-dlfcn.h: ... here.
      
      gdb/gdbserver/ChangeLog:
      2019-08-23  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
      	(OBS): Add 'gdbsupport/gdb-dlfcn.o'.
      	* config.in: Regenerate.
      	* configure: Regenerate.
      2d41fa11
    • Sandra Loosemore's avatar
      Fix bug in nios2 prologue analysis. · de8af808
      Sandra Loosemore authored
      The nios2 prologue analyzer was mistakenly using an unsigned int field
      to represent a 32-bit signed value.  This caused problems with an
      incorrect conversion being applied to negative values when they were
      automatically promoted for addition to a 64-bit CORE_ADDR value.
      
      This patch fixes test failures in gdb.base/large-frame.exp and
      gdb.dwarf2/dw2-ref-missing-frame.exp.  Normally the nios2 backend
      prefers to use the dwarf2 unwinder so the prologue analyzer is only
      invoked if there is no dwarf2 information.
      
      2019-08-23  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gdb/
      	* nios2-tdep.c (struct reg_value): Improve comments.  Make
      	the offset field signed.
      de8af808
    • Stafford Horne's avatar
      or1k: Fix incorrect value in PLT GOT entries, causing infinite loop · 09f7b0de
      Stafford Horne authored
      The PLT GOT entry should point to the first PLT entry which contains the
      runtime linker function.  It was pointing back to the symbol PLT entry
      causing an infinite loop.
      
      I found this when testing the OpenRISC glibc port which uses the runtime
      dynamic linker.  It seems other libc's we use so far have not been
      making use of the initial PLT GOT entries.
      
      bfd/ChangeLog:
      
      	* elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
      	PLT GOT entries.
      09f7b0de
    • Nick Clifton's avatar
      Stop the BFD library from failing when encountering a second set of relocs for the same section. · a7ba3896
      Nick Clifton authored
      	PR 24456
      	* elf.c (bfd_section_from_shdr): Issue an informative warning
      	message and continue processing other sections after encountering
      	a reloc section for a section which already has other relocs
      	associated with it.
      a7ba3896
    • Alan Modra's avatar
      PR24933, Memory leak in elf_x86_64_get_synthetic_symtab · 2600d80c
      Alan Modra authored
      	PR 24933
      	* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
      	on error without freeing plts[] contents.
      2600d80c
    • Nick Clifton's avatar
      Updated Swedish translation for the gas sub-directory. · fe4b77d9
      Nick Clifton authored
      2019-08-23  Nick Clifton  <nickc@redhat.com>
      
      	* po/sv.po: Updated Swedish translation.
      fe4b77d9
    • Nick Clifton's avatar
      Prevent a potential illegal memory access in the DWARF parser when processing a corrupt file. · afc72f15
      Nick Clifton authored
      	PR 24829
      	* dwarf.c (check_uvalue): New function.  Ensures that a block's
      	size is valid.
      	(read_and_display_attr_value): Use check_value when processsing
      	DW_FORM_block<n> attributes.
      afc72f15
    • GDB Administrator's avatar
      Automatic date update in version.in · 1aa7f807
      GDB Administrator authored
      1aa7f807
  7. 22 Aug, 2019 10 commits
    • Christian Biesinger's avatar
      Make GDB compile with Python 3 on MinGW · 27204489
      Christian Biesinger authored
      PyFile_FromString and PyFile_AsFile have been removed in Python 3.
      There is no obvious replacement that works here, and we can't just
      pass our FILE* to a DLL in Windows because it may use a different
      C runtime.
      
      So we just call a Python function which reads and executes file
      contents. Care must be taken to execute it in the context of
      __main__.
      
      Tested by inverting the ifdef and running the testsuite on Debian
      Linux (even without the patch, I failed at running the testsuite
      on Windows). I did test with both Python 2 and 3.
      
      gdb/ChangeLog:
      
      2019-08-22  Christian Biesinger  <cbiesinger@google.com>
      
      	* python/lib/gdb/__init__.py (_execute_file): New function.
      	* python/python.c (python_run_simple_file): Call gdb._execute_file
      	on Windows.
      27204489
    • Tom de Vries's avatar
      [gdb/testsuite] Make gdb_test message more informative in multi-term-settings.exp · 395fad09
      Tom de Vries authored
      This racy fail message, reported in PR24929:
      ...
      FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: \
        stop with control-c
      ...
      does not make clear which gdb_test fails here:
      ...
          if {$expect_ttou} {
             gdb_test "" "Quit" "stop with control-c"
          } else {
             gdb_test "" "received signal SIGINT.*" "stop with control-c"
          }
      ...
      
      Fix this by making the gdb_test message argument more informative.
      
      Tested on x86_64-linux.
      
      gdb/testsuite/ChangeLog:
      
      2019-08-22  Tom de Vries  <tdevries@suse.de>
      
      	* gdb.multi/multi-term-settings.exp (coretest): Make gdb_test messages
      	more informative.
      395fad09
    • Dennis Zhang's avatar
      Arm: Add support for missing CPUs · 0535e5d7
      Dennis Zhang authored
      This patch adds support for following CPUs:
      Cortex-M35P, Cortex-A77, Cortex-A76AE.
      
      Related specifications can be found at https://developer.arm.com/ip-products/processors.
      
      gas/ChangeLog:
      
      	* config/tc-arm.c: New entries for Cortex-M35P, Cortex-A77,
      	and Cortex-A76AE.
      	* doc/c-arm.texi: Document new processors.
      	* testsuite/gas/arm/cpu-cortex-a76ae.d: New test.
      	* testsuite/gas/arm/cpu-cortex-a77.d: New test.
      	* testsuite/gas/arm/cpu-cortex-m35p.d: New test.
      
      bfd/ChangeLog:
      
      	* cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
      0535e5d7
    • Nick Clifton's avatar
      Fix an illegal memory access when dumping corrupt x86_64 PE unwind data. · 03da31c6
      Nick Clifton authored
      	PR 24922
      	* pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
      	reading data from extra records.
      03da31c6
    • Nick Clifton's avatar
      93d6a337
    • Nick Clifton's avatar
      Prevent a floating point exception in the dwarf parser when a CU or TU table... · 4ac948a0
      Nick Clifton authored
      Prevent a floating point exception in the dwarf parser when a CU or TU table does not have any columns.
      
      	PR 24921
      	* dwarf.c (process_cu_tu_index): Handle the case where a table
      	does not have any columns.
      4ac948a0
    • Bosco Garc?a's avatar
      Fix the assembler's floating point number parser so that it can correctly... · a3197745
      Bosco Garc?a authored
      Fix the assembler's floating point number parser so that it can correctly handle numbers encoded as a leading decimal point, followed by zeroes, followed by a non-zero sequence.
      
      	* atof-generic.c (atof_generic): Do not ignore leading zeros if
      	they appear after a decimal point.
      	* testsuite/gas/all/float.s: Extend test to include a number with
      	a leading decimal point followed by several zeroes.
      	* testsuite/gas/i386/fp.s: Likewise.
      	* testsuite/gas/i386/fp.d: Update expected output.
      a3197745
    • Andrew Burgess's avatar
      gdb/fortran: Remove some dead code from the parser · 43771869
      Andrew Burgess authored
      The Fortran parser contains some code that looks like it was probably
      inherited from the C/C++ parser as it checks to see if the current
      language is C++, which should never be true when we're in the Fortran
      parser.
      
      gdb/ChangeLog:
      
      	* f-exp.y (yylex): Remove is_a_field_of_this local variable, and
      	all uses as this was never set to anything but a zero value.
      43771869
    • Tamar Christina's avatar
      AArch64: Fix LD crash on weak and undefined TLS symbols. (PR/24602). · 652afeef
      Tamar Christina authored
      This patch fixes a few linker crashes due to TLS code reaching an assert when it
      shouldn't.
      
      The first scenario is with weak TLS symbols that remain weak during linking.  In
      this case the mid-end would not have seen a TLS symbol and so wouldn't have
      allocated the TLS section.  We currently assert here and the linker crashes with
      a not very useful message.
      
      This patch changes this to return the value 0 for the TLS symbol in question
      emulating what lld and gold and other BFD targets do.  However because weak TLS
      is implementation defined and we don't define any behavior for it I also emit a
      warning to the user to inform them of such.
      
      Secondly when a strong TLS reference is undefined. The linker crashes even after
      it correctly reported that there is an undefined reference.  This changes it so
      that it gracefully exits and reports a useful error.
      
      bfd/ChangeLog:
      
      	PR ld/24601
      	* elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
      	Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
      	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
      	* elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
      	for weak TLS.
      
      ld/ChangeLog:
      
      	PR ld/24601
      	* testsuite/ld-aarch64/aarch64-elf.exp (undef-tls, weak-tls): New.
      	* testsuite/ld-aarch64/undef-tls.d: New test.
      	* testsuite/ld-aarch64/undef-tls.s: New test.
      	* testsuite/ld-aarch64/weak-tls.d: New test.
      	* testsuite/ld-aarch64/weak-tls.s: New test.
      652afeef
    • Barnaby Wilks's avatar
      Implement a float16 directive for assembling 16 bit IEEE 754 floating point... · b20d3859
      Barnaby Wilks authored
      Implement a float16 directive for assembling 16 bit IEEE 754 floating point numbers for the AArch64 assembler.
      
      The syntax of the directive is:
      
           .float16 <0-n decimal numbers>
      e.g.
           .float16 0.5
           .float16 10.2, NaN, 452.09
      
      The floats will always be encoded using the binary16 format as described in the
      IEEE 754-2008 standard. There is no need to support Arm's alternative half-precision
      format since AArch64 only supports the IEEE format.
      
      gas	* config/tc-aarch64.c: Add float16 directive and add "Hh" to
      	acceptable float characters.
      	* doc/c-aarch64.texi: Documentation for float16 directive.
      	* testsuite/gas/aarch64/float16-be.d: New test.
      	* testsuite/gas/aarch64/float16-le.d: New test.
      	* testsuite/gas/aarch64/float16.s: New test.
      	* NEWS: Add NEWS entry.
      b20d3859