public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.0.91.
@ 2018-01-12  5:53 sergiodj+buildbot
  2018-01-12  5:53 ` Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.1-branch sergiodj+buildbot
                   ` (11 more replies)
  0 siblings, 12 replies; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-12  5:53 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 556dbf30fb0d5d6f59c7b38f2ac930cc6f9589eb ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: 556dbf30fb0d5d6f59c7b38f2ac930cc6f9589eb

Set GDB version number to 8.0.91.

gdb/ChangeLog:

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


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Bump GDB version number to 8.1.1.DATE-git.
@ 2018-07-31 15:51 sergiodj+buildbot
  2018-08-18 16:34 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-07-31 15:51 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f9812ee2042783bad9e8901cf47c178daee15a00 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: f9812ee2042783bad9e8901cf47c178daee15a00

Bump GDB version number to 8.1.1.DATE-git.

gdb/ChangeLog:

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


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.1.1.
@ 2018-07-31 15:37 sergiodj+buildbot
  2018-08-18 16:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-07-31 15:37 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f99d9b9f436dce02aa06839395c67d400b2a0de0 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: f99d9b9f436dce02aa06839395c67d400b2a0de0

Set GDB version number to 8.1.1.

gdb/ChangeLog:

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


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Unset gdbarch significant_addr_bit by default
@ 2018-05-31  4:02 sergiodj+buildbot
  2018-06-04 19:14 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-05-31  4:02 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 8679931c2c9f97ad182f8f0a9e8fab20305719b5 ***

Author: Omair Javaid <omair.javaid@linaro.org>
Branch: gdb-8.1-branch
Commit: 8679931c2c9f97ad182f8f0a9e8fab20305719b5

Unset gdbarch significant_addr_bit by default

This patch fixes a bug introduced by fix to AArch64 pointer tagging.

In our fix for tagged pointer support our agreed approach was to sign
extend user-space address after clearing tag bits. This is not same
for all architectures and this patch allows sign extension for
addresses on targets which specifically set significant_addr_bit.

More information about patch that caused the issues and discussion
around tagged pointer support can be found in links below:

https://sourceware.org/ml/gdb-patches/2018-05/msg00000.html
https://sourceware.org/ml/gdb-patches/2017-12/msg00159.html

gdb/ChangeLog:

2018-05-31  Omair Javaid  <omair.javaid@linaro.org>

	PR gdb/23210
	* gdbarch.sh (significant_addr_bit): Default to zero when
	not set by target architecture.
	* gdbarch.c: Re-generated.
	* utils.c (address_significant): Update.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] gdbserver/Windows: crash during connection establishment phase
@ 2018-05-10 19:44 sergiodj+buildbot
  2018-05-12  0:46 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-05-10 19:44 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 572797ce5f4dc697120cfd07e95553118b4f105e ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: 572797ce5f4dc697120cfd07e95553118b4f105e

gdbserver/Windows: crash during connection establishment phase

On Windows, starting a new process with GDBserver seems to work,
in the sense that the program does get started, and GDBserver
confirms that it is listening for GDB to connect. However, as soon as
GDB establishes the connection with GDBserver, and starts discussing
with it, GDBserver crashes, with a SEGV.

This SEGV occurs in remote-utils.c::prepare_resume_reply...

  | regp = current_target_desc ()->expedite_regs;
  | [...]
  | while (*regp)

... because, in our case, REGP is NULL.

This patches fixes the issues by adding a parameter to init_target_desc,
in order to make sure that we always provide the list of registers when
we initialize a target description.

gdb/ChangeLog:

        PR server/23158:
        * regformats/regdat.sh: Adjust script, following the addition
        of the new expedite_regs parameter to init_target_desc.

gdb/gdbserver/ChangeLog:

        PR server/23158:
        * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
        * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
        Use it to set the expedite_regs field in the given tdesc.
        * x86-tdesc.h: New file.
        * linux-aarch64-tdesc.c (aarch64_linux_read_description):
        Adjust following the addition of the new expedite_regs parameter
        to init_target_desc.
        * linux-tic6x-low.c (tic6x_read_description): Likewise.
        * linux-x86-tdesc.c: #include "x86-tdesc.h".
        (i386_linux_read_description, amd64_linux_read_description):
        Adjust following the addition of the new expedite_regs parameter
        to init_target_desc.
        * lynx-i386-low.c: #include "x86-tdesc.h".
        (lynx_i386_arch_setup): Adjust following the addition of the new
        expedite_regs parameter to init_target_desc.
        * nto-x86-low.c: #include "x86-tdesc.h".
        (nto_x86_arch_setup): Adjust following the addition of the new
        expedite_regs parameter to init_target_desc.
        * win32-i386-low.c: #include "x86-tdesc.h".
        (i386_arch_setup): Adjust following the addition of the new
        expedite_regs parameter to init_target_desc.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] gdbserver/Windows: Fix "no program to debug" error
@ 2018-05-10 19:22 sergiodj+buildbot
  2018-05-11 17:46 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-05-10 19:22 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT c0c0270a9a38e1e888e9d6f0185b465d3751f518 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: c0c0270a9a38e1e888e9d6f0185b465d3751f518

gdbserver/Windows: Fix "no program to debug" error

Trying to start a program with GDBserver on Windows yields
the following error:

    $ gdbserver.exe --once :4444 simple_main.exe
    Killing process(es): 5008
    No program to debug
    Exiting

The error itself comes from the following code shortly after
create_inferior gets called (in server.c::main):

    /* Wait till we are at first instruction in program.  */
    create_inferior (program_path.get (), program_args);
    [...]

    if (last_status.kind == TARGET_WAITKIND_EXITED
        || last_status.kind == TARGET_WAITKIND_SIGNALLED)
      was_running = 0;
    else
      was_running = 1;

    if (!was_running && !multi_mode)
      error ("No program to debug");

What happens is that the "last_status" global starts initialized
as zeroes, which means last_status.kind == TARGET_WAITKIND_EXITED,
and we expect create_inferior to be waiting for the inferior to
start until reaching the SIGTRAP, and to set the "last_status"
global to match that last event we received.

I suspect this is an unintended side-effect of the following change...

    commit 2090129c36c7e582943b7d300968d19b46160d84
    Date:   Thu Dec 22 21:11:11 2016 -0500
    Subject: Share fork_inferior et al with gdbserver

... which removes some code in server.c that was responsible for
starting the inferior in a functin that was named start_inferior,
and looked like this:

   signal_pid = create_inferior (new_argv[0], &new_argv[0]);
   [...]
   /* Wait till we are at 1st instruction in program, return new pid
      (assuming success).  */
   last_ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);

The code has been transitioned to using fork_inferior, but sadly,
only for the targets that support it. On Windows, the calls to wait
setting "last_status" simply disappeared.

This patch adds it back in the Windows-specific implementation of
create_inferior.

gdb/gdbserver/ChangeLog:

        PR server/23158:
        * win32-low.c (win32_create_inferior): Add call to my_wait
        setting last_status global.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] [gdbserver/win32] fatal "glob could not process pattern '(null)'" error
@ 2018-05-10 19:11 sergiodj+buildbot
  2018-05-11 13:25 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-05-10 19:11 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT e378993dd341b10571a7cb6e98d5d3b48a06e24c ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: e378993dd341b10571a7cb6e98d5d3b48a06e24c

[gdbserver/win32] fatal "glob could not process pattern '(null)'" error

Trying to start GDBserver on Windows currently yields the following
error...

    $ gdbserver.exe --once :4444 simple_main.exe
    glob could not process pattern '(null)'.
    Exiting

... after which GDB terminates with a nonzero status.

This is because create_process in win32-low.c calls gdb_tilde_expand
with the result of a call to get_inferior_cwd without verifying that
the returned directory is not NULL:

    | static BOOL
    | create_process (const char *program, char *args,
    |                 DWORD flags, PROCESS_INFORMATION *pi)
    | {
    |   const char *inferior_cwd = get_inferior_cwd ();
    |   std::string expanded_infcwd = gdb_tilde_expand (inferior_cwd);

This patch avoids this by only calling gdb_tilde_expand when
INFERIOR_CWD is not NULL, which is similar to what is done on
GNU/Linux for instance.

gdb/gdbserver/ChangeLog:

        PR server/23158:
        * win32-low.c (create_process): Only call gdb_tilde_expand if
        inferior_cwd is not NULL.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix tagged pointer support
@ 2018-05-10 12:45 sergiodj+buildbot
  2018-05-10 19:52 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-05-10 12:45 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 8a620990c7634e872b31718a8411a90a6f384457 ***

Author: Omair Javaid <omair.javaid@linaro.org>
Branch: gdb-8.1-branch
Commit: 8a620990c7634e872b31718a8411a90a6f384457

Fix tagged pointer support

This patch fixes tagged pointer support for AArch64 GDB. Linux kernel
debugging failure was reported after tagged pointer support was committed.

After a discussion around best path forward to manage tagged pointers
on GDB side we are going to disable tagged pointers support for
aarch64-none-elf-gdb because for non-linux applications we cant be
sure if tagged pointers will be used by MMU or not.

Also for aarch64-linux-gdb we are going to sign extend user-space
address after clearing tag bits. This will help debug both kernel
and user-space addresses based on information from linux kernel
documentation given below:

According to AArch64 memory map:
https://www.kernel.org/doc/Documentation/arm64/memory.txt

"User addresses have bits 63:48 set to 0 while the kernel addresses have
the same bits set to 1."

According to AArch64 tagged pointers document:
https://www.kernel.org/doc/Documentation/arm64/tagged-pointers.txt

The kernel configures the translation tables so that translations made
via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
the virtual address ignored by the translation hardware. This frees up
this byte for application use.

Running gdb testsuite after applying this patch introduces no regressions
and tagged pointer test cases still pass.

gdb/ChangeLog:
2018-05-10  Omair Javaid  <omair.javaid@linaro.org>

	PR gdb/23127
	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
	set_gdbarch_significant_addr_bit.
	* aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
	set_gdbarch_significant_addr_bit.
	* utils.c (address_significant): Update to sign extend addr.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix -D_GLIBCXX_DEBUG gdb-add-index regression
@ 2018-04-12 21:16 sergiodj+buildbot
  2018-04-12 22:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-04-12 21:16 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 55404da3795df1b5eff514ce9d0377b6a78e5904 ***

Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Branch: gdb-8.1-branch
Commit: 55404da3795df1b5eff514ce9d0377b6a78e5904

Fix -D_GLIBCXX_DEBUG gdb-add-index regression

Fedora Rawhide started to use -D_GLIBCXX_DEBUG which made gdb-add-index
failing:
	gdb: Out-of-bounds vector access while running gdb-add-index
	https://bugzilla.redhat.com/show_bug.cgi?id=1540559

/usr/include/c++/7/debug/safe_iterator.h:270:
Error: attempt to dereference a past-the-end iterator.
Objects involved in the operation:
    iterator "this" @ 0x0x7fffffffcb90 {
      type = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned char*, std::__cxx1998::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > > >, std::__debug::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > > > (mutable iterator);
      state = past-the-end;
      references sequence with type 'std::__debug::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > >' @ 0x0x7fffffffcc50
    }

/usr/include/c++/7/debug/vector:417:
Error: attempt to subscript container with out-of-bounds index 556, but
container only holds 556 elements.
Objects involved in the operation:
    sequence "this" @ 0x0x2e87af8 {
      type = std::__debug::vector<partial_symbol*, std::allocator<partial_symbol*> >;
    }

The two -D_GLIBCXX_DEBUG regressions were made by:

commit bc8f2430e08cc2a520db49a42686e0529be4a3bc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jun 12 16:29:53 2017 +0100
    Code cleanup: C++ify .gdb_index producer

commit af5bf4ada48ff65b6658be1fab8f9c8f8ab5f319
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Sat Oct 14 08:06:29 2017 -0400
    Replace psymbol_allocation_list with std::vector

gdb/ChangeLog
2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/23053
	* dwarf2read.c (data_buf::grow) (write_one_signatured_type)
	(recursively_write_psymbols) (debug_names::recursively_write_psymbols)
	(debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
	regression.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] i386: Clear vex instead of vex.evex
@ 2018-04-04 16:12 sergiodj+buildbot
  2018-04-04 16:37 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-04-04 16:12 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f13be04ec6cc83947d8c4997aa48296a915b637f ***

Author: H.J. Lu <hjl.tools@gmail.com>
Branch: gdb-8.1-branch
Commit: f13be04ec6cc83947d8c4997aa48296a915b637f

i386: Clear vex instead of vex.evex

"vex" has many fields to control how to decode an instruction.  Clear
all fields in "vex" before decoding an instruction to avoid using values
left from the previous instruction.

gas/

	PR gdb/23028
	PR binutils/23025
	* testsuite/gas/i386/prefix.s: Add tests for vcvtpd2dq with
	VEX and EVEX prefixes.
	* testsuite/gas/i386/prefix.d: Updated.

opcodes/

	PR gdb/23028
	PR binutils/23025
	* i386-dis.c (get_valid_dis386): Don't set vex.prefix nor vex.w
	to 0.
	(print_insn): Clear vex instead of vex.evex.

(cherry picked from commit caf0678c84b5b55fbc4bcc853954745a4ad8b658)


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build on mingw*)
@ 2018-03-02 12:58 sergiodj+buildbot
  2018-03-02 14:34 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-03-02 12:58 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT a74e30b243dec8b38c8c769da04635210f9ef986 ***

Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: gdb-8.1-branch
Commit: a74e30b243dec8b38c8c769da04635210f9ef986

Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build on mingw*)

commit b4987c956dfa44ca9fd8552f63e15f5fa094b2a4
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Fri Feb 9 18:44:59 2018 -0500

    Create new common/pathstuff.[ch]

Introduced a regression when compiling for mingw*:

  /gdb/common/pathstuff.c: In function 'gdb::unique_xmalloc_ptr<char>
  gdb_realpath(const char*)':
  /gdb/common/pathstuff.c:56:14: error: 'MAX_PATH' was not declared in this scope
       char buf[MAX_PATH];
		^
  /gdb/common/pathstuff.c:57:5: error: 'DWORD' was not declared in this scope
       DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL);
       ^
  /gdb/common/pathstuff.c:57:11: error: expected ';' before 'len'
       DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL);
	     ^
  /gdb/common/pathstuff.c:63:9: error: 'len' was not declared in this scope
       if (len > 0 && len < MAX_PATH)
	   ^
  /gdb/common/pathstuff.c:64:54: error: 'buf' was not declared in this scope
	 return gdb::unique_xmalloc_ptr<char> (xstrdup (buf));
							^
  make[2]: *** [pathstuff.o] Error 1

The proper fix is to conditionally include "<windows.h>".  This commit
does that, without introducing any regressions as per tests made by
our BuildBot.

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

	PR gdb/22907
	* common/pathstuff.c: Conditionally include "<windows.h>".


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Change order of error message printed when gdbserver can't find CWD
@ 2018-03-01  3:00 sergiodj+buildbot
  2018-03-01  4:36 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-03-01  3:00 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 506817a3abd98859eb3474389e756c0253cc28a1 ***

Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: gdb-8.1-branch
Commit: 506817a3abd98859eb3474389e756c0253cc28a1

Change order of error message printed when gdbserver can't find CWD

I forgot to address Pedro's comment about my last patch and change the
order of the message printed when getcwd returns NULL on gdbserver.
This obvious commit does it.

gdb/gdbserver/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* server.c (captured_main): Change order of error message printed
	when the current working directory cannot be found.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Make gdbserver work with filename-only binaries
@ 2018-03-01  2:49 sergiodj+buildbot
  2018-03-01  3:55 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-03-01  2:49 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 2441702a72f324e41a1624dc042b334f375e2d81 ***

Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: gdb-8.1-branch
Commit: 2441702a72f324e41a1624dc042b334f375e2d81

Make gdbserver work with filename-only binaries

Simon mentioned on IRC that, after the startup-with-shell feature has
been implemented on gdbserver, it is not possible to specify a
filename-only binary, like:

  $ gdbserver :1234 a.out
  /bin/bash: line 0: exec: a.out: not found
  During startup program exited with code 127.
  Exiting

This happens on systems where the current directory "." is not listed
in the PATH environment variable.  Although including "." in the PATH
variable is a possible workaround, this can be considered a regression
because before startup-with-shell it was possible to use only the
filename (due to reason that gdbserver used "exec*" directly).

The idea of the patch is to verify if the program path provided by the
user (or by the remote protocol) contains a directory separator
character.  If it doesn't, it means we're dealing with a filename-only
binary, so we call "gdb_abspath" to properly expand it and transform
it into a full path.  Otherwise, we leave the program path untouched.
This mimicks the behaviour seen on GDB (look at "openp" and
"attach_inferior", for example).

I am also submitting a testcase which exercises the scenario described
above.  This test requires gdbserver to be executed in a different CWD
than the original, so I also created a helper function, "with_cwd" (on
testsuite/lib/gdb.exp), which takes care of cd'ing into and out of the
specified dir.

Built and regtested on BuildBot, without regressions.

gdb/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Simon Marchi  <simon.marchi@polymtl.ca>

	* common/common-utils.c: Include "sys/stat.h".
	(is_regular_file): Move here from "source.c"; change return
	type to "bool".
	* common/common-utils.h (is_regular_file): New prototype.
	* common/pathstuff.c (contains_dir_separator): New function.
	* common/pathstuff.h (contains_dir_separator): New prototype.
	* source.c: Don't include "sys/stat.h".
	(is_regular_file): Move to "common/common-utils.c".

gdb/gdbserver/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* server.c: Include "filenames.h" and "pathstuff.h".
	(program_name): Delete variable.
	(program_path): New anonymous class.
	(get_exec_wrapper): Use "program_path" instead of
	"program_name".
	(handle_v_run): Likewise.
	(captured_main): Likewise.
	(process_serial_event): Likewise.

gdb/testsuite/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.server/abspath.exp: New file.
	* lib/gdb.exp (with_cwd): New procedure.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Create new common/pathstuff.[ch]
@ 2018-03-01  2:36 sergiodj+buildbot
  2018-03-01  3:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-03-01  2:36 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 6d607b8812b35ff36fbbad2915696f6669f86a32 ***

Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: gdb-8.1-branch
Commit: 6d607b8812b35ff36fbbad2915696f6669f86a32

Create new common/pathstuff.[ch]

This commit moves the path manipulation routines found on utils.c to a
new common/pathstuff.c, and updates the Makefile.in's accordingly.
The routines moved are "gdb_realpath", "gdb_realpath_keepfile" and
"gdb_abspath".

This will be needed because gdbserver will have to call "gdb_abspath"
on my next patch, which implements a way to expand the path of the
inferior provided by the user in order to allow specifying just the
binary name when starting gdbserver, like:

  $ gdbserver :1234 a.out

With the recent addition of the startup-with-shell feature on
gdbserver, this scenario doesn't work anymore if the user doesn't have
the current directory listed in the PATH variable.

I had to do a minor adjustment on "gdb_abspath" because we don't have
access to "tilde_expand" on gdbserver, so now the function is using
"gdb_tilde_expand" instead.  Otherwise, the code is the same.

Regression tested on the BuildBot, without regressions.

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

	* Makefile.in (SFILES): Add "common/pathstuff.c".
	(HFILES_NO_SRCDIR): Add "common/pathstuff.h".
	(COMMON_OBS): Add "pathstuff.o".
	* auto-load.c: Include "common/pathstuff.h".
	* common/common-def.h (current_directory): Move here.
	* common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
	function.
	* common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
	prototype.
	* common/pathstuff.c: New file.
	* common/pathstuff.h: New file.
	* compile/compile.c: Include "common/pathstuff.h".
	* defs.h (current_directory): Move to "common/common-defs.h".
	* dwarf2read.c: Include "common/pathstuff.h".
	* exec.c: Likewise.
	* guile/scm-safe-call.c: Likewise.
	* linux-thread-db.c: Likewise.
	* main.c: Likewise.
	* nto-tdep.c: Likewise.
	* objfiles.c: Likewise.
	* source.c: Likewise.
	* symtab.c: Likewise.
	* utils.c: Include "common/pathstuff.h".
	(gdb_realpath): Move to "common/pathstuff.c".
	(gdb_realpath_keepfile): Likewise.
	(gdb_abspath): Likewise.
	* utils.h (gdb_realpath): Move to "common/pathstuff.h".
	(gdb_realpath_keepfile): Likewise.
	(gdb_abspath): Likewise.

gdb/gdbserver/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
	(OBJS): Add "pathstuff.o".
	* server.c (current_directory): New global variable.
	(captured_main): Initialize "current_directory".


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] gdb/NEWS: Clarify the news entry for "rbreak" in GDB 8.1
@ 2018-02-09 12:51 sergiodj+buildbot
  2018-02-09 13:45 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-02-09 12:51 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT c58318003f7fd63e43b0b6aea045bc16bada8c50 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: c58318003f7fd63e43b0b6aea045bc16bada8c50

gdb/NEWS: Clarify the news entry for "rbreak" in GDB 8.1

gdb/ChangeLog:

        PR gdb/22824:
        * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
        Python function, rather than a new command.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.1.
@ 2018-01-31  3:17 sergiodj+buildbot
  2018-01-31  4:32 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-31  3:17 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT b755db3c98137baaff8a154d936d326d9a9c72a7 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: b755db3c98137baaff8a154d936d326d9a9c72a7

Set GDB version number to 8.1.

gdb/ChangeLog:

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


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Avoid compilation errors in MinGW native builds of GDB
@ 2018-01-27 17:20 sergiodj+buildbot
  2018-01-27 19:43 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-27 17:20 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 0b2b72156eef6e1a34f316e96278bc286f0d0506 ***

Author: Eli Zaretskii <eliz@gnu.org>
Branch: gdb-8.1-branch
Commit: 0b2b72156eef6e1a34f316e96278bc286f0d0506

Avoid compilation errors in MinGW native builds of GDB

The error is triggered by including python-internal.h, and the
error message is:

     In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
	      from build-gnulib/import/math.h:27,
	      from d:/usr/Python26/include/pyport.h:235,
	      from d:/usr/Python26/include/Python.h:58,
	      from python/python-internal.h:94,
	      from python/py-arch.c:24:
     d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
        using ::hypot;
	        ^~~~~

This happens because Python headers define 'hypot' to expand to
'_hypot' in the Windows builds.

gdb/ChangeLog:
2018-01-27  Eli Zaretskii  <eliz@gnu.org>

	* python/python-internal.h (_hypot) [__MINGW32__]: Define back to
	'hypoth'.  This avoids a compilation error.

(cherry picked from commit b2a426e2c5632644b6b8bc0dde4cd32d42d548e2)


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix GCC PR83906 - [8 Regression] Random FAIL: libstdc++-prettyprinters/80276.cc whatis p4
@ 2018-01-24 19:02 sergiodj+buildbot
  2018-01-24 20:28 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-24 19:02 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 76112dde119b37c1bf6b6234049a94a288d3e02f ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: 76112dde119b37c1bf6b6234049a94a288d3e02f

Fix GCC PR83906 - [8 Regression] Random FAIL: libstdc++-prettyprinters/80276.cc whatis p4

GCC PR83906 [1] is about a GCC/libstdc++ GDB/Python type printer
testcase failing randomly, as shown by running (in libstdc++'s
testsuite):

 make check RUNTESTFLAGS=prettyprinters.exp=80276.cc

in a loop.  Sometimes you get this:

 FAIL: libstdc++-prettyprinters/80276.cc whatis p4

I.e., this:
 type = std::unique_ptr<std::vector<std::unique_ptr<std::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>[]>>[99]>

instead of this:
 type = std::unique_ptr<std::vector<std::unique_ptr<std::list<std::string>[]>>[99]>

Jonathan Wakely tracked it on the printer side to this bit in
libstdc++'s type printer:

            if self.type_obj == type_obj:
                return strip_inline_namespaces(self.name)

This assumes the two types resolve to the same gdb.Type but some times
the comparison unexpectedly fails.

Running the testcase manually under Valgrind finds the problem in GDB:

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ==6118== Conditional jump or move depends on uninitialised value(s)
 ==6118==    at 0x4C35CB0: bcmp (vg_replace_strmem.c:1100)
 ==6118==    by 0x6F773A: check_types_equal(type*, type*, VEC_type_equality_entry_d**) (gdbtypes.c:3515)
 ==6118==    by 0x6F7B00: check_types_worklist(VEC_type_equality_entry_d**, bcache*) (gdbtypes.c:3618)
 ==6118==    by 0x6F7C03: types_deeply_equal(type*, type*) (gdbtypes.c:3655)
 ==6118==    by 0x4D5B06: typy_richcompare(_object*, _object*, int) (py-type.c:1007)
 ==6118==    by 0x63D7E6C: PyObject_RichCompare (object.c:961)
 ==6118==    by 0x646EAEC: PyEval_EvalFrameEx (ceval.c:4960)
 ==6118==    by 0x646DC08: PyEval_EvalFrameEx (ceval.c:4519)
 ==6118==    by 0x646DC08: PyEval_EvalFrameEx (ceval.c:4519)
 ==6118==    by 0x646DC08: PyEval_EvalFrameEx (ceval.c:4519)
 ==6118==    by 0x646DC08: PyEval_EvalFrameEx (ceval.c:4519)
 ==6118==    by 0x646DC08: PyEval_EvalFrameEx (ceval.c:4519)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That "bcmp" call is really a memcmp call in check_types_equal.  The
problem is that gdb is memcmp'ing two objects that are equal in value:

 (top-gdb) p *TYPE_RANGE_DATA (type1)
 $1 = {low = {kind = PROP_CONST, data = {const_val = 0, baton = 0x0}}, high = {kind = PROP_CONST, data = {const_val = 15, baton = 0xf}}, flag_upper_bound_is_count = 0,
   flag_bound_evaluated = 0}
 (top-gdb) p *TYPE_RANGE_DATA (type2)
 $2 = {low = {kind = PROP_CONST, data = {const_val = 0, baton = 0x0}}, high = {kind = PROP_CONST, data = {const_val = 15, baton = 0xf}}, flag_upper_bound_is_count = 0,
   flag_bound_evaluated = 0}

but differ in padding.  Notice the 4-byte hole:

  (top-gdb) ptype /o range_bounds
  /* offset    |  size */  type = struct range_bounds {
  /*    0      |    16 */    struct dynamic_prop {
  /*    0      |     4 */        dynamic_prop_kind kind;
  /* XXX  4-byte hole  */
  /*    8      |     8 */        union dynamic_prop_data {
  /*                 8 */            LONGEST const_val;
  /*                 8 */            void *baton;

				     /* total size (bytes):    8 */
				 } data;

which is filled with garbage:

  (top-gdb) x /40bx TYPE_RANGE_DATA (type1)
  0x2fa7ea0:      0x01    0x00    0x00    0x00    0x43    0x01    0x00    0x00
						  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  0x2fa7ea8:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  0x2fa7eb0:      0x01    0x00    0x00    0x00    0xfe    0x7f    0x00    0x00
  0x2fa7eb8:      0x0f    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  0x2fa7ec0:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  (top-gdb) x /40bx TYPE_RANGE_DATA (type2)
  0x20379b0:      0x01    0x00    0x00    0x00    0xfe    0x7f    0x00    0x00
						  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  0x20379b8:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  0x20379c0:      0x01    0x00    0x00    0x00    0xfe    0x7f    0x00    0x00
  0x20379c8:      0x0f    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  0x20379d0:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00

  (top-gdb) p memcmp (TYPE_RANGE_DATA (type1), TYPE_RANGE_DATA (type2), sizeof (*TYPE_RANGE_DATA (type1)))
  $3 = -187

In some cases objects of type range_bounds are memset when allocated,
but then their dynamic_prop low/high fields are copied over from some
template dynamic_prop object that wasn't memset.  E.g.,
create_static_range_type's low/high locals are left with garbage in
the padding, and then that padding is copied over to the range_bounds
object's low/high fields.

At first, I considered making sure to always memset range_bounds
objects, thinking that maybe type objects are being put in some bcache
instance somewhere.  But then I hacked bcache/bcache_full to poison
non-pod types, and made dynamic_prop a non-pod, and GDB still
compiled.

So given that, it seems safest to not assume padding will always be
memset, and instead treat them as regular value types, implementing
(in)equality operators and using those instead of memcmp.

This fixes the random FAILs in GCC's testcase.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83906

gdb/ChangeLog:
2018-01-24  Pedro Alves  <palves@redhat.com>

	GCC PR libstdc++/83906
	* gdbtypes.c (operator==(const dynamic_prop &,
	const dynamic_prop &)): New.
	(operator==(const range_bounds &, const range_bounds &)): New.
	(check_types_equal): Use them instead of memcmp.
	* gdbtypes.h (operator==(const dynamic_prop &,
	const dynamic_prop &)): Declare.
	(operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
	(operator==(const range_bounds &, const range_bounds &)): Declare.
	(operator!=(const range_bounds &, const range_bounds &)): Declare.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix segfault with 'set print object on' + 'whatis <struct>' & co
@ 2018-01-22 20:14 sergiodj+buildbot
  2018-01-22 21:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-22 20:14 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT ddd0c99df8d76047fc651911e5651e8decae86ca ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: ddd0c99df8d76047fc651911e5651e8decae86ca

Fix segfault with 'set print object on' + 'whatis <struct>' & co

Compiling GDB with a recent GCC exposes a problem:

  ../../gdb/typeprint.c: In function 'void whatis_exp(const char*, int)':
  ../../gdb/typeprint.c:515:12: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
    real_type = value_rtti_type (val, &full, &top, &using_enc);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The warning is correct.  There are indeed code paths that use
uninitialized 'val', leading to crashes.  Inside the
value_rtti_indirect_type/value_rtti_type calls here in whatis_exp:

  if (opts.objectprint)
    {
      if (((TYPE_CODE (type) == TYPE_CODE_PTR) || TYPE_IS_REFERENCE (type))
	  && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
        real_type = value_rtti_indirect_type (val, &full, &top, &using_enc);
      else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
	real_type = value_rtti_type (val, &full, &top, &using_enc);
    }

We reach those calls above with "set print object on", and then with
any of:

  (gdb) whatis struct some_structure_type
  (gdb) whatis struct some_structure_type *
  (gdb) whatis struct some_structure_type &

because "whatis" with a type argument enters this branch:

      /* The behavior of "whatis" depends on whether the user
	 expression names a type directly, or a language expression
	 (including variable names).  If the former, then "whatis"
	 strips one level of typedefs, only.  If an expression,
	 "whatis" prints the type of the expression without stripping
	 any typedef level.  "ptype" always strips all levels of
	 typedefs.  */
      if (show == -1 && expr->elts[0].opcode == OP_TYPE)
	{

which does not initialize VAL.  Trying the above triggers crashes like
this:

  (gdb) set print object on
  (gdb) whatis some_structure_type

  Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
  0x00000000005dda90 in check_typedef (type=0x6120736573756170) at src/gdb/gdbtypes.c:2388
  2388      int instance_flags = TYPE_INSTANCE_FLAGS (type);
  ...

This is a regression caused by a recent-ish refactoring of the code on
'whatis_exp', introduced by:

  commit c973d0aa4a2c737ab527ae44a617f1c357e07364
  Date:   Mon Aug 21 11:34:32 2017 +0100

      Fix type casts losing typedefs and reimplement "whatis" typedef stripping

Fix this by setting VAL to NULL in the "whatis TYPE" case, and
skipping fetching the dynamic type if there's no value to fetch it
from.

New tests included.

gdb/ChangeLog:
2018-01-22  Pedro Alves  <palves@redhat.com>
	    Sergio Durigan Junior  <sergiodj@redhat.com>

	* typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
	case.

gdb/testsuite/ChangeLog:
2018-01-22  Pedro Alves  <palves@redhat.com>
	    Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/whatis.exp: Add tests for 'set print object on' +
	'whatis <struct>' 'whatis <struct> *' and 'whatis <struct> &'.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx")
@ 2018-01-18  0:02 sergiodj+buildbot
  2018-01-18 17:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-18  0:02 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 2a54d2158beeb2833cb3fb4da68e7c55e341159a ***

Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: gdb-8.1-branch
Commit: 2a54d2158beeb2833cb3fb4da68e7c55e341159a

Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx")

This fixes a GCC warning that happens when compiling
gdb/compile/compile.c on some GCC versions (e.g., "gcc (GCC) 7.2.1
20180104 (Red Hat 7.2.1-6)"):

../../gdb/compile/compile.c: In function 'void eval_compile_command(command_line*, const char*, compile_i_scope_types, void*)':
../../gdb/compile/compile.c:548:19: warning: 'triplet_rx' may be used uninitialized in this function [-Wmaybe-uninitialized]
     error_message = compiler->fe->ops->set_arguments_v0 (compiler->fe, triplet_rx,
     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         argc, argv);
         ~~~~~~~~~~~
../../gdb/compile/compile.c:466:9: note: 'triplet_rx' was declared here
   char *triplet_rx;
         ^~~~~~~~~~

It's a simple patch that converts "triplet_rx" from "char *" to
"std::string", thus guaranteeing that it will be always initialized.

I've regtested this patch and did not find any regressions.  OK to
apply on both master and 8.1 (after creating a bug for it)?

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

	* compile/compile.c (compile_to_object): Convert "triplet_rx"
	to "std::string".


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] configure: Fix test for fs_base/gs_base in <sys/user.h>
@ 2018-01-17 14:00 sergiodj+buildbot
  2018-01-17 16:32 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-17 14:00 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 6949085e3eaef536b2c76252452ec3e63e9f112c ***

Author: Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
Branch: gdb-8.1-branch
Commit: 6949085e3eaef536b2c76252452ec3e63e9f112c

configure: Fix test for fs_base/gs_base in <sys/user.h>

Make <sys/types.h> be included prior to including <sys/user.h>.

glibc versions older than 2.14 use __uintNN_t types within certain
structures defined in <sys/user.h> probably assuming these types are
defined prior to including the header. This results in the following
`configure` feature test compilation error that makes it think that
`struct user_regs_struct` doesn't have `fs_base`/`gs_base` fields,
althouh it does.

    configure:13617: checking for struct user_regs_struct.fs_base
    configure:13617: gcc -c -g -O2 -I/linux/include conftest.c >&5
    In file included from conftest.c:158:0:
    /usr/include/sys/user.h:32:3: error: unknown type name '__uint16_t'
       __uint16_t  cwd;
       ^
    /usr/include/sys/user.h:33:3: error: unknown type name '__uint16_t'
       __uint16_t  swd;
       ^
    /usr/include/sys/user.h:34:3: error: unknown type name '__uint16_t'
       __uint16_t  ftw;
       ^
    /usr/include/sys/user.h:35:3: error: unknown type name '__uint16_t'
       __uint16_t  fop;
       ^
    /usr/include/sys/user.h:36:3: error: unknown type name '__uint64_t'
       __uint64_t  rip;
       ^
    /usr/include/sys/user.h:37:3: error: unknown type name '__uint64_t'
       __uint64_t  rdp;
       ^
    /usr/include/sys/user.h:38:3: error: unknown type name '__uint32_t'
       __uint32_t  mxcsr;
       ^
    /usr/include/sys/user.h:39:3: error: unknown type name '__uint32_t'
       __uint32_t  mxcr_mask;
       ^
    /usr/include/sys/user.h:40:3: error: unknown type name '__uint32_t'
       __uint32_t  st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
       ^
    /usr/include/sys/user.h:41:3: error: unknown type name '__uint32_t'
       __uint32_t  xmm_space[64];  /* 16*16 bytes for each XMM-reg = 256 bytes */
       ^
    /usr/include/sys/user.h:42:3: error: unknown type name '__uint32_t'
       __uint32_t  padding[24];
       ^
    configure:13617: $? = 1
    configure: failed program was:
    | /* confdefs.h */
    ...
    | /* end confdefs.h.  */
    | #include <sys/user.h>
    |
    | int
    | main ()
    | {
    | static struct user_regs_struct ac_aggr;
    | if (ac_aggr.fs_base)
    | return 0;
    |   ;
    |   return 0;
    | }

Recent glibc versions don't use typedef'ed int types in <sys/user.h>,
thus allowing it to be included as is
(glibc commit d79a9c949c84e7f0ba33e87447c47af833e9f11a).
However there're still some distros alive that use older glibc,
for instance, RHEL/CentOS 6 package glibc 2.12.

Also affects PR gdb/21559:

    ../../gdb/regcache.c:1087: internal-error: void regcache_raw_supply(regcache, int, const void): Assertion `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.

As noted by Andrew Paprocki, who submitted the PR
(https://sourceware.org/bugzilla/show_bug.cgi?id=21559#c3):

    > It should be noted that modifying `configure` to force on
    > `HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE` and
    > `HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE` fixes this issue. For some
    > reason the `configure` tests for `fs_base` and `gs_base` fail
    > even though `sys/user.h` on RHEL5 has the fields defined in
    > `user_regs_struct`.

Note that this patch does NOT fix the root cause of PR gdb/21559,
although now that `configure` properly detects the presence of the
fields and sets HAVE_XXX accordingly, the execution takes another
path, which doesn't lead to the assertion failure in question.

gdb/ChangeLog:
2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>

	PR gdb/21559
	* configure.ac: Include <sys/types.h> prior to <sys/user.h> when
	checking for fs_base/gs_base fields in struct user_regs_struct.
	* configure: Regenerate.

gdb/gdbserver/ChangeLog:
2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>

	PR gdb/21559
	* configure.ac: Include <sys/types.h> prior to <sys/user.h> when
	checking for fs_base/gs_base fields in struct user_regs_struct.
	* configure: Regenerate.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Don't pass -m64 to libcc1 on aarch64-linux.
@ 2018-01-17 13:36 sergiodj+buildbot
  2018-01-17 14:54 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-17 13:36 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 94485cac9629ca3e5489014e1b704e35f988d3e3 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: gdb-8.1-branch
Commit: 94485cac9629ca3e5489014e1b704e35f988d3e3

Don't pass -m64 to libcc1 on aarch64-linux.

Nowadays, if we use "compile" on aarch64-linux, we'll get the following
error,

(gdb) compile code -- ;
aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-m64'

because the default gcc_target_options returns "-m64" and
"-mcmodel=large", neither is useful to aarch64-linux.

gdb:

2018-01-17  Yao Qi  <yao.qi@linaro.org>

	* aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
	function.
	(aarch64_linux_init_abi): Install it to gdbarch hook
	gcc_target_options.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Relax gdb.compile/compile.exp to match the address printed for frame
@ 2018-01-17 11:59 sergiodj+buildbot
  2018-01-17 13:18 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-17 11:59 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 862f0945fb83319efee9c621a3434384f1882270 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: gdb-8.1-branch
Commit: 862f0945fb83319efee9c621a3434384f1882270

Relax gdb.compile/compile.exp to match the address printed for frame

One test in gdb.compile/compile.exp passes on one fedora builder,

 bt
 #0  0x00007ffff7ff43f6 in _gdb_expr (__regs=0x7ffff7ff2000) at gdb
 command line:1^M
 #1  <function called from gdb>^M
 #2  main () at /home/gdb-buildbot/fedora-x86-64-1/fedora-x86-64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.compile/compile.c:106^M
 (gdb) PASS: gdb.compile/compile.exp: bt

but fails on my machine with gcc trunk,

 bt^M
 #0  _gdb_expr (__regs=0x7ffff7ff3000) at gdb command line:1^M
 #1  <function called from gdb>^M
 #2  main () at gdb/testsuite/gdb.compile/compile.c:106^M
 (gdb) FAIL: gdb.compile/compile.exp: bt

The test should be tweaked to match both cases (pc in the start of line
vs pc in the middle of line).  Note that I am not clear that why libcc1
emits debug info this way so that the address is in the middle of line.

gdb/testsuite:

2018-01-17  Yao Qi  <yao.qi@linaro.org>

	* gdb.compile/compile.exp: Match the address printed for
	frame in the output of command "bt".


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix scm-ports.exp regression
@ 2018-01-15 22:32 sergiodj+buildbot
  2018-01-15 23:04 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-15 22:32 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 5429afd6529f3a7dc7d733fc21053ca3ecadd033 ***

Author: Tom Tromey <tom@tromey.com>
Branch: gdb-8.1-branch
Commit: 5429afd6529f3a7dc7d733fc21053ca3ecadd033

Fix scm-ports.exp regression

In https://sourceware.org/ml/gdb-patches/2017-12/msg00215.html, Jan
pointed out that the scalar printing patches caused a regression in
scm-ports.exp on x86.

What happens is that on x86, this:

	set sp_reg [get_integer_valueof "\$sp" 0]

... ends up setting sp_reg to a negative value, because
get_integer_valueof uses "print/d":

    print /d $sp
    $1 = -11496

Then later the test suite does:

    gdb_test "guile (print (seek rw-mem-port (value->integer sp-reg) SEEK_SET))" \
	"= $sp_reg" \
	"seek to \$sp"

... expecting this value to be identical to the saved $sp_reg value.
However it gets:

    guile (print (seek rw-mem-port (value->integer sp-reg) SEEK_SET))
    = 4294955800

"print" is just a wrapper for guile's format:

    gdb_test_no_output "guile (define (print x) (format #t \"= ~A\" x) (newline))"

The seek function returns a scm_t_off, the printing of which is
handled by guile, not by gdb.

Tested on x86-64 Fedora 26 using an ordinary build and also a -m32
build.

2018-01-15  Tom Tromey  <tom@tromey.com>

	* gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to
	compute sp_reg.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Bump GDB version number to 8.0.91.DATE-git.
@ 2018-01-12  6:37 sergiodj+buildbot
  2018-01-12  7:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-12  6:37 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 4d8dd3e16837698b48447531c8e74796d702135c ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: 4d8dd3e16837698b48447531c8e74796d702135c

Bump GDB version number to 8.0.91.DATE-git.

gdb/ChangeLog:

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


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] gdb/NEWS: Rename "Changes since 8.0" into "Changes in 8.1".
@ 2018-01-12  5:00 sergiodj+buildbot
  2018-01-12  5:40 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-12  5:00 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 93935fd4e30036cb2d549ac0b5568efa495237c4 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: gdb-8.1-branch
Commit: 93935fd4e30036cb2d549ac0b5568efa495237c4

gdb/NEWS: Rename "Changes since 8.0" into "Changes in 8.1".

gdb/ChangeLog:

        * NEWS: Rename "Changes since 8.0" into "Changes in 8.1".


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix backwards compatibility with old GDBservers (PR remote/22597)
@ 2018-01-11  7:05 sergiodj+buildbot
  2018-01-11  7:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-11  7:05 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 936a312c04f9f1dd856571bf7573b5a8f51ed895 ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: 936a312c04f9f1dd856571bf7573b5a8f51ed895

Fix backwards compatibility with old GDBservers (PR remote/22597)

At <https://sourceware.org/ml/gdb-patches/2017-12/msg00285.html>,
Maciej reported that commit:

  commit 5cd63fda035d4ba949e6478406162c4673b3c9ef
  Date: Wed Oct 4 18:21:10 2017 +0100
  Subject: Fix "Remote 'g' packet reply is too long" problems with multiple inferiors

made GDB stop working with older stubs.  Any attempt to continue
execution after the initial connection fails with:

  [...]
  Process .../gdb/testsuite/outputs/gdb.base/advance/advance created; pid = 2670
  Listening on port 2346
  target remote [...]:2346
  Remote debugging using [...]:2346
  Reading symbols from .../lib64/ld.so.1...done.
  [Switching to Thread <main>]
  (gdb) continue
  Cannot execute this command without a live selected thread.
  (gdb)

The problem is:

  (gdb) c
  Cannot execute this command without a live selected thread.
  (gdb) info threads
    Id   Target Id         Frame
    1    Thread 14917      0x00007f341cd98ed0 in _start () from /lib64/ld-linux-x86-64.so.2

  The current thread <Thread ID 2> has terminated.  See `help thread'.
		      ^^^^^^^^^^^
  (gdb)

Note, thread _2_.  There's really only one thread in the inferior
(it's still at the entry point), but still GDB added a bogus second
thread.

The reason GDB started adding a second thread after 5cd63fda035d is
this hunk:

+                 if (event->ptid == null_ptid)
+                   {
+                     const char *thr = strstr (p1 + 1, ";thread:");
+                     if (thr != NULL)
+                       event->ptid = read_ptid (thr + strlen (";thread:"),
+                                                NULL);
+                     else
+                       event->ptid = magic_null_ptid;
+                   }

Note the else branch that falls back to magic_null_ptid.  We reach
that when we process the initial stop reply sent back in response to
the the "?" (status) packet early in the connection setup:

 Sending packet: $?#3f...Ack
 Packet received: T0506:0000000000000000;07:40a510f4fd7f0000;10:d0fe1201577f0000;

And note that that response does not include a ";thread:XXX" part.

This stop reply is processed after listing threads with qfThreadInfo /
qsThreadInfo :

 Sending packet: $qfThreadInfo#bb...Ack
 Packet received: m3915
 Sending packet: $qsThreadInfo#c8...Ack
 Packet received: l

meaning, when we process that stop reply, we treat the event as coming
from a thread with ptid == magic_null_ptid, which is not yet in the
thread list, so we add it then:

  (top-gdb) p ptid
  $1 = {m_pid = 42000, m_lwp = -1, m_tid = 1}
  (top-gdb) bt
  #0  0x0000000000840a8c in add_thread_silent(ptid_t) (ptid=...) at src/gdb/thread.c:269
  #1  0x00000000007ad61d in remote_add_thread(ptid_t, int, int) (ptid=..., running=0, executing=0)
      at src/gdb/remote.c:1838
  #2  0x00000000007ad8de in remote_notice_new_inferior(ptid_t, int) (currthread=..., executing=0)
      at src/gdb/remote.c:1921
  #3  0x00000000007b758b in process_stop_reply(stop_reply*, target_waitstatus*) (stop_reply=0x1158860, status=0x7fffffffcc00)
      at src/gdb/remote.c:7217
  #4  0x00000000007b7a38 in remote_wait_as(ptid_t, target_waitstatus*, int) (ptid=..., status=0x7fffffffcc00, options=0)
      at src/gdb/remote.c:7380
  #5  0x00000000007b7cd1 in remote_wait(target_ops*, ptid_t, target_waitstatus*, int) (ops=0x102fac0 <remote_ops>, ptid=..., status=0x7fffffffcc00, options=0) at src/gdb/remote.c:7446
  #6  0x000000000081587b in delegate_wait(target_ops*, ptid_t, target_waitstatus*, int) (self=0x102fac0 <remote_ops>, arg1=..., arg2=0x7fffffffcc00, arg3=0) at src/gdb/target-delegates.c:138
  #7  0x0000000000827d77 in target_wait(ptid_t, target_waitstatus*, int) (ptid=..., status=0x7fffffffcc00, options=0)
      at src/gdb/target.c:2179
  #8  0x0000000000715fda in do_target_wait(ptid_t, target_waitstatus*, int) (ptid=..., status=0x7fffffffcc00, options=0)
      at src/gdb/infrun.c:3589
  #9  0x0000000000716351 in wait_for_inferior() () at src/gdb/infrun.c:3707
  #10 0x0000000000715435 in start_remote(int) (from_tty=1) at src/gdb/infrun.c:3212

things go downhill from this.

We don't see the problem with current master gdbserver, because that
version always sends the ";thread:" part in the initial stop reply:

 Sending packet: $?#3f...Packet received: T0506:0000000000000000;07:a0d4ffffff7f0000;10:d05eddf7ff7f0000;thread:p3cea.3cea;core:3;

Years ago I had added a "--disable-packet=" command line option to
gdbserver which comes in handy for testing this, since the existing
"--disable-packet=Tthread" precisely makes gdbserver not send that
";thread:" part in stop replies.  The testcase added by this commit
emulates old gdbserver making use of that.

I've compared a testrun at 5cd63fda035d^ (before regression) with
'current master+patch', against old gdbserver at f8b73d13b7ca^.  I
hacked out --once, and "monitor exit" to be able to test.  The results
are a bit too unstable to tell accurately, but it looked like there
were no regressions.  Maciej confirmed this worked for him as well.

No regressions on master (against master gdbserver).

gdb/ChangeLog:
2018-01-11  Pedro Alves  <palves@redhat.com>

	PR remote/22597
	* remote.c (remote_parse_stop_reply): Default to the last-set
	general thread instead of to 'magic_null_ptid'.

gdb/testsuite/ChangeLog:
2018-01-11  Pedro Alves  <palves@redhat.com>

	PR remote/22597
	* gdb.server/stop-reply-no-thread.c: New file.
	* gdb.server/stop-reply-no-thread.exp: New file.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] language_get_symbol_name_matcher -> get_symbol_name_matcher
@ 2018-01-11  5:03 sergiodj+buildbot
  2018-01-11  5:31 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-11  5:03 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT a3dc9ae700a0f74bb1781be6334cfab04cf93caf ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: a3dc9ae700a0f74bb1781be6334cfab04cf93caf

language_get_symbol_name_matcher -> get_symbol_name_matcher

Rename language_get_symbol_name_matcher -> get_symbol_name_matcher,
since the function is no longer a straight "language method".

gdb/ChangeLog:
2018-01-10  Pedro Alves  <palves@redhat.com>

	* language.h (language_get_symbol_name_matcher): Rename ...
	(get_symbol_name_matcher): ... this.
	* language.c (language_get_symbol_name_matcher): Ditto.
	* dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
	callers adjusted.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix gdb.ada/complete.exp's "complete break ada" test (PR gdb/22670)
@ 2018-01-11  3:20 sergiodj+buildbot
  2018-01-11  4:02 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-11  3:20 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT be1f9aabab1be45e324ae4cd30e7b08cb7e6c083 ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: be1f9aabab1be45e324ae4cd30e7b08cb7e6c083

Fix gdb.ada/complete.exp's "complete break ada" test (PR gdb/22670)

This patch fixes the regression covered by the test added by:

    commit 344420da6beac1e0b2f7964e7101f8dcdb509b0d
    Date: Thu Jan 4 03:30:37 2018 -0500
    Subject: Add "complete break ada" test to gdb.ada/complete.exp

The regression had been introduced by:

    commit b5ec771e60c1a0863e51eb491c85c674097e9e13
    Date:   Wed Nov 8 14:22:32 2017 +0000
    Subject: Introduce lookup_name_info and generalize Ada's FULL/WILD name matching

The gist of it is that linespec completion in Ada mode is generating
additional matches that should not appear in the match list
(internally generated symbols, or symbols that should be enclosed
between "<...>").  These extraneous entries have uppercase characters, such as:

    break ada__stringsS
    break ada__strings__R11s
    [etc]

These matches come from minimal symbols.  The problem is that Ada
minsyms end up with no language set (language_auto), and thus we end
up using the generic symbol name matcher for those instead of Ada's.
We already had a special case for in compare_symbol_name to handle
this, but it was limited to expressions, while the case at hand is
completing a linespec.  Fix this by applying the special case to
linespec completion as well.  I.e., remove the EXPRESSION check from
compare_symbol_name.  That alone turns out to not be sufficient still
-- GDB would still show a couple entries that shouldn't be there:

~~
    break ada__exceptions__exception_data__append_info_exception_name__2Xn
    break ada__exceptions__exception_data__exception_name_length__2Xn
~~

The reason is that these minimal symbols end up with their language
set to language_cplus / C++, because those encoded names manage to
demangle successfully as C++ symbols (using an old C++ mangling
scheme):

  $ echo ada__exceptions__exception_data__append_info_exception_name__2Xn | c++filt
  Xn::ada__exceptions__exception_data__append_info_exception_name(void)

It's unfortunate that Ada's encoding scheme doesn't start with some
unique prefix like "_Z" in the C++ Itanium ABI mangling scheme.  For
now, paper over that by treating C++ minsyms as Ada minsyms.

gdb/ChangeLog:
2018-01-10  Pedro Alves  <palves@redhat.com>

        PR gdb/22670
	* ada-lang.c (ada_collect_symbol_completion_matches): If the
	minsym's language is language_auto or language_cplus, pass down
	language_ada instead.
	* symtab.c (compare_symbol_name): Don't frob symbol language here.

gdb/testsuite/ChangeLog:
2018-01-10  Pedro Alves  <palves@redhat.com>

        PR gdb/22670
	* gdb.ada/complete.exp ("complete break ada"): Replace kfail with
	a fail.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix gdb.ada/bp_c_mixed_case.exp (PR gdb/22670)
@ 2018-01-11  2:27 sergiodj+buildbot
  2018-01-11  3:04 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-11  2:27 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT bd140f1f5ef06b801156c787331f2d3ad72320a1 ***

Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.1-branch
Commit: bd140f1f5ef06b801156c787331f2d3ad72320a1

Fix gdb.ada/bp_c_mixed_case.exp (PR gdb/22670)

The problem here is that we are using the user-provided lookup name
literally for name comparisons.  I.e., "<MixedCase>" with the "<>"s
included.

This commit fixes the minsym lookup case.  psymbol/symbol lookup will
be fixed in a follow up.

In the minsym case, we're using using the user-provided lookup name
literally for linkage name comparisons.  That obviously can't work
since the "<>" are not really part of the linkage name.

The original idea was that we'd use the symbol's language to select
the right symbol name matching algorithm, but that doesn't work for
Ada because it's not really possible to unambiguously tell from the
linkage name alone whether we're dealing with Ada symbols, so Ada
minsyms end up with no language set, or sometimes C++ set.

So fix this by treating Ada mode specially when determining the
linkage name to match against.

gdb/ChangeLog:
2018-01-10  Pedro Alves  <palves@redhat.com>

	PR gdb/22670
	* minsyms.c (linkage_name_str): New function.
	(iterate_over_minimal_symbols): Use it.

gdb/testsuite/ChangeLog:
2018-01-10  Pedro Alves  <palves@redhat.com>

	PR gdb/22670
	* gdb.ada/bp_c_mixed_case.exp: Remove setup_kfail calls.


^ permalink raw reply	[flat|nested] 43+ messages in thread
* [binutils-gdb/gdb-8.1-branch] Fix GDBserver build failure when $development is false
@ 2018-01-08 12:27 sergiodj+buildbot
  2018-01-08 12:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
  0 siblings, 1 reply; 43+ messages in thread
From: sergiodj+buildbot @ 2018-01-08 12:27 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f464485579f8e0a22e87aaa568b7ed4b3ec13ee3 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: gdb-8.1-branch
Commit: f464485579f8e0a22e87aaa568b7ed4b3ec13ee3

Fix GDBserver build failure when $development is false

When we set bfd/development.sh:$development to false, GDBserver failed to
build,

selftest.o: In function `selftests::run_tests(char const*)':
binutils-gdb/gdb/gdbserver/../common/selftest.c:97:undefined reference to `selftests::reset()'
collect2: error: ld returned 1 exit status

selftest.o shouldn't be compiled and linked when $development is false.
With this patch, in release mode, GDBserver doesn't nothing with option
--selftest,

$ ./gdbserver --selftest=foo
Selftests are not available in a non-development build.
$ ./gdbserver --selftest
Selftests are not available in a non-development build.

gdb/gdbserver:

2018-01-08  Yao Qi  <yao.qi@linaro.org>
	    Simon Marchi  <simon.marchi@ericsson.com>

	* Makefile.in (OBS): Remove selftest.o.
	* configure.ac: Set srv_selftest_objs if $development is true.
	(GDBSERVER_DEPFILES): Append $srv_selftest_objs.
	* configure: Re-generated.
	* server.c (captured_main): Wrap variable selftest_filter with
	GDB_SELF_TEST.

gdb/testsuite:

2018-01-08  Simon Marchi  <simon.marchi@ericsson.com>

	* gdb.server/unittest.exp: Match the output in non-development
	mode.


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2018-08-18 16:34 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12  5:53 [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.0.91 sergiodj+buildbot
2018-01-12  5:53 ` Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.1-branch sergiodj+buildbot
2018-01-12  5:53 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2018-01-12  6:07 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2018-01-12  6:15 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-01-12  6:17 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2018-01-12  6:23 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2018-01-12  6:33 ` Failures on Fedora-i686, " sergiodj+buildbot
2018-01-12  6:35 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2018-01-12  8:00 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, " sergiodj+buildbot
2018-01-12 15:01 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-01-12 16:14 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot
2018-01-12 16:45 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot
  -- strict thread matches above, loose matches on Subject: below --
2018-07-31 15:51 [binutils-gdb/gdb-8.1-branch] Bump GDB version number to 8.1.1.DATE-git sergiodj+buildbot
2018-08-18 16:34 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-07-31 15:37 [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.1.1 sergiodj+buildbot
2018-08-18 16:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-05-31  4:02 [binutils-gdb/gdb-8.1-branch] Unset gdbarch significant_addr_bit by default sergiodj+buildbot
2018-06-04 19:14 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-05-10 19:44 [binutils-gdb/gdb-8.1-branch] gdbserver/Windows: crash during connection establishment phase sergiodj+buildbot
2018-05-12  0:46 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-05-10 19:22 [binutils-gdb/gdb-8.1-branch] gdbserver/Windows: Fix "no program to debug" error sergiodj+buildbot
2018-05-11 17:46 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-05-10 19:11 [binutils-gdb/gdb-8.1-branch] [gdbserver/win32] fatal "glob could not process pattern '(null)'" error sergiodj+buildbot
2018-05-11 13:25 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-05-10 12:45 [binutils-gdb/gdb-8.1-branch] Fix tagged pointer support sergiodj+buildbot
2018-05-10 19:52 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-04-12 21:16 [binutils-gdb/gdb-8.1-branch] Fix -D_GLIBCXX_DEBUG gdb-add-index regression sergiodj+buildbot
2018-04-12 22:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-04-04 16:12 [binutils-gdb/gdb-8.1-branch] i386: Clear vex instead of vex.evex sergiodj+buildbot
2018-04-04 16:37 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-03-02 12:58 [binutils-gdb/gdb-8.1-branch] Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build on mingw*) sergiodj+buildbot
2018-03-02 14:34 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-03-01  3:00 [binutils-gdb/gdb-8.1-branch] Change order of error message printed when gdbserver can't find CWD sergiodj+buildbot
2018-03-01  4:36 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-03-01  2:49 [binutils-gdb/gdb-8.1-branch] Make gdbserver work with filename-only binaries sergiodj+buildbot
2018-03-01  3:55 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-03-01  2:36 [binutils-gdb/gdb-8.1-branch] Create new common/pathstuff.[ch] sergiodj+buildbot
2018-03-01  3:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-02-09 12:51 [binutils-gdb/gdb-8.1-branch] gdb/NEWS: Clarify the news entry for "rbreak" in GDB 8.1 sergiodj+buildbot
2018-02-09 13:45 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-31  3:17 [binutils-gdb/gdb-8.1-branch] Set GDB version number to 8.1 sergiodj+buildbot
2018-01-31  4:32 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-27 17:20 [binutils-gdb/gdb-8.1-branch] Avoid compilation errors in MinGW native builds of GDB sergiodj+buildbot
2018-01-27 19:43 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-24 19:02 [binutils-gdb/gdb-8.1-branch] Fix GCC PR83906 - [8 Regression] Random FAIL: libstdc++-prettyprinters/80276.cc whatis p4 sergiodj+buildbot
2018-01-24 20:28 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-22 20:14 [binutils-gdb/gdb-8.1-branch] Fix segfault with 'set print object on' + 'whatis <struct>' & co sergiodj+buildbot
2018-01-22 21:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-18  0:02 [binutils-gdb/gdb-8.1-branch] Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx") sergiodj+buildbot
2018-01-18 17:16 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-17 14:00 [binutils-gdb/gdb-8.1-branch] configure: Fix test for fs_base/gs_base in <sys/user.h> sergiodj+buildbot
2018-01-17 16:32 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-17 13:36 [binutils-gdb/gdb-8.1-branch] Don't pass -m64 to libcc1 on aarch64-linux sergiodj+buildbot
2018-01-17 14:54 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-17 11:59 [binutils-gdb/gdb-8.1-branch] Relax gdb.compile/compile.exp to match the address printed for frame sergiodj+buildbot
2018-01-17 13:18 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-15 22:32 [binutils-gdb/gdb-8.1-branch] Fix scm-ports.exp regression sergiodj+buildbot
2018-01-15 23:04 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-12  6:37 [binutils-gdb/gdb-8.1-branch] Bump GDB version number to 8.0.91.DATE-git sergiodj+buildbot
2018-01-12  7:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-12  5:00 [binutils-gdb/gdb-8.1-branch] gdb/NEWS: Rename "Changes since 8.0" into "Changes in 8.1" sergiodj+buildbot
2018-01-12  5:40 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-11  7:05 [binutils-gdb/gdb-8.1-branch] Fix backwards compatibility with old GDBservers (PR remote/22597) sergiodj+buildbot
2018-01-11  7:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-11  5:03 [binutils-gdb/gdb-8.1-branch] language_get_symbol_name_matcher -> get_symbol_name_matcher sergiodj+buildbot
2018-01-11  5:31 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-11  3:20 [binutils-gdb/gdb-8.1-branch] Fix gdb.ada/complete.exp's "complete break ada" test (PR gdb/22670) sergiodj+buildbot
2018-01-11  4:02 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-11  2:27 [binutils-gdb/gdb-8.1-branch] Fix gdb.ada/bp_c_mixed_case.exp (PR gdb/22670) sergiodj+buildbot
2018-01-11  3:04 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot
2018-01-08 12:27 [binutils-gdb/gdb-8.1-branch] Fix GDBserver build failure when $development is false sergiodj+buildbot
2018-01-08 12:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).