1. Jan 04, 2022
    • Tom de Vries's avatar
      [gdb/cli] Improve show logging output · 45aec4e5
      Tom de Vries authored
      Before commit 3b6acaee "Update more calls to add_prefix_cmd" we had the
      following output for "show logging":
      ...
      $ gdb -q -batch -ex "set trace-commands on" \
          -ex "set logging off" \
          -ex "show logging" \
          -ex "set logging on" \
          -ex "show logging"
      +set logging off
      +show logging
      Future logs will be written to gdb.txt.
      Logs will be appended to the log file.
      Output will be logged and displayed.
      Debug output will be logged and displayed.
      +set logging on
      +show logging
      Currently logging to "gdb.txt".
      Logs will be appended to the log file.
      Output will be logged and displayed.
      Debug output will be logged and displayed.
      ...
      
      After that commit we have instead:
      ...
      +set logging off
      +show logging
      debugredirect:  The logging output mode is off.
      file:  The current logfile is "gdb.txt".
      overwrite:  Whether logging overwrites or appends to the log file is off.
      redirect:  The logging output mode is off.
      +set logging on
      +show logging
      debugredirect:  The logging output mode is off.
      file:  The current logfile is "gdb.txt".
      overwrite:  Whether logging overwrites or appends to the log file is off.
      redirect:  The logging output mode is off.
      ...
      which gives less clear output for some subcommands.
      
      OTOH, it's explicit about whether boolean values are on or off.
      
      The new text seems to have been chosen to match the set/show help texts:
      ...
      (gdb) help show logging
      Show logging options.
      
      List of show logging subcommands:
      
      show logging debugredirect -- Show the logging debug output mode.
      show logging file -- Show the current logfile.
      show logging overwrite -- \
        Show whether logging overwrites or appends to the log file.
      show logging redirect -- Show the logging output mode.
      ...
      
      Make the show logging messages more clear, while still keep the boolean
      values explicit, such that we have:
      ...
      $ ./gdb.sh -q -batch -ex "show logging"
      logging debugredirect:  off: \
        Debug output will go to both the screen and the log file.
      logging enabled:  off: Logging is disabled.
      logging file:  The current logfile is "gdb.txt".
      logging overwrite:  off: Logging appends to the log file.
      logging redirect:  off: Output will go to both the screen and the log file.
      ...
      
      Tested on x86_64-linux.
      45aec4e5
    • Tom Tromey's avatar
      Fix use of 'printf' in gdbtypes.c · 23bb7876
      Tom Tromey authored
      An earlier patch of mine, commit 64b7cc50 ("Remove
      gdb_print_host_address") inadvertently changed a function in
      gdbtypes.c to use printf rather than printf_filtered.  This patch
      fixes the problem.
      23bb7876
    • Tom Tromey's avatar
      Fix regression in page-logging.exp · b896e87d
      Tom Tromey authored
      Simon and Tom pointed out that page-logging.exp failed on their
      machines.  Tom tracked this down to the "width" setting.  Since
      there's no need in the test to change the width, it seems simplest to
      remove the setting.  I confirmed that the test still fails if the fix
      is backed out, ensuring that the test is still testing what it
      purports to.
      b896e87d
  2. Jan 03, 2022
    • Tom Tromey's avatar
      Small indentation fix in eval.c · 4d603089
      Tom Tromey authored
      I noticed that the AdaCore tree had a small divergence in eval.c -- it
      had a fix for an indentation problem in binop_promote.  I'm checking
      in this small fix as obvious.
      4d603089
    • Tom de Vries's avatar
      [gdb/testsuite] Handle for loop initial decl with gcc 4.8.5 · b19f4f61
      Tom de Vries authored
      When running test-case gdb.threads/schedlock-thread-exit.exp on a system with
      system compiler gcc 4.8.5, I run into:
      ...
      src/gdb/testsuite/gdb.threads/schedlock-thread-exit.c:33:3: error: \
        'for' loop initial declarations are only allowed in C99 mode
      ...
      
      Fix this by:
      - using -std=c99, or
      - using -std=gnu99, in case that's required, or
      - in the case of the jit test-cases, rewriting the for loops.
      
      Tested on x86_64-linux, both with gcc 4.8.5 and gcc 7.5.0.
      b19f4f61
    • GDB Administrator's avatar
      Automatic date update in version.in · 1eeb0316
      GDB Administrator authored
      1eeb0316
    • Tom Tromey's avatar
      Update copying.awk for _initialize declaration patch · 5046fddb
      Tom Tromey authored
      Commit 6c265988 ("gdb: add back declarations for _initialize
      functions") modified copying.c, but not copying.awk.  This patch
      updates copying.awk to backport the appropriate fix.  This way, if
      copying.awk is run again, it will create the correct output.
      
      I'm checking this in as obvious.
      5046fddb
    • Tom Tromey's avatar
      Use filtered output in print_i387_ext · d365c1c5
      Tom Tromey authored
      print_i387_ext mostly uses filtered output, but one call in the middle
      of the function uses the _unfiltered form.  This patch fixes this
      call.  I'm checking this in as obvious.
      d365c1c5
  3. Jan 02, 2022
  4. Jan 01, 2022
  5. Dec 31, 2021
    • H.J. Lu's avatar
      x86: Define check_relocs_failed in elfxx-x86.h · a321de3f
      H.J. Lu authored
      	* elf32-i386.c (check_relocs_failed): Moved to ...
      	* elfxx-x86.h (check_relocs_failed): Here.  New.
      	* elf64-x86-64.c (check_relocs_failed): Removed.
      a321de3f
    • H.J. Lu's avatar
      Define X86_PCREL_TYPE_P/X86_SIZE_TYPE_P in elfxx-x86.h · 831083d3
      H.J. Lu authored
      	* elf32-i386.c: Don't include "elf/i386.h".
      	(X86_PCREL_TYPE_P): Removed.
      	(X86_SIZE_TYPE_P): Likewise.
      	(elf_i386_check_relocs): Pass false to NEED_DYNAMIC_RELOCATION_P.
      	(elf_i386_relocate_section): Pass false to
      	GENERATE_DYNAMIC_RELOCATION_P and COPY_INPUT_RELOC_P.
      	* elf64-x86-64.c: Don't include "elf/x86-64.h".
      	(X86_PCREL_TYPE_P): Removed.
      	(X86_SIZE_TYPE_P): Likewise.
      	(elf_x86_64_check_relocs): Pass true to NEED_DYNAMIC_RELOCATION_P
      	and X86_PCREL_TYPE_P.
      	(elf_x86_64_relocate_section): Pass true to X86_PCREL_TYPE_P,
      	X86_SIZE_TYPE_P, GENERATE_DYNAMIC_RELOCATION_P and
      	COPY_INPUT_RELOC_P.
      	* elfxx-x86.c: Don't include "elf/i386.h" nor "elf/x86-64.h".
      	* elfxx-x86.h (X86_64_PCREL_TYPE_P): New.
      	(I386_PCREL_TYPE_P): Likewise.
      	(X86_PCREL_TYPE_P): Likewise.
      	(X86_64_SIZE_TYPE_P): Likewise.
      	(I386_SIZE_TYPE_P): Likewise.
      	(X86_SIZE_TYPE_P): Likewise.
      	(NEED_DYNAMIC_RELOCATION_P): Add IS_X86_64 and pass it to
      	X86_PCREL_TYPE_P.
      	(COPY_INPUT_RELOC_P): Likewise.
      	(GENERATE_DYNAMIC_RELOCATION_P): Add IS_X86_64, pass it to
      	X86_PCREL_TYPE_P and X86_SIZE_TYPE_P.
      831083d3
    • Tamar Christina's avatar
      ld: fix coff PE SEH · e5b10c40
      Tamar Christina authored
      COFF_WITH_pex64 and COFF_WITH_peAArch64 can't be true at the same time.
      That means that two conditionals that control the sorting of the .pdata section
      became a falsum.
      
      The testsuite doesn't catch this because the linker does the sorting and to link
      you require library support from the unwinder so we can't test from binutils in
      isolation.
      
      bfd/ChangeLog:
      
      2021-12-31  Tamar Christina  <tamar.christina@arm.com>
      
      	PR ld/28682
      	* peXXigen.c: Fix conditional.
      e5b10c40
    • GDB Administrator's avatar
      Automatic date update in version.in · 2e91308f
      GDB Administrator authored
      2e91308f
  6. Dec 30, 2021