external/binutils.git
5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Nov 2018 00:01:25 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Nov 2018 00:02:13 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Nov 2018 00:01:55 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Nov 2018 00:01:27 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Nov 2018 00:01:25 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Nov 2018 00:01:40 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Nov 2018 00:02:09 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Nov 2018 00:01:48 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Nov 2018 00:02:20 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Nov 2018 00:02:35 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Nov 2018 00:02:00 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Nov 2018 00:01:36 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Oct 2018 00:01:30 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Oct 2018 00:01:45 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Oct 2018 00:01:26 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Oct 2018 00:02:48 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Oct 2018 00:02:03 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Oct 2018 00:01:46 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Oct 2018 00:02:14 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Oct 2018 00:02:06 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Oct 2018 00:02:11 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Oct 2018 00:01:58 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Oct 2018 00:02:09 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Oct 2018 00:01:41 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Oct 2018 00:01:51 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Oct 2018 00:02:16 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Oct 2018 00:02:07 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Oct 2018 00:01:36 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Oct 2018 00:01:33 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Oct 2018 00:02:19 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Oct 2018 00:01:51 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Oct 2018 00:01:26 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Oct 2018 00:01:45 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Oct 2018 00:01:31 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Oct 2018 00:02:09 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Oct 2018 00:01:19 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Oct 2018 00:02:41 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Oct 2018 00:01:08 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Oct 2018 00:01:54 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Oct 2018 00:01:28 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Oct 2018 00:01:25 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Oct 2018 00:01:48 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Oct 2018 00:01:49 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Sep 2018 00:02:14 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Sep 2018 00:01:52 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Sep 2018 00:01:33 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Sep 2018 00:01:22 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Sep 2018 00:01:55 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Sep 2018 00:01:45 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Sep 2018 00:01:19 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Sep 2018 00:02:02 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Sep 2018 00:01:07 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Sep 2018 00:01:51 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Sep 2018 00:02:12 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Sep 2018 00:01:26 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Sep 2018 00:01:12 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agopython: Make gdb.execute("show commands") work (PR 23669)
Simon Marchi [Mon, 17 Sep 2018 12:26:24 +0000 (08:26 -0400)]
python: Make gdb.execute("show commands") work (PR 23669)

Since commit

  56bcdbea2bed ("Let gdb.execute handle multi-line commands")

trying to use a command like gdb.execute("show commands") in Python
fails.  GDB ends up trying to run the "commands" command.

The reason is that GDB gets confused with the special "commands"
command.  In process_next_line, the lookup_cmd_1 function returns the
cmd_list_element representing the "commands" sub-command of "show".
Lower, we check the cmd_list_element to see if it matches various
control commands by name, including the "commands" command.  This is
where we wrongfully conclude that the executed command must be
"commands", when in reality it was "show commands".

The fix proposed in this patch removes the comparisons by name, instead
comparing the cmd_list_element object by pointer with the objects
created at initialization time.

Tested on the buildbot, though on a single builder (Fedora-x86_64-m64).

gdb/ChangeLog:

PR python/23669
* breakpoint.c (commands_cmd_element): New.
(_initialize_breakpoint): Assign commands_cmd_element.
* breakpoint.h (commands_cmd_element): New.
* cli/cli-script.c (while_cmd_element, if_command,
define_cmd_element): New.
(command_name_equals): Remove.
(process_next_line): Compare commands by pointer, not by name.
(_initialize_cli_script): Assign the various cmd_list_element
variables.
* compile/compile.c (compile_cmd_element): New.
(_initialize_compile): Assign compile_cmd_element.
* compile/compile.h (compile_cmd_element): New.
* guile/guile.c (guile_cmd_element): New.
(install_gdb_commands): Assign guile_cmd_element.
* guile/guile.h (guile_cmd_element): New.
* python/python.c (python_cmd_element): New.
(_initialize_python): Assign python_cmd_element.
* python/python.h (python_cmd_element): New.
* tracepoint.c (while_stepping_cmd_element): New.
(_initialize_tracepoint): Assign while_stepping_cmd_element.
* tracepoint.h (while_stepping_cmd_element): New.

gdb/testsuite/ChangeLog:

PR python/23669
* gdb.python/python.exp: Test gdb.execute("show commands").

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Sep 2018 00:01:42 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Sep 2018 00:02:07 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoMove 'is_regular_file' from common-utils.c to filestuff.c
Sergio Durigan Junior [Sat, 15 Sep 2018 20:40:13 +0000 (16:40 -0400)]
Move 'is_regular_file' from common-utils.c to filestuff.c

There is no reason for 'is_regular_file' to be in common-utils.c; it
belongs to 'filestuff.c'.  This commit moves the function definition
and its prototype to the appropriate files.

The motivation behind this move is a failure that happens on certain
cross-compilation environments when compiling the IPA library, due to
the way gnulib probes the need for a 'stat' call replacement.  Because
configure checks when cross-compiling are more limited, gnulib decides
that it needs to substitute the 'stat' calls its own 'rpl_stat';
however, the IPA library doesn't link with gnulib, which leads to an
error when compiling 'common-utils.c':

  ...
  /opt/x86-core2--musl--bleeding-edge-2018.09-1/bin/i686-buildroot-linux-musl-g++  -shared -fPIC -Wl,--soname=libinproctrace.so -Wl,--no-undefined -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os      -I. -I. -I./../common -I./../regformats -I./.. -I./../../include -I./../gnulib/import -Ibuild-gnulib-gdbserver/import -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized  -DGDBSERVER \
   -Wl,--dynamic-list=./proc-service.list -o libinproctrace.so ax-ipa.o common-utils-ipa.o errors-ipa.o format-ipa.o print-utils-ipa.o regcache-ipa.o remote-utils-ipa.o rsp-low-ipa.o tdesc-ipa.o tracepoint-ipa.o utils-ipa.o vec-ipa.o linux-i386-ipa.o linux-x86-tdesc-ipa.o arch/i386-ipa.o -ldl -pthread
  /opt/x86-core2--musl--bleeding-edge-2018.09-1/lib/gcc/i686-buildroot-linux-musl/8.2.0/../../../../i686-buildroot-linux-musl/bin/ld: common-utils-ipa.o: in function `is_regular_file(char const*, int*)':
  common-utils.c:(.text+0x695): undefined reference to `rpl_stat'
  collect2: error: ld returned 1 exit status
  Makefile:413: recipe for target 'libinproctrace.so' failed
  make[1]: *** [libinproctrace.so] Error 1
  ...

More details can also be found at:

  https://sourceware.org/ml/gdb-patches/2018-09/msg00304.html

The most simple fix for this problem is to move 'is_regular_file' to
'filestuff.c', which is not used by IPA.  This ends up making the
files more logically organized as well, since 'is_regular_file' is a
file operation.

No regressions found.

gdb/ChangeLog:
2018-09-15  Sergio Durigan Junior  <sergiodj@redhat.com>

PR gdb/23663
* common/common-utils.c: Don't include '<sys/stat.h>'.
(is_regular_file): Move to...
* common/filestuff.c (is_regular_file): ... here.
* common/common-utils.h (is_regular_file): Move to...
* common/filestuff.h (is_regular_file): ... here.

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Sep 2018 00:02:16 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Sep 2018 00:01:00 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoMake Rust error message mention the field name
Tom Tromey [Thu, 13 Sep 2018 16:56:34 +0000 (10:56 -0600)]
Make Rust error message mention the field name

I noticed a spot in rust-lang.c where the placeholder "foo" was used
instead of the actual field name.  This patch fixes the bug.

2018-09-13  Tom Tromey  <tom@tromey.com>

PR rust/23650:
* rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".

gdb/testsuite/ChangeLog
2018-09-13  Tom Tromey  <tom@tromey.com>

PR rust/23650:
* gdb.rust/simple.exp: Add test for enum field access error.

5 years agoFix crash with empty Rust enum
Tom Tromey [Tue, 11 Sep 2018 21:28:04 +0000 (15:28 -0600)]
Fix crash with empty Rust enum

While testing my Rust compiler patch to fix the DWARF representation
of Rust enums (https://github.com/rust-lang/rust/pull/54004), I found
a gdb crash coming from one of the Rust test cases.

The bug here is that the new variant support in gdb does not handle
the case where there are no variants in the enum.

This patch fixes the problem in a straightforward way.  Note that the
new tests are somewhat lax because I did not want to try to fully fix
this corner case for older compilers.  If you think that's
unacceptable, let meknow.

Tested on x86-64 Fedora 28 using several versions of the Rust
compiler.  I intend to push this to the 8.2 branch as well.

2018-09-13  Tom Tromey  <tom@tromey.com>

PR rust/23626:
* rust-lang.c (rust_enum_variant): Now static.
(rust_empty_enum_p): New function.
(rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
Handle empty enum.

gdb/testsuite/ChangeLog
2018-09-13  Tom Tromey  <tom@tromey.com>

PR rust/23626:
* gdb.rust/simple.rs (EmptyEnum): New type.
(main): Use it.
* gdb.rust/simple.exp (test_one_slice): Add empty enum test.

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Sep 2018 00:01:30 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Sep 2018 00:02:07 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Sep 2018 00:01:51 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoFix "make install-strip" failure to install gdb-add-index.sh
Eli Zaretskii [Mon, 10 Sep 2018 07:14:04 +0000 (10:14 +0300)]
Fix "make install-strip" failure to install gdb-add-index.sh

gdb/ChangeLog:
2018-09-10  Eli Zaretskii  <eliz@gnu.org>

* Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
$(EXEEXT) to the script, as it is not a program.

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 10 Sep 2018 00:01:40 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 9 Sep 2018 00:02:18 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 8 Sep 2018 00:01:37 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 7 Sep 2018 00:01:58 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 6 Sep 2018 00:01:33 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoBump GDB version number to 8.2.0.DATE-git.
Joel Brobecker [Wed, 5 Sep 2018 08:13:08 +0000 (10:13 +0200)]
Bump GDB version number to 8.2.0.DATE-git.

gdb/ChangeLog:

* version.in: Set GDB version number to 8.2.0.DATE-git.
* PROBLEMS: Likewise.

5 years agoDocument the GDB 8.2 release in gdb/ChangeLog
Joel Brobecker [Wed, 5 Sep 2018 08:01:55 +0000 (10:01 +0200)]
Document the GDB 8.2 release in gdb/ChangeLog

gdb/ChangeLog:

GDB 8.2 released.

5 years agoSet GDB version number to 8.2. gdb-8.2-release
Joel Brobecker [Wed, 5 Sep 2018 07:44:29 +0000 (09:44 +0200)]
Set GDB version number to 8.2.

gdb/ChangeLog:

* version.in: Set GDB version number to 8.2.
* PROBLEMS: Likewise.

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 5 Sep 2018 00:01:17 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agofix incorrect gnulib getcwd replacement when cross-compiling GDB
Sergio Durigan Junior [Tue, 4 Sep 2018 17:51:46 +0000 (19:51 +0200)]
fix incorrect gnulib getcwd replacement when cross-compiling GDB

This fixes a GDB crash observed on Android 8.0 when GDB was
cross-compiled. This patch is a backport of a patch pushed
upstream in gnulib.

gdb/ChangeLog (Sergio Durigan Junior  <sergiodj@redhat.com>):

        PR gdb/23558
        * gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
        Linux and kFreeBSD platforms.
        * gnulib/configure: Regenerate.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 4 Sep 2018 00:01:36 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 3 Sep 2018 00:01:38 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 2 Sep 2018 00:02:47 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 1 Sep 2018 00:01:15 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoSet TYPE_LENGTH on a variant part
Tom Tromey [Thu, 30 Aug 2018 21:04:03 +0000 (15:04 -0600)]
Set TYPE_LENGTH on a variant part

gdb represents a DW_TAG_variant_part as a union.  While normally DWARF
would not set the size of a DW_TAG_variant_part, gdb's representation
requires the TYPE_LENGTH to be set.

This patch arranges to set the TYPE_LENGTH of a variant part if it has
not already been set.

This fixes some Rust regressions when testing against a version of
rustc that emits DW_TAG_variant_part.

2018-08-31  Tom Tromey  <tom@tromey.com>

* dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
variant part type.

5 years agoFix a small bug in gdb.rust/simple.rs
Tom Tromey [Wed, 29 Aug 2018 17:08:46 +0000 (11:08 -0600)]
Fix a small bug in gdb.rust/simple.rs

I noticed that gdb.rust/simple.rs had two local variables named "v".
This didn't previous cause problems, but with a newer rust compiler
this resulted in a test failure.  (It should have failed all along, so
I suppose earlier passes were due to a compiler bug.)

This patch renames the second variable.

2018-08-31  Tom Tromey  <tom@tromey.com>

* gdb.rust/simple.rs: Rename second variable "v".

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 31 Aug 2018 00:01:42 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Aug 2018 00:01:52 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Aug 2018 00:01:48 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoModify gdb.base/commands.exp to test multi breakpoints command clearing.
Philippe Waroquiers [Thu, 2 Aug 2018 21:15:23 +0000 (23:15 +0200)]
Modify gdb.base/commands.exp to test multi breakpoints command clearing.

gdb/testsuite/ChangeLog
2018-08-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* gdb.base/commands.exp: Test multi breakpoints command clearing.

5 years agoFix regression for multi breakpoints command line clearing.
Philippe Waroquiers [Thu, 2 Aug 2018 21:13:22 +0000 (23:13 +0200)]
Fix regression for multi breakpoints command line clearing.

breakpoint.c is modified to fix the regression introduced
when clearing the commands of several breakpoints by giving an empty
list of commands, by just typing "end".
GDB should read an empty list of command once, but it reads
it for each breakpoint, as an empty list of command is NULL,
and NULL is interpreted as 'not having read the command list yet'.

The fix consists in having a boolean set to true once the
command list has been read.

gdb/ChangeLog

2018-08-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* breakpoint.c (commands_command_1): New boolean cmd_read
to detect cmd was already read.

5 years agoParse SVE registers in aarch64 core file reading/writing
Alan Hayward [Mon, 13 Aug 2018 10:02:22 +0000 (11:02 +0100)]
Parse SVE registers in aarch64 core file reading/writing

sve_regmap cannot be global static as the size is dependant on the current
vector length.

gdb/
* aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
(aarch64_linux_collect_sve_regset): Likewise.
(aarch64_linux_iterate_over_regset_sections): Check for SVE.
* regcache.h (regcache_map_entry_size): New function.

5 years agoDetect SVE when reading aarch64 core files
Alan Hayward [Mon, 13 Aug 2018 09:49:51 +0000 (10:49 +0100)]
Detect SVE when reading aarch64 core files

The SVE section in a core file contains a header followed by the registers.
Add defines to easily access the header fields within a buffer.

gdb/
* aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
(SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
(SVE_HEADER_VL_LENGTH): Likewise.
(SVE_HEADER_MAX_VL_LENGTH): Likewise.
(SVE_HEADER_FLAGS_LENGTH): Likewise.
(SVE_HEADER_RESERVED_LENGTH): Likewise.
(SVE_HEADER_SIZE_OFFSET): Likewise.
(SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
(SVE_HEADER_VL_OFFSET): Likewise.
(SVE_HEADER_MAX_VL_OFFSET): Likewise.
(SVE_HEADER_FLAGS_OFFSET): Likewise.
(SVE_HEADER_RESERVED_OFFSET): Likewise.
(SVE_HEADER_SIZE): Likewise.
(aarch64_linux_core_read_vq): Add function.
(aarch64_linux_core_read_description): Check for SVE section.

5 years agoSplit size in regset section iterators
Alan Hayward [Mon, 13 Aug 2018 09:04:11 +0000 (10:04 +0100)]
Split size in regset section iterators

In the existing code, when using the regset section iteration functions, the
size parameter is used in different ways.

With collect, size is used to create the buffer in which to write the regset.
(see linux-tdep.c::linux_collect_regset_section_cb).

With supply, size is used to confirm the existing regset is the correct size.
If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size.
Effectively, size is the minimum possible size of the regset.
(see corelow.c::get_core_register_section).

There are currently no targets with both REGSET_VARIABLE_SIZE and a collect
function.
In SVE, a corefile can contain one of two formats after the header, both of
which are different sizes. However, when writing a core file, we always want
to write out the full bigger size.

To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes.
This is done by adding supply_size and collect_size.

gdb/

* aarch64-fbsd-tdep.c
(aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
collect_size.
* aarch64-linux-tdep.c
(aarch64_linux_iterate_over_regset_sections): Likewise.
* alpha-linux-tdep.c
(alpha_linux_iterate_over_regset_sections):
* alpha-nbsd-tdep.c
(alphanbsd_iterate_over_regset_sections): Likewise.
* amd64-fbsd-tdep.c
(amd64fbsd_iterate_over_regset_sections): Likewise.
* amd64-linux-tdep.c
(amd64_linux_iterate_over_regset_sections): Likewise.
* arm-bsd-tdep.c
(armbsd_iterate_over_regset_sections): Likewise.
* arm-fbsd-tdep.c
(arm_fbsd_iterate_over_regset_sections): Likewise.
* arm-linux-tdep.c
(arm_linux_iterate_over_regset_sections): Likewise.
* corelow.c (get_core_registers_cb): Likewise.
(core_target::fetch_registers): Likewise.
* fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
* frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
* gdbarch.h (void): Regenerate.
* gdbarch.sh: Add supply_size and collect_size.
* hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
* hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
* hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
* i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
* i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
* i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
* ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
* linux-tdep.c (linux_collect_regset_section_cb): Likewise.
* m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
* m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
* m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
* mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
* mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
* mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
* mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
* mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
* nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
* ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
* ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
* ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
* ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
* rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
* s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
* score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
* sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
* sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
* tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
* vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
* xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.

5 years agoRename size in get_core_register_section
Alan Hayward [Fri, 10 Aug 2018 09:17:12 +0000 (10:17 +0100)]
Rename size in get_core_register_section

Make it clearer that the size field indicates the size of the section.

gdb/

* corelow.c (core_target::get_core_register_section): Rename
min_size to section_min_size.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Aug 2018 00:01:57 +0000 (00:01 +0000)]
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Aug 2018 00:02:14 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoRestore behavior of disabling address randomization by default on GDBserver
Simon Marchi [Sun, 26 Aug 2018 09:46:45 +0000 (11:46 +0200)]
Restore behavior of disabling address randomization by default on GDBserver

Commit

  c12a508 ("Add client_state struct.")

inadvertently changed the default behavior of GDBserver wrt address
randomization.  The old disable_randomization global variable was
initialized to 1, whereas the corresponding field in the client_state
structure is initialized to 0.

This fixes

  make check TESTS="gdb.base/jit-simple.exp" RUNTESTFLAGS="--target_board=native-gdbserver"
  make check TESTS="gdb.base/execl-update-breakpoints.exp" RUNTESTFLAGS="--target_board=native-gdbserver"

Note that the execl-update-breakpoints.exp would only fail on systems
where the toolchain emits position-independent executables by default
(otherwise the main executable position is never randomized, so the
value of disable_randomization didn't matter).

gdb/gdbserver/ChangeLog:

PR gdb/23374
PR gdb/23375
* server.h (struct client_state) <disable_randomization>:
Initialize to 1.

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Aug 2018 00:02:08 +0000 (00:02 +0000)]
Automatic date update in version.in

5 years agoInitialize variable in py_get_event_thread
Simon Marchi [Sat, 25 Aug 2018 15:52:24 +0000 (11:52 -0400)]
Initialize variable in py_get_event_thread

The pythread variable could be used without being initialized, fix it by
initializing it to nullptr.

gdb/ChangeLog:

* python/py-threadevent.c (py_get_event_thread): Initialize
pythread.

5 years agoTest case for functions with non-contiguous ranges
Kevin Buettner [Sat, 25 Aug 2018 05:22:46 +0000 (22:22 -0700)]
Test case for functions with non-contiguous ranges

See comments in the new files for what this is about - I tried to
explain it all there.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/dw2-ranges-func.c: New file.
* gdb.dwarf2/dw2-ranges-func.exp: New file.

5 years agoRelocate block range start and end addresses
Kevin Buettner [Sat, 25 Aug 2018 05:22:46 +0000 (22:22 -0700)]
Relocate block range start and end addresses

gdb/ChangeLog:

* objfiles.c (objfile_relocate1): Relocate start and end addresses
for each range in a block.