Commit Graph

99675 Commits

Author SHA1 Message Date
Joel Brobecker 11bc5fe47f Copyright year range updates after running gdb/copyright.py
gdb/ChangeLog:

	Update copyright year range in all the GDB files automatically
	handled by our copyright.py script.
2020-01-05 09:44:10 +04:00
Joel Brobecker 8b371634b4 gdb/copyright.py: Convert to Python 3
gdb/ChangeLog:

        * copyright.py: Convert to Python 3.

(cherry picked from commit 5f4def5cbd)
2020-01-05 09:44:09 +04:00
Joel Brobecker a292f79fbd gdb/copyright.py: Adapt after move of gnulib from gdb to toplevel
gdb/ChangeLog:

	* copyright.py: Adapt after move of gnulib directory from gdb
	directory to toplevel directory.

(cherry picked from commit 51fd40020e)
2020-01-05 09:44:09 +04:00
Joel Brobecker 1458b0f311 gdb/copyright.py: Exit if run from the wrong directory
We printed an error, but kept going anyway... ;-)

gdb/ChangeLog:

	* copyright.py (main): Exit if run from the wrong directory.

(cherry picked from commit 5fb651f2dd)
2020-01-05 09:44:09 +04:00
Joel Brobecker e9de78be1c update copyright year in version output of gdb, gdbserver and gdbreplay
gdb/ChangeLog:

        * top.c (print_gdb_version): Change copyright year to 2020.

gdb/gdbserver/ChangeLog:

        * server.c (gdbserver_version): Change copyright year to 2020.
        * gdbreplay.c (gdbreplay_version): Likewise.

(cherry picked from commit 5dd8bf886a)
2020-01-05 09:44:09 +04:00
GDB Administrator e33a4274ee Automatic date update in version.in 2020-01-05 00:01:40 +00:00
GDB Administrator 3f83406160 Automatic date update in version.in 2020-01-04 00:00:48 +00:00
GDB Administrator 4955678c8c Automatic date update in version.in 2020-01-03 00:01:53 +00:00
GDB Administrator bf957be6f3 Automatic date update in version.in 2020-01-02 00:01:20 +00:00
GDB Administrator 05989f5ecc Automatic date update in version.in 2020-01-01 00:00:50 +00:00
GDB Administrator 7332f2844c Automatic date update in version.in 2019-12-31 00:01:13 +00:00
GDB Administrator f9d7b63705 Automatic date update in version.in 2019-12-30 00:00:50 +00:00
GDB Administrator af76fcf70f Automatic date update in version.in 2019-12-29 00:01:53 +00:00
GDB Administrator c86ec09cd9 Automatic date update in version.in 2019-12-28 00:01:17 +00:00
GDB Administrator 0e64a4e283 Automatic date update in version.in 2019-12-27 00:01:22 +00:00
Christian Biesinger c0716f3e64 Consistently quote variables used with "test"
This ensures that empty variables and variables with spaces are handled
correctly.

Code was inconsistent on whether the constant string (e.g. yes/no)
should also be quoted; I tried to be consistent with surrounding code.

This fixes the error Eli reported during configure with mingw (though that
was not fatal).

gdb/ChangeLog:

2019-12-19  Christian Biesinger  <cbiesinger@google.com>

	* configure: Regenerate.
	* configure.ac: Quote variable arguments of test.
	* gdbsupport/common.m4: Likewise.

gdb/gdbserver/ChangeLog:

2019-12-19  Christian Biesinger  <cbiesinger@google.com>

	* configure: Regenerate.
	* configure.ac: Quote variable arguments of test.

Change-Id: I220e78b52c7db88b9dd058eda604635b03464fac
2019-12-26 23:34:08 +01:00
GDB Administrator 2030d2b12e Automatic date update in version.in 2019-12-26 00:01:40 +00:00
GDB Administrator f987988860 Automatic date update in version.in 2019-12-25 00:00:57 +00:00
GDB Administrator 8aeb92e18d Automatic date update in version.in 2019-12-24 00:00:56 +00:00
Eli Zaretskii b36fbdf11c Fix compilation of Readline on mingw.org's MinGW
readline/ChangeLog
2019-12-23  Eli Zaretskii  <eliz@gnu.org>

	* posixstat.h (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH)
	(S_IXOTH, S_IRWXG, S_IRWXO): Define if undefined, even if S_IRWXU
	is defined, because non-Posix systems may defined only the user
	bits.

(cherry picked from commit e76ff63653)
2019-12-23 16:30:35 +02:00
GDB Administrator a0f6c91734 Automatic date update in version.in 2019-12-23 00:00:53 +00:00
GDB Administrator 34f3d48420 Automatic date update in version.in 2019-12-22 00:01:39 +00:00
Eli Zaretskii 5c91fe6ebb Fix inadvertent indentation changes in last commit. 2019-12-21 09:32:39 +02:00
Eli Zaretskii 527178f70a Include xxHash support status in GDB configuration report
gdb/ChangeLog
2019-12-21  Eli Zaretskii  <eliz@gnu.org>

	* top.c (print_gdb_configuration): Print "--with-xxhash" or
	"--without-xxhash" according to HAVE_LIBXXHASH.

(cherry picked from commit 15b07e4f56)
2019-12-21 09:31:57 +02:00
GDB Administrator 200d296cf3 Automatic date update in version.in 2019-12-21 00:01:08 +00:00
GDB Administrator 0c21cc55c7 Automatic date update in version.in 2019-12-20 00:00:54 +00:00
GDB Administrator 32e6bcdb5d Automatic date update in version.in 2019-12-19 00:01:05 +00:00
Tom Tromey 4ae7258edf Fix pthread_setname_np build error
My earlier patch to fix the pthread_setname_np build error on macOS
was incorrect.  While the macOS man page claims that
pthread_setname_np returns void, in <pthread.h> it is actually
declared returning "int".  I knew this earlier, but must have made
some mistake when preparing the patch for submission (perhaps when
removing the templates?).

This patch re-fixes the bug.  I'm also applying it to the 9.1 branch.

Tested by building on macOS High Sierra.

gdb/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/25268:
	* gdbsupport/thread-pool.c (set_thread_name): Expect "int" return
	type on macOS.  Add comment.

Change-Id: Ib09da6ac33958a0d843f65df2a528112356e7de6
2019-12-18 11:54:01 -07:00
Tom Tromey 1c66314dcb Fix build failure on macOS
PR build/25250 notes that the gdb 9 pre-release fails to build on
macOS, due to a name clash between field_kind::STRING and the STRING
token in ada-exp.y.  I am not sure (I couldn't reproduce this myself),
but presumably this is due to differences caused by the version of
bison in use there.

This patch works around the problem by renaming the field_kind
enumerator.  I chose to rename this one because it is used in
relatively few places -- it's just an implementation detail of the
style code.

This version also renames field_kind::SIGNED for consistency.

Let me know what you think.  I intend to check this in on the gdb 9
branch as well.

2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/25250:
	* ui-out.c (ui_out::vmessage): Update.
	* ui-out.h (enum class field_kind) <FIELD_STRING, FIELD_SIGNED>:
	Rename.
	(string_field): Update.
	(signed_field): Update.

Change-Id: Iae9f36f1b793e22c61fee0de2ab2d508668ee7e4
2019-12-18 10:31:53 -07:00
GDB Administrator f0ee30bfb0 Automatic date update in version.in 2019-12-18 00:01:06 +00:00
Simon Marchi be19b69991 Fix double-free when creating more than one block in JIT debug info reader
A double-free happens when using a JIT debug info reader that creates
more than one block.  In the loop that frees blocks in finalize_symtab,
at the very end, the gdb_block_iter_tmp variable is set initially, but
not changed as the loop advances.  If we have two blocks, the first
iteration frees the first block, the second iteration frees the second
block, but the third iteration tries to free the second block again, as
gdb_block_iter_tmp keeps pointing on the second block.

Fix it by assigning the gdb_block_iter_tmp variable in the loop.

I have improved the jit-reader.exp test to cover this case, by adding a
second "JIT-ed" function and creating a block for it.  I have renamed
the existing function to something I find a bit more descriptive.  There
are no significant changes to jit-reader.exp itself, only updates
following the renaming.  The important changes are in jithost.c
(generate a new function) and in jitreader.c (create a gdb_block for
that function).

This was found because of an ASan report:

$ ./gdb testsuite/outputs/gdb.base/jit-reader/jit-reader -ex "jit-reader-load /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/jit-reader/jitreader.so" -ex r
Reading symbols from testsuite/outputs/gdb.base/jit-reader/jit-reader...
Starting program: /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/jit-reader/jit-reader
=================================================================
==1751048==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000042eb8 at pc 0x5650ef8eec88 bp 0x7ffe52767290 sp 0x7ffe52767280
READ of size 8 at 0x604000042eb8 thread T0
    #0 0x5650ef8eec87 in finalize_symtab /home/simark/src/binutils-gdb/gdb/jit.c:768
    #1 0x5650ef8eef88 in jit_object_close_impl /home/simark/src/binutils-gdb/gdb/jit.c:797
    #2 0x7fbbda986278 in read_debug_info /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/jitreader.c:71
    #3 0x5650ef8ef56b in jit_reader_try_read_symtab /home/simark/src/binutils-gdb/gdb/jit.c:850
    #4 0x5650ef8effe3 in jit_register_code /home/simark/src/binutils-gdb/gdb/jit.c:948
    #5 0x5650ef8f2c92 in jit_event_handler(gdbarch*) /home/simark/src/binutils-gdb/gdb/jit.c:1396
    #6 0x5650ef0d137e in handle_jit_event /home/simark/src/binutils-gdb/gdb/breakpoint.c:5470
    [snip]

0x604000042eb8 is located 40 bytes inside of 48-byte region [0x604000042e90,0x604000042ec0)
freed by thread T0 here:
    #0 0x7fbbe57376b0 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:122
    #1 0x5650ef8f350b in xfree<gdb_block> /home/simark/src/binutils-gdb/gdb/gdbsupport/common-utils.h:62
    #2 0x5650ef8eeca9 in finalize_symtab /home/simark/src/binutils-gdb/gdb/jit.c:769
    #3 0x5650ef8eef88 in jit_object_close_impl /home/simark/src/binutils-gdb/gdb/jit.c:797
    #4 0x7fbbda986278 in read_debug_info /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/jitreader.c:71
    #5 0x5650ef8ef56b in jit_reader_try_read_symtab /home/simark/src/binutils-gdb/gdb/jit.c:850
    #6 0x5650ef8effe3 in jit_register_code /home/simark/src/binutils-gdb/gdb/jit.c:948
    #7 0x5650ef8f2c92 in jit_event_handler(gdbarch*) /home/simark/src/binutils-gdb/gdb/jit.c:1396
    #8 0x5650ef0d137e in handle_jit_event /home/simark/src/binutils-gdb/gdb/breakpoint.c:5470
    [snip]

previously allocated by thread T0 here:
    #0 0x7fbbe5737cd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x5650eef662f3 in xcalloc /home/simark/src/binutils-gdb/gdb/alloc.c:100
    #2 0x5650ef8f34ea in xcnew<gdb_block> /home/simark/src/binutils-gdb/gdb/gdbsupport/poison.h:122
    #3 0x5650ef8ed467 in jit_block_open_impl /home/simark/src/binutils-gdb/gdb/jit.c:557
    #4 0x7fbbda98620a in read_debug_info /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/jitreader.c:60
    #5 0x5650ef8ef56b in jit_reader_try_read_symtab /home/simark/src/binutils-gdb/gdb/jit.c:850
    #6 0x5650ef8effe3 in jit_register_code /home/simark/src/binutils-gdb/gdb/jit.c:948
    #7 0x5650ef8f2c92 in jit_event_handler(gdbarch*) /home/simark/src/binutils-gdb/gdb/jit.c:1396
    #8 0x5650ef0d137e in handle_jit_event /home/simark/src/binutils-gdb/gdb/breakpoint.c:5470
    [snip]

gdb/ChangeLog:

	* jit.c (finalize_symtab): Set gdb_block_iter_tmp in loop.

gdb/testsuite/ChangeLog:

	* gdb.base/jit-reader.exp (jit_reader_test): Rename
	jit_function_00 to jit_function_stack_mangle.
	* gdb.base/jithost.c (jit_function_t): Rename to...
	(jit_function_stack_mangle_t): ... this.
	(jit_function_add_t): New typedef.
	(jit_function_00_code): Rename to...
	(jit_function_stack_mangle_code): ... this, make static.
	(jit_function_add_code): New.
	(main): Generate "add" function and call it.  Adjust to changes
	in jithost_abi.
	* gdb.base/jithost.h (struct jithost_abi_bounds): New.
	(struct jithost_abi) <begin, end>: Remove fields.
	<object, function_stack_mangle, function_add>: New fields.
	* gdb.base/jitreader.c (struct reader_state) <code_begin,
	code_end>: Remove fields.
	<func_stack_mangle>: New field.
	(read_debug_info): Adjust to renaming, create block for "add"
	function.
	(read_sp, unwind_frame, get_frame_id): Adjust to other changes.
2019-12-17 14:18:02 -05:00
GDB Administrator 1bc50c51fd Automatic date update in version.in 2019-12-17 00:01:00 +00:00
GDB Administrator b6778b5b30 Automatic date update in version.in 2019-12-16 00:01:08 +00:00
Christian Biesinger 59e99adeed Update documentation for the default value of main set worker-threads
I forgot to update this documentation when I changed the default for
maint set worker-threads to be 0. This is a branch-only change, because
on trunk this has been changed back to unlimited.

gdb/doc/ChangeLog:

2019-12-15  Christian Biesinger  <cbiesinger@google.com>

	* gdb.texinfo (Maintenance Commands): Update documentation for
	maint set worker-threads to say the default is 0.

Change-Id: I75b74c5da599e657ee94daa8c88b5a097bc58d15
2019-12-15 14:34:36 -05:00
GDB Administrator 8bad7749dc Automatic date update in version.in 2019-12-15 00:01:31 +00:00
Andrew Burgess b547b1310d gdb/doc: Remove duplicate description of lookup_global_symbol
In this commit:

  commit 086baaf134
  Date:   Tue Oct 15 16:18:26 2019 +0100

      gdb/python: Introduce gdb.lookup_static_symbols

A duplicate description of gdb.lookup_global_symbol was accidentally
added.  This commit corrects this mistake and removes the duplicate.

gdb/doc/ChangeLog:

	* python.texi (Symbols In Python): Remove duplicate description of
	gdb.lookup_global_symbol.

Change-Id: I4457b42cf05bde39e5c0ff39f168af919cad1255
2019-12-14 23:28:10 +00:00
GDB Administrator 17a03c954d Automatic date update in version.in 2019-12-14 00:01:00 +00:00
GDB Administrator 5d4b673fc6 Automatic date update in version.in 2019-12-13 00:01:02 +00:00
GDB Administrator 25d38fd3d5 Automatic date update in version.in 2019-12-12 00:00:55 +00:00
Joel Brobecker 3f43467191 Bump GDB version number to 9.0.90.DATE-git.
gdb/ChangeLog:

	* version.in: Set GDB version number to 9.0.90.DATE-git.
2019-12-11 22:42:19 +01:00
Joel Brobecker 07d5aa38fd Document the GDB 9.0.90 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 9.0.90 released.
2019-12-11 22:42:13 +01:00
Joel Brobecker b06b54862e Set GDB version number to 9.0.90.
gdb/ChangeLog:

	* version.in: Set GDB version number to 9.0.90.
2019-12-11 21:56:24 +01:00
Joel Brobecker 41ec388bf2 gdb/NEWS: Say "Changes in GDB 9" rather than "Changes since GDB 8.3"
gdb/ChangeLog:

 	* NEWS: Change "Changes since GDB 8.3" into "Changes in GDB 9".
2019-12-11 21:51:26 +01:00
Joel Brobecker 1c47c133d2 Set development mode to "off" by default.
bfd/ChangeLog:

	* development.sh (development): Set to false.
2019-12-11 21:37:55 +01:00
Joel Brobecker c87abc5019 Bump version to 9.0.90.DATE-git.
Now that the GDB 9 branch has been created, we can
bump the version number.

gdb/ChangeLog:

	GDB 9 branch created (27f7b2f640):
	* version.in: Bump version to 9.0.90.DATE-git.
2019-12-11 21:37:08 +01:00
Simon Marchi 27f7b2f640 Fix typo, get_Frame_id -> get_frame_id
gdb/doc/ChangeLog:

	* gdb.texinfo (Writing JIT Debug Info Readers): Fix typo.
2019-12-11 11:30:15 -05:00
Andre Vieira 24f19ccb89 [gas][arm] Add -mwarn-restrict-it
Add a -m{no-}warn-restrict-it option to control IT related warnings in
ARMv8-A and ARMv8-R.  This is disabled by default.

Committed on behalf of Wilco Dijkstra.

gas/ChangeLog:
2019-12-11  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/tc-arm.c (warn_on_restrict_it): Add new variable.
	(it_fsm_post_encode): Check warn_on_restrict_it.
	(arm_option_table): Add -mwarn-restrict-it/-mno-warn-restrict-it.
	* testsuite/gas/arm/armv8-2-fp16-scalar-bad.d: Add -mwarn-restrict-it.
	* testsuite/gas/arm/armv8-2-fp16-scalar-bad-ext.d: Likewise.
	* testsuite/gas/arm/armv8-a-bad.d: Likewise.
	* testsuite/gas/arm/armv8-a-it-bad.d: Likewise.
	* testsuite/gas/arm/armv8-r-bad.d: Likewise.
	* testsuite/gas/arm/armv8-r-it-bad.d: Likewise.
	* testsuite/gas/arm/sp-pc-validations-bad-t-v8a.d: Likewise.
	* testsuite/gas/arm/udf.d: Likewise.
2019-12-11 15:53:26 +00:00
Tom Tromey 2e74427698 Fix build on macOS
PR build/25268 points out that the build fails on macOS, because on
macOS the "pthread_setname_np" function takes a single argument.

This patch fixes the problem, by introducing a new adapter function
that handles both styles of pthread_setname_np.

This change also meant moving the pthread_setname_np call to the
thread function, because macOS only permits setting the name of the
current thread.  This means that there can be a brief window when gdb
will see the wrong name; but I think this is a minor concern.

Tested by rebuilding on x86-64 Fedora 30, and on macOS High Sierra.
On Linux I also debugged gdb to ensure that the thread names are still
set correctly.

gdb/ChangeLog
2019-12-11  Tom Tromey  <tromey@adacore.com>

	PR build/25268:
	* gdbsupport/thread-pool.c (set_thread_name): New function.
	(thread_pool::set_thread_count): Don't call pthread_setname_np.
	(thread_pool::thread_function): Call set_thread_name.

Change-Id: Id7bf28d99ca27a893a9fc87ebb90b15a9c2a9cb4
2019-12-11 08:02:20 -07:00
Tom Tromey aac4760f70 Fix the build after bfd_get_signed_8 change
A recent commit changed bfd_get_signed_8 to extend the result to a
bfd_signed_vma.  This caused a compiler error in one spot in my
--enable-targets=all gdb build, where the result of bfd_get_signed_8
was passed to printf.

This patch fixes the build.  Tested by rebuilding.

gdb/ChangeLog
2019-12-11  Tom Tromey  <tromey@adacore.com>

	* fbsd-tdep.c (fbsd_core_info_proc_status): Cast result of
	bfd_get_signed_8.

Change-Id: Ic015f5fd3d88da6b5da8f7b4e1d11d5c981333db
2019-12-11 07:58:46 -07:00
Alan Modra 1d61b03226 Remove more shifts for sign/zero extension
cpu/
	* epiphany.cpu (f-sdisp11): Don't sign extend with shifts.
	* lm32.cpu (f-branch, f-vall): Likewise.
	* m32.cpu (f-lab-8-16): Likewise.
opcodes/
	* arc-dis.c (BITS): Don't truncate high bits with shifts.
	* nios2-dis.c (nios2_print_insn_arg): Don't sign extend with shifts.
	* tic54x-dis.c (print_instruction): Likewise.
	* tilegx-opc.c (parse_insn_tilegx): Likewise.
	* tilepro-opc.c (parse_insn_tilepro): Likewise.
	* visium-dis.c (disassem_class0): Likewise.
	* pdp11-dis.c (sign_extend): Likewise.
	(SIGN_BITS): Delete.
	* epiphany-ibld.c: Regenerate.
	* lm32-ibld.c: Regenerate.
	* m32c-ibld.c: Regenerate.
2019-12-11 21:14:19 +10:30