1. May 13, 2021
    • Simon Marchi's avatar
      gdb: remove cmd_list_element::pre_show_hook · 0b2256f7
      Simon Marchi authored
      This is unused, remove it.
      
      gdb/ChangeLog:
      
      	* cli/cli-decode.h (struct cmd_list_element) <pre_show_hook>:
      	Remove.
      	* cli/cli-setshow.c (do_show_command): Adjust.
      
      Change-Id: Ib9cd79d842550392b062309e1e5c079ad5d7571a
      0b2256f7
    • Nick Clifton's avatar
      revert previous delta · 0522d016
      Nick Clifton authored
      0522d016
    • Nick Clifton's avatar
      Fix an infinite loop in the DWARF decoder when parsing a corrupt string table. · c4375dd7
      Nick Clifton authored
      	PR 27861
      	* dwarf.c (display_debug_str_offsets): Warn if the length field is
      	larger than the amount of data remaining in the section.
      c4375dd7
    • Alan Modra's avatar
      PR27861, Infinite loop in dwarf.c:7507-7526 · b96a1bcb
      Alan Modra authored
      	PR 27861
      	* dwarf.c (display_debug_str_offsets): Sanity check dwarf5
      	header length.
      b96a1bcb
    • Alan Modra's avatar
      PR27860, Segmentation fault on readelf -w · d21f875d
      Alan Modra authored
      Well it didn't take long for the SAFE_BYTE_GET assert to trigger.
      
      	PR 27860
      	* dwarf.c (display_debug_frames): Sanity check cie_off before
      	attempting to read cie.
      d21f875d
    • Luis Machado's avatar
      [AArch64] Fix off-by-one when calculating tag granules. · 0746f49b
      Luis Machado authored
      When we want to fetch tags from a memory range, the last address in that
      range is not included.
      
      There is a off-by-one error in aarch64_mte_get_tag_granules, which this
      patch fixes.
      
      gdb/ChangeLog:
      
      2021-05-13  Luis Machado  <luis.machado@linaro.org>
      
      	* arch/aarch64-mte-linux.c (aarch64_mte_get_tag_granules): Don't
      	include the last address in the range.
      0746f49b
    • Nelson Chu's avatar
      RISC-V: Record implicit subsets in a table, to avoid repeated codes. · 7671eff8
      Nelson Chu authored
      Add a new table, riscv_implicit_subsets, to record all implicit information.
      So that we add all implicit subsets according to the table, to avoid too
      many repeated codes in the riscv_parse_add_implicit_subsets.  Besides, the
      check_func is used to check whether we should add this implicit subset.
      For example, check_implicit_for_i checks the version of i, and we only add
      zicsr and zifencei implicitly only when the version less than 2.1.
      
      bfd/
          * elfxx-riscv.c (check_implicit_always): The check_func, always add
          the implicit subset without checking.
          (check_implicit_for_i): The check_func for i, only add zicsr and
          zifencei when the version of i less than 2.1.
          (struct riscv_implicit_subset): Record the subsets and their
          corresponding implicit subsets.
          (riscv_implicit_subsets): Table records all implicit informations.
          (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
          according to riscv_implicit_subsets.  Remove the redundant codes.
      7671eff8
    • Fangrui Song's avatar
      ld: Add -Bno-symbolic · cf893b0e
      Fangrui Song authored
      	PR 27834
      	* ldlex.h (enum option_values): Add OPTION_NO_SYMBOLIC.
      	* lexsup.c (ld_options): Add -Bno-symbolic.
      	(parse_args): Handle -Bno-symbolic.
      	* ld.texi: Document -Bno-symbolic.
      	* NEWS: Mention -Bno-symbolic.
      	* testsuite/ld-elf/shared.exp: Add a test.
      cf893b0e
    • Alan Modra's avatar
      PR27858, global-buffer-overflow · 4863cddb
      Alan Modra authored
      	PR 27858
      	* elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
      	reloc howto.
      4863cddb
    • GDB Administrator's avatar
      Automatic date update in version.in · 3e5fac07
      GDB Administrator authored
      3e5fac07
    • Simon Marchi's avatar
      gdb: make gdbpy_parse_command_name return a unique_xmalloc_ptr · 4b8cb9dd
      Simon Marchi authored
      This avoids some manual memory management.
      
      cmdpy_init correctly transfers ownership of the name to the
      cmd_list_element, as it sets the name_allocated flag.  However,
      cmdpy_init (and add_setshow_generic) doesn't, it looks like the name is
      just leaked.  This is a bit tricky, because it actually creates two
      commands (one set and one show), it would take a bit of refactoring of
      the command code to give each their own allocated copy.  For now, just
      keep doing what the current code does but in a more explicit fashion,
      with an explicit release.
      
      gdb/ChangeLog:
      
      	* python/python-internal.h (gdbpy_parse_command_name): Return
      	gdb::unique_xmalloc_ptr.
      	* python/py-cmd.c (gdbpy_parse_command_name): Likewise.
      	(cmdpy_init): Adjust.
      	* python/py-param.c (parmpy_init): Adjust.
      	(add_setshow_generic): Take gdb::unique_xmalloc_ptr, release it
      	when done.
      
      Change-Id: Iae5bc21fe2b22f12d5f954057b0aca7ca4cd3f0d
      4b8cb9dd
  2. May 12, 2021
    • Tom de Vries's avatar
      Revert "[gdb/symtab] Fix infinite recursion in dwarf2_cu::get_builder()" · 3db19b2d
      Tom de Vries authored
      This reverts commit 4cf88725.
      
      It causes the following regression:
      ...
      $ cat shadow.cc
      namespace A {}
      
      int
      main()
      {
        using namespace A;
        return 0;
      }
      $ g++-10 -g shadow.cc -flto -o shadow
      $ ./gdb -q -batch ./shadow  -ex "b main"
      Aborted (core dumped)
      ...
      3db19b2d
    • Alan Modra's avatar
      Ensure data pointer kept within bounds · a7077ce7
      Alan Modra authored
      	* dwarf.c (process_extended_line_op): Don't bump data pointer past
      	end when strnlen doesn't find string terminator.
      	(decode_location_expression): Remove dead code.
      	(skip_attr_bytes): Remove const from end param.  Ensure data
      	pointer doesn't pass end.
      	(get_type_signedness): Remove const from end param.
      	(read_and_display_attr_value): Ensure data pointer doesn't pass end.
      	(display_debug_lines_raw, display_debug_lines_decoded): Likewise.
      	(display_debug_pubnames_worker): Likewise.
      	(display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
      	than blindly incrementing data pointer.
      	(display_debug_addr, display_debug_str_offsets): Likewise.  Don't
      	compare pointers, compare lengths.
      a7077ce7
    • Alan Modra's avatar
      SAFE_BYTE_GET · 6d1ad6f7
      Alan Modra authored
      This rearranges SAFE_BYTE_GET* macros, eliminating some duplication,
      and making sure that the _INC variants never increment their PTR arg
      past END.  I've added an assertion that should show us places where we
      use them improperly with user derived PTR args, which I'm sure the
      fuzzers will find for us.
      
      	* dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
      	(SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
      	(SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
      	(display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
      	SAFE_BYTE_GET followed by increment.
      	(process_debug_info): Likewise, and test bytes remaining before
      	incrementing section_begin rather than using pointer comparison.
      	(display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
      	(process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
      6d1ad6f7
    • Alan Modra's avatar
      SAFE_BYTE_GET64 · af2ddf69
      Alan Modra authored
      Functions dealing with lack of a 64-bit integer type can disappear now
      that we require C99.  Printing using dwarf_vmatoa is better too.
      
      binutils/
      	* dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
      	(skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
      	SAFE_BYTE_GET_AND_INC.
      	(read_and_display_attr_value): Likewise.  Print using dwarf_vmatoa.
      	(process_debug_info, process_cu_tu_index): Likewise.
      	* elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
      	(byte_get, byte_get_little_endian, byte_get_big_endian),
      	(byte_get_signed): Make size param unsigned.  Remove code dealing
      	with 4-byte elf_vma.
      	(byte_get_64): Delete.
      	* elfcomm.h  (byte_put, byte_put_little_endian, byte_put_big_endian),
      	(byte_get, byte_get_little_endian, byte_get_big_endian),
      	(byte_get_signed): Update prototypes.
      	(byte_get_64): Delete.
      gas/
      	* testsuite/gas/elf/dwarf-5-file0.d: Update.
      	* testsuite/gas/i386/dwarf5-line-1.d: Update.
      af2ddf69
    • Alan Modra's avatar
      PR27836, readelf -w pointer comparison UB · 0d872fca
      Alan Modra authored
      	PR 27836
      	* dwarf.c (display_debug_frames): Don't compare pointers derived
      	from user input.  Test offset against bounds instead.
      0d872fca
    • George Barrett's avatar
      Guile: add value-const-value · ee35ce82
      George Barrett authored
      The Guile API doesn't currently have an equivalent to the Python API's
      gdb.Value.const_value(). This commit adds a procedure with equivalent
      semantics to the Guile API.
      
      gdb/ChangeLog:
      
      	* NEWS (Guile API): Note the addition of the new procedure.
      	* guile/scm-value.c (gdbscm_value_const_value): Add
      	implementation of value-const-value procedure.
      	(value_functions): Add value-const-value procedure.
      
      gdb/doc/ChangeLog:
      
      	* guile.texi (Values From Inferior In Guile): Add documentation
      	for value-const-value.
      
      gdb/testsuite/ChangeLog:
      
      	* gdb.guile/scm-value.exp (test_value_in_inferior): Add test for
      	value-const-value.
      ee35ce82
    • George Barrett's avatar
      Guile: add value-{rvalue-,}reference-value · 9d4fc61d
      George Barrett authored
      The Guile API doesn't currently have an equivalent to the Python API's
      Value.reference_value() or Value.rvalue_reference_value(). This commit
      adds a procedure with equivalent semantics to the Guile API.
      
      gdb/ChangeLog:
      
      	* NEWS (Guile API): Note the addition of new procedures.
      	* guile/scm-value.c (gdbscm_reference_value): Add helper function
      	for reference value creation.
      	(gdbscm_value_reference_value): Add implementation of
      	value-reference-value procedure.
      	(gdbscm_value_rvalue_reference_value): Add implementation of
      	value-rvalue-reference-value procedure.
      	(value_functions): Add value-reference-value procedure.  Add
      	value-rvalue-reference-value procedure.
      
      gdb/doc/ChangeLog:
      
      	* guile.texi (Values From Inferior In Guile): Add documentation
      	for value-reference-value.  Add documentation for
      	value-rvalue-reference-value.
      
      gdb/testsuite/ChangeLog:
      
      	* gdb.guile/scm-value.exp (test_value_in_inferior): Add test for
      	value-reference-value.  Add test for value-rvalue-reference-value.
      9d4fc61d
    • George Barrett's avatar
      Guile: improved rvalue reference support · 97cef6b7
      George Barrett authored
      Adds a couple of missing bits to the Guile API to make C++11 rvalue
      reference values and types usable from Guile scripts.
      
      gdb/ChangeLog:
      
      	* guile/scm-type.c (type_integer_constants): Add binding for
      	TYPE_CODE_RVALUE_REF.
      	* guile/scm-value.c (gdbscm_value_referenced_value): Handle
      	dereferencing of rvalue references.
      	* NEWS (Guile API): Note improvements in rvalue reference support.
      
      gdb/doc/ChangeLog:
      
      	* guile.texi (Types In Guile): Add documentation for
      	TYPE_CODE_RVALUE_REF.
      97cef6b7
    • Richard Earnshaw's avatar
      arm: fix fallout from recent thumb2 detection patch · 84139c58
      Richard Earnshaw authored
      The recent change to correct the detection of thumb2 object files
      resulted in a ld test for veneering starting to fail.  The problem was
      the test itself, which was incorrectly expecting thumb1 type far-call
      veneers instead of the thumb2 flavour.  We already have a dump file of
      the expected form, so the fix is to change the expected output
      accordingly.
      
      ld/
      
      	* testsuite/ld-arm/arm-elf.exp (farcall test for v8-m.mainline):
      	Correct expected output.
      84139c58
    • Marco Barisione's avatar
      gdb: generate the prefix name for prefix commands on demand · 2f822da5
      Marco Barisione authored
      Previously, the prefixname field of struct cmd_list_element was manually
      set for prefix commands.  This seems verbose and error prone as it
      required every single call to functions adding prefix commands to
      specify the prefix name while the same information can be easily
      generated.
      
      Historically, this was not possible as the prefix field was null for
      many commands, but this was fixed in commit
      3f4d92eb by Philippe Waroquiers, so
      we can rely on the prefix field being set when generating the prefix
      name.
      
      This commit also fixes a use after free in this scenario:
      * A command gets created via Python (using the gdb.Command class).
        The prefix name member is dynamically allocated.
      * An alias to the new command is created. The alias's prefixname is set
        to point to the prefixname for the original command with a direct
        assignment.
      * A new command with the same name as the Python command is created.
      * The object for the original Python command gets freed and its
        prefixname gets freed as well.
      * The alias is updated to point to the new command, but its prefixname
        is not updated so it keeps pointing to the freed one.
      
      gdb/ChangeLog:
      
      	* command.h (add_prefix_cmd): Remove the prefixname argument as
      	it can now be generated automatically.  Update all callers.
      	(add_basic_prefix_cmd): Ditto.
      	(add_show_prefix_cmd): Ditto.
      	(add_prefix_cmd_suppress_notification): Ditto.
      	(add_abbrev_prefix_cmd): Ditto.
      	* cli/cli-decode.c (add_prefix_cmd): Ditto.
      	(add_basic_prefix_cmd): Ditto.
      	(add_show_prefix_cmd): Ditto.
      	(add_prefix_cmd_suppress_notification): Ditto.
      	(add_prefix_cmd_suppress_notification): Ditto.
      	(add_abbrev_prefix_cmd): Ditto.
      	* cli/cli-decode.h (struct cmd_list_element): Replace the
      	prefixname member variable with a method which generates the
      	prefix name at runtime.  Update all code reading the prefix
      	name to use the method, and remove all code setting it.
      	* python/py-cmd.c (cmdpy_destroyer): Remove code to free the
      	prefixname member as it's now a method.
      	(cmdpy_function): Determine if the command is a prefix by
      	looking at prefixlist, not prefixname.
      2f822da5
    • Luis Machado's avatar
      Add MTE register set support for core files · f0bbe8ba
      Luis Machado authored
      	* elf-bfd.h (elfcore_write_aarch_mte): New prototype.
      	* elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
      	functions.
      	(elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
      	(elfcore_write_register_note): Handle MTE notes.
      f0bbe8ba
    • Markus Metzger's avatar
      gdb, btrace, pt: ignore status update enable events · d51344c9
      Markus Metzger authored
      Future versions of libipt report enable/disable status updates on PSB+.
      Ignore them.
      d51344c9
    • Alan Modra's avatar
      PR27853, Infinite loop in dwarf.c · 55b26492
      Alan Modra authored
      Not quite infinite but much longer than it need be.  The problem is
      triggered by read_and_display_attr_value incrementing "data" past
      "end".  read_and_display_attr_value shouldn't do that, but be
      defensive.
      
      	PR 27853
      	* dwarf.c (display_formatted_table): Test for data >= end rather
      	than data == end.
      	(process_extended_line_op): Likewise.
      	(display_debug_lines_raw): Likewise.
      	(display_debug_lines_decoded): Likewise.
      55b26492
    • Alan Modra's avatar
      PR27849, heap-buffer-overflow on readelf -w · 5ab39075
      Alan Modra authored
      	PR 27849
      	* dwarf.c (fetch_indexed_string): Correct length sanity checks.
      	Sanity check section size for version and padding too.  Correct
      	index sanity check.  Handle multiple tables in .debug_str_offsets.
      5ab39075
    • Mike Frysinger's avatar
      sim: clean up explicit environment build calls · 425b0b1a
      Mike Frysinger authored
      This was enabled by default for all targets, but a few ports still
      include an explicit call.  Clean that up, and update the docs.
      425b0b1a
    • Luis Machado's avatar
      Fix build failure in d10v sim · e7e40ced
      Luis Machado authored
      While building all targets on Ubuntu 20.04/aarch64, I ran into the following
      build error:
      
      In file included from /usr/include/string.h:495,
                       from ../../bfd/bfd.h:48,
                       from ../../../../repos/binutils-gdb/sim/d10v/interp.c:4:
      In function memset,
          inlined from sim_create_inferior at ../../../../repos/binutils-gdb/sim/d10v/interp.c:1146:3:
      /usr/include/aarch64-linux-gnu/bits/string_fortified.h:71:10: error: __builtin_memset offset [33, 616] from the object at State is out of the bounds of referenced subobject regs with type reg_t[16] {aka short unsigned int[16]} at offset 0 [-Werror=array-bounds]
         71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make[3]: *** [Makefile:558: interp.o] Error 1
      
      The following patch fixes this.
      
      sim/ChangeLog:
      
      2021-05-12  Luis Machado  <luis.machado@linaro.org>
      
      	* d10v/interp.c (sim_create_inferior): Fix memset call.
      e7e40ced
    • Roland McGrath's avatar
      x86-64/ELF: Fix "clear src_mask for all reloc types" test case · 4a1ad5c9
      Roland McGrath authored
      ld/
      	* testsuite/ld-x86-64/rela.d: Fix regexp not to presume a specific
      	address layout, so it works for e.g. --target=x86-64-elf.
      4a1ad5c9
    • GDB Administrator's avatar
      Automatic date update in version.in · ad9e0d9c
      GDB Administrator authored
      ad9e0d9c
    • Simon Marchi's avatar
      gdb: fix indentation in arm_record_data_proc_misc_ld_str · f2a883a8
      Simon Marchi authored
      The scopes under this "if" are over-indented, fix that.
      
      gdb/ChangeLog:
      
      	* arm-tdep.c (arm_record_data_proc_misc_ld_str): Fix
      	indentation.
      
      Change-Id: I84a551793207ca95d0bc4f122e336555c8179c0e
      f2a883a8
    • Simon Marchi's avatar
      gdb: fix indentation of cmd_list_element · 64f30eb0
      Simon Marchi authored
      This structure declaration is over-indented, fix that.
      
      gdb/ChangeLog:
      
      	* cli/cli-decode.h (struct cmd_list_element): Fix indentation.
      
      Change-Id: I17c9cd739a233239b3add72f4fce7947c20907cd
      64f30eb0
  3. May 11, 2021
    • Richard Earnshaw's avatar
      arm: correctly decode Tag_THUMB_ISA_use=3 for thumb2 features · d8147d70
      Richard Earnshaw authored
      This was detected when a user accidentally tried to build a shared
      library using armv8-m.main objects.  The resulting error was "warning:
      thumb-1 mode PLT generation not currently supported".  Something was
      clearly wrong because v8-m.main is a thumb-2 variant.
      
      It turns out that the code to detect thumb-2 in object files hadn't
      been updated for the extended definition of Tag_THUMB_ISA_use to
      support the value 3, meaning 'work it out for yourself from the
      architecture tag'; something that is now necessary given that the line
      between thumb-1 and thumb-2 has become blurred over time.
      
      Another problem with the function doing this calculation was that the
      absence of this tag (implying a default value 0) should mean use of
      thumb code was NOT permitted.  However, the code went on to look at
      the architecture flags and decide that it could ignore this if the
      architecture flags said that thumb2 features were available, thus
      completely ignoring the intended meaning.
      
      bfd/
      
      	* elf32-arm.c (using_thumb2): Correctly handle Tag_THUMB_ISA_use
      	values 0 and 3.
      d8147d70
    • Hans-Peter Nilsson's avatar
      dwarf.c (process_abbrev_set): Properly parenthesize, fix fallout · d30182b5
      Hans-Peter Nilsson authored
      Building as ILP32 shows:
      
       gcc -m32 -DHAVE_CONFIG_H -I. -I/checkout/binutils  -I. -I/checkout/binutils -I../bfd -I/checkout/binutils/../bfd -I/checkout/binutils/../include -DLOCALEDIR="\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -I/checkout/binutils/../zlib -g -O2   -MT dwarf.o -MD -MP -MF $depbase.Tpo -c -o dwarf.o /checkout/binutils/dwarf.c &&\
       mv -f $depbase.Tpo $depbase.Po
       In file included from /checkout/binutils/sysdep.h:101:0,
                        from /checkout/binutils/dwarf.c:21:
       /checkout/binutils/dwarf.c: In function 'process_abbrev_set':
       /checkout/binutils/dwarf.c:1072:15: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'dwarf_vma {aka long long unsigned int}' [-Werror=format=]
              warn (_("Debug info is corrupted, abbrev size (%lx) is larger than "
                      ^
       /checkout/binutils/dwarf.c:1072:13: note: in expansion of macro '_'
              warn (_("Debug info is corrupted, abbrev size (%lx) is larger than "
                    ^
       cc1: all warnings being treated as errors
       Makefile:1101: recipe for target 'dwarf.o' failed
      
      The recent commit, casting one of the terms, has an obvious
      typo.  To wit, the (non-cast) term abbrev_size is a
      dwarf_vma and causes the whole expression to (still) be 64
      bits.
      
      binutils:
      	* dwarf.c (process_abbrev_set): Properly parenthesize before
      	casting to unsigned long.
      d30182b5
    • Tom de Vries's avatar
      [gdb/testsuite] Update infrun regexp in gdb.base/watch_thread_num.exp · 5048549a
      Tom de Vries authored
      The test-case gdb.base/watch_thread_num.exp contains an infrun regexp:
      ...
             -re "infrun:" {
      ...
      which doesn't trigger because:
      - the test-case doesn't contain "set debug infrun 1", and
      - if we hack the test-case to add this, the regexp doesn't match
        because "[infrun] " is printed instead.
      
      Make the test pass with "set debug infrun 1" and add the setting commented
      out.
      
      Tested on x86_64-linux.
      
      gdb/testsuite/ChangeLog:
      
      2021-05-11  Tom de Vries  <tdevries@suse.de>
      
      	* gdb.base/watch_thread_num.exp: Fix "set debug infrun 1" FAILs.
      	Add "set debug infrun 1" commented out.
      5048549a
    • Tom de Vries's avatar
      [gdb/testsuite] Fix read1 timeout in gdb.base/gdb-sigterm.exp · 2302f963
      Tom de Vries authored
      When running check-read1, I run into a timeout in test-case
      gdb.base/gdb-sigterm.exp:
      ...
        [infrun] handle_inferior_event: status->kind = stopped, \
          signal = GDB_SIGNAL_TRAP^M
        [infrun] start_step_over: enter^M
          [infrun] start_step_overFAIL: gdb.base/gdb-sigterm.exp: \
            expect eof #0 (timeout)
      gdb.base/gdb-sigterm.exp: expect eof #0: stepped 0 times
      FAIL: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes
      ...
      
      The corresponding gdb_test_multiple has an exp_continue clause, but it doesn't
      trigger because the regexp greps for 'infrun: ' instead of '[infrun] '.
      
      Fix the timeout by fixing the infrun regexp.
      
      Tested on x86_64-linux, with check and check-read1.
      
      gdb/testsuite/ChangeLog:
      
      2021-05-11  Tom de Vries  <tdevries@suse.de>
      
      	* gdb.base/gdb-sigterm.exp: Fix exp_continue regexp.
      2302f963
    • Bhuvanendra Kumar N's avatar
      gdb/fortran: Breakpoint location is modified. · abb894a4
      Bhuvanendra Kumar N authored
      Breakpoint location is modified to "return" statement which is
      outside the DO loop. Because the label 100 of DO loop should get
      executed for each iteration as shared in this external link:
      http://www-pnp.physics.ox.ac.uk/~gronbech/intfor/node18.html.
      flang compiler is following this fortran standard, whereas gfortran
      compiler is not following, hence the test case is passing with
      gfortran and failing with flang. but to correct this gfortran
      behavior, bug has been filed in bugzilla
      (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99816). As reported in
      the bug, with gfortran, label 100 of DO loop is reached only after
      the completion of the entire DO loop. Hence at label 100, all the
      array elements are set and printing of array element a(2) succeeds.
      whereas with flang, when we are at label 100 for first time, array
      element a(2) is not yet set, only a(1) is set, hence moving the
      breakpoint location to outside the DO loop, so that once we are
      outside the DO loop, we can print any of the array elements. This
      change in test case is done irrespective of any fortran compiler.
      
      gdb/testsuite/ChangeLog:
              * gdb.fortran/array-element.exp: Breakpoint location is modified.
      abb894a4
    • Alan Modra's avatar
      PR27844, Unstable symbol name in objdump outputs · 8ca5537b
      Alan Modra authored
      Special care for fuzzers.
      
      	PR 27844
      	* pdp11.c (aout_get_external_symbols): Clear first four bytes of
      	strings array, not just the first byte.
      	* aoutx.h (aout_get_external_symbols): Likewise.
      8ca5537b
    • Nick Clifton's avatar
      Fix an illegal memory access when attempting to disassemble a corrupt TIC30 binary. · a680affc
      Nick Clifton authored
      	PR 27840
      	* tic30-dis.c (print_insn_tic30): Prevent attempts to read beyond
      	the end of the code buffer.
      a680affc
    • Nick Clifton's avatar
      Prevent libdel.dll.a from being installed on Windows based systems. · 22604fe6
      Nick Clifton authored
      	PR 27113
      	* Makefile.am (install-data-local): Also delete libdep.dll.a if it
      	is present.
      	* Makefile.in: Regenerate.
      22604fe6
    • Sergey Belyashov's avatar
      Report illegal Z80 load instructions. · cfe7a191
      Sergey Belyashov authored
      	PR 27823
      	* config/tc-z80.c (emit_ld_r_m): Report an illegal load
      	instruction.
      	* testsuite/gas/z80/ill_ops.s: New test source file.
      	* testsuite/gas/z80/ill_ops.d: New test driver.
      	* testsuite/gas/z80/ill_ops.l: New test error output.
      cfe7a191