1. Jan 07, 2022
  2. Jan 06, 2022
    • Tom Tromey's avatar
      Use target_announce_detach in more targets · 41e321a8
      Tom Tromey authored
      target_announce_detach was added in commit 0f48b757 ("Factor out
      "Detaching from program" message printing").  There, Pedro wrote:
      
          (For now, I left the couple targets that print this a bit differently
          alone.  Maybe this could be further pulled out into infcmd.c.  If we
          did that, and those targets want to continue printing differently,
          this new function could be converted to a target method.)
      
      It seems to me that the differences aren't very big, and in some cases
      other targets handled the output a bit more nicely.  In particular,
      some targets will print a different message when exec_file==NULL,
      rather than printing the same output with an empty string as
      exec_file.
      
      This patch incorporates the nicer output into target_announce_detach,
      then changes the remaining ports to use this function.
      
      
      41e321a8
    • Tom Tromey's avatar
      Introduce target_announce_attach · bc521517
      Tom Tromey authored
      This introduces target_announce_attach, by analog with
      target_announce_detach.  Then it converts existing targets to use
      this, rather than emitting their own output by hand.
      
      
      bc521517
    • Andrew Burgess's avatar
      gdb: make use add_setshow_prefix_cmd in gnu-nat.c · 10a85f29
      Andrew Burgess authored
      In gnu-nat.c we currently implement some set/show prefix commands
      "manually", that is, we call add_prefix_cmd, and assign a set and show
      function to each prefix command.
      
      These set/show functions print an error indicating that the user
      didn't type a complete command.
      
      If we instead switch to using add_setshow_prefix_cmd then we can
      delete the set/show functions, GDB provides some default functions,
      which give a nice help style summary that lists all of the available
      sub-commands, along with a one line summary of what each does.
      
      Though this clearly changes the existing behaviour, I think this
      change is acceptable as the new behaviour is more inline with other
      set/show prefix commands, and the new behaviour is more informative.
      
      This change will conflict with Tom's change here:
      
        https://sourceware.org/pipermail/gdb-patches/2022-January/184724.html
      
      Where Tom changes the set/show functions that I delete.  My suggestion
      is that the set/show functions still be deleted even after Tom's
      patch (or instead of Tom's patch).
      
      For testing I've build GDB on GNU/Hurd, and manually tested these
      functions.  I did a grep over the testsuite, and don't believe the
      existing error messages are being checked for in any tests.
      10a85f29
    • Tom Tromey's avatar
      Use warning in windows-nat error messages · 390abcd9
      Tom Tromey authored
      A warning in windows-nat.c can be converted to use the warning
      function.  As a side effect, this arranges for the output to be sent
      to gdb_stderr.
      
      
      390abcd9
    • Tom Tromey's avatar
      Clean up some dead code in windows-tdep.c · 5bd1d4c1
      Tom Tromey authored
      windows-tdep.c checks the result of xmalloc, which isn't necessary.  I
      initially removed this dead check, but then went a bit further and
      modified the code so that some "goto"s and explicit memory management
      could be removed.  Then, I added a couple of missing bounds checks.
      
      I believe this also fixes a possible bug with a missing 0-termination
      of a string.  I am not certain, but that is why I think the existing
      code allocates a buffer that is 1 byte too long -- but then it fails
      to set this byte to 0.
      
      5bd1d4c1
    • Tom Tromey's avatar
      Avoid crash in language_info · 5220f61a
      Tom Tromey authored
      language_info calls:
      
        show_language_command (NULL, 1, NULL, NULL);
      
      ... "knowing" that show_language_command does not use its ui_file
      parameter.  However, this was changed in commit 7514a661
      ("Consistently Use ui_file parameter to show callbacks").
      
      This patch changes language_info to pass a ui_file.
      
      It took a while to write the test -- this function is only called when
      'verbose' is on and when switching the "expected" language in auto
      mode.
      
      5220f61a
    • Tom Tromey's avatar
      Fix some failures in langs.exp · d8504344
      Tom Tromey authored
      langs.exp currently has some fails for me because the stack trace
      includes full paths to the source files.
      
          FAIL: gdb.base/langs.exp: up to foo in langs.exp
          FAIL: gdb.base/langs.exp: up to cppsub_ in langs.exp
          FAIL: gdb.base/langs.exp: up to fsub in langs.exp
      
      This fixes the failures by making the filename regexps a bit more lax.
      
      d8504344
    • Jan Beulich's avatar
      x86: drop NoAVX insn attribute · ffb86450
      Jan Beulich authored
      To avoid issues like that addressed by 6e3e5c9e ("x86: extend SSE
      check to PCLMULQDQ, AES, and GFNI insns"), base the check on opcode
      attributes and operand types.
      ffb86450
    • Jan Beulich's avatar
      x86: drop NoAVX from POPCNT · f0db6fb6
      Jan Beulich authored
      With the introduction of CpuPOPCNT the NoAVX attribute has become
      meaningless for POPCNT.
      f0db6fb6
    • Jan Beulich's avatar
      x86: drop some "comm" template parameters · 274be12a
      Jan Beulich authored
      As already indicated in a remark when introducing these templates, the
      "commutative" attribute is ignored for legacy encoding templates. Hence
      it is possible to shorten a number of templates by specifying C directly
      rather than through a template parameter. I think this helps readability
      a bit.
      274be12a
    • Jan Beulich's avatar
      x86: templatize FMA insn templates · edb7c8ec
      Jan Beulich authored
      The operand ordering portion of the mnemonics repeats, causing a flurry
      of almost identical templates. Abstract this out.
      edb7c8ec
    • Jan Beulich's avatar
      x86-64: restrict PC32 -> PLT32 conversion · 1ef3994a
      Jan Beulich authored
      Neither non-64-bit code nor uses with a non-zero offset from a symbol
      should be converted to PLT32, as an eventual PLT entry would not express
      what was requested.
      1ef3994a
    • Lancelot SIX's avatar
      gdb: Fix copyright year in gdb/testsuite/gdb.base/inferior-clone.exp · 1f927a4a
      Lancelot SIX authored
      I just realized that I forgot to update the year before pushing the
      patch that created this file.  Since it landed after the global
      copyright year update have been done, this file’s copyright year is
      updated.
      
      This patch fixes that.
      
      Change-Id: I280f7d86e02d38425f7afdcf19a1c3500d51c23f
      1f927a4a
    • Mike Frysinger's avatar
      sim: ppc: migrate to standard uintXX_t types · 95e40d77
      Mike Frysinger authored
      Drop the sim-specific unsignedXX types and move to the standard uintXX_t
      types that C11 provides.
      95e40d77
    • Mike Frysinger's avatar
      sim: common: migrate to standard uintXX_t types · e4c803f5
      Mike Frysinger authored
      Drop the sim-specific unsignedXX types and move to the standard uintXX_t
      types that C11 provides.
      e4c803f5
    • Mike Frysinger's avatar
      sim: igen: migrate to standard uintXX_t types · 9850d2d8
      Mike Frysinger authored
      Move off the custom local 64-bit types and to the standard uintXX_t
      types that C11 provides.
      9850d2d8
    • Mike Frysinger's avatar
      sim: mips: migrate to standard uintXX_t types · b331e677
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      b331e677
    • Mike Frysinger's avatar
      sim: cris: migrate to standard uintXX_t types · 2875d098
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      2875d098
    • Mike Frysinger's avatar
      sim: iq2000: migrate to standard uintXX_t types · 1e1e987a
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      1e1e987a
    • Mike Frysinger's avatar
      sim: synacor: migrate to standard uintXX_t types · c50b7c1b
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      c50b7c1b
    • Mike Frysinger's avatar
      sim: msp430: migrate to standard uintXX_t types · 868b6a9d
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      868b6a9d
    • Mike Frysinger's avatar
      sim: riscv: migrate to standard uintXX_t types · 5a33ead2
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      5a33ead2
    • Mike Frysinger's avatar
      sim: bfin: migrate to standard uintXX_t types · 4650ee93
      Mike Frysinger authored
      Move off the sim-specific unsignedXX types and to the standard uintXX_t
      types that C11 provides.
      4650ee93
    • Mike Frysinger's avatar
      sim: testsuite: migrate to standard uintXX_t types · 39a5fdbc
      Mike Frysinger authored
      This old code setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      39a5fdbc
    • Mike Frysinger's avatar
      sim: erc32: migrate to standard uintXX_t types · 4a92dedc
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      4a92dedc
    • Mike Frysinger's avatar
      sim: mn10300: migrate to standard uintXX_t types · 74ccc978
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      74ccc978
    • Mike Frysinger's avatar
      sim: v850: migrate to standard uintXX_t types · 436c3d9d
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      436c3d9d
    • Mike Frysinger's avatar
      sim: m68hc11: migrate to standard uintXX_t types · 7606e1a3
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      
      Also migrate off the sim-specific unsignedXX types.
      7606e1a3
    • Mike Frysinger's avatar
      sim: d10v: migrate to standard uintXX_t types · eae126cb
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      
      Also migrate off the sim-specific unsignedXX types.
      eae126cb
    • Mike Frysinger's avatar
      sim: cr16: migrate to standard uintXX_t types · 32267d59
      Mike Frysinger authored
      This old port setup its own uintXX types, but since we require C11
      now, we can assume the standard uintXX_t types exist and use them.
      
      Also migrate off the sim-specific unsignedXX types.
      32267d59
    • GDB Administrator's avatar
      Automatic date update in version.in · f9f42422
      GDB Administrator authored
      f9f42422
    • H.J. Lu's avatar
      x86: Add elf_x86_allocate_local_got_info · bbdeb108
      H.J. Lu authored
      Add elf_x86_allocate_local_got_info to allocate x86 GOT info for local
      symbols.
      
      	* elf32-i386.c (elf_i386_check_relocs): Call
      	elf_x86_allocate_local_got_info.
      	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
      	* elfxx-x86.h (elf_x86_allocate_local_got_info): New.
      bbdeb108
    • Vladimir Mezentsev's avatar
      opcodes: Make i386-dis.c thread-safe · 39fb3698
      Vladimir Mezentsev authored
      Improve thread safety in print_insn_i386_att, print_insn_i386_intel and
      print_insn_i386 by removing the use of static variables.
      
      Tested on x86_64-pc-linux-gnu.
      
      2022-01-04 Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
      
      	* i386-dis.c: Make print_insn_i386_att, print_insn_i386_intel
      	and print_insn_i386 thread-safe
      39fb3698
    • H.J. Lu's avatar
      doc: Replace =frame-interp with =frames-interp · 8acecab0
      H.J. Lu authored
      The actual objdump and readelf option name is =frames-interp, not
      =frames-interp.
      
      	PR binutils/28747
      	* doc/debug.options.texi: Replace =frame-interp with
      	=frames-interp.
      8acecab0
    • Tom Tromey's avatar
      Change riscv_return_value to use RETURN_VALUE_ABI_PRESERVES_ADDRESS · d4be21dc
      Tom Tromey authored
      Internally, AdaCore has a test that is equivalent to (really a direct
      translation of) gdb.base/gnu_vector.exp.  On 32-bit RISC-V, the
      "return" part of this test fails.
      
      Joel tracked this down to riscv_return_value returning
      RETURN_VALUE_ABI_RETURNS_ADDRESS.  Using
      RETURN_VALUE_ABI_PRESERVES_ADDRESS is more correct here, and fixes the
      bug.
      
      I tested this for both 32- and 64-bit RISC-V using the AdaCore
      internal test suite, and Andrew Burgess tested it using
      gnu_vector.exp.
      
      d4be21dc