public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdbserver/Windows: crash during connection establishment phase
@ 2018-05-10 17:39 sergiodj+buildbot
  2018-05-10 17:41 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2018-05-10 17:39 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 190852c8ac75cb62a737c58edfadfb0e1fcef78a ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 190852c8ac75cb62a737c58edfadfb0e1fcef78a

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] 9+ messages in thread

end of thread, other threads:[~2018-06-18 20:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 17:39 [binutils-gdb] gdbserver/Windows: crash during connection establishment phase sergiodj+buildbot
2018-05-10 17:41 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2018-05-10 17:54 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2018-05-10 19:11 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2018-05-11  4:35 ` *** COMPILATION FAILED *** Failures on Fedora-i686, branch master *** BREAKAGE *** sergiodj+buildbot
2018-05-11  5:04 ` Failures on Fedora-x86_64-cc-with-index, branch master sergiodj+buildbot
2018-05-11  5:28 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2018-05-11  5:38 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot
2018-06-18 20:42 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master 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).