This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug remote/21188] Remote timeouts don't work correctly


https://sourceware.org/bugzilla/show_bug.cgi?id=21188

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pedro Alves <palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9bcbdca808b5f9fec6217d20bd4b48a56008c460

commit 9bcbdca808b5f9fec6217d20bd4b48a56008c460
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Mar 17 16:08:12 2017 +0000

    PR remote/21188: Fix remote serial timeout

    As Gareth McMullin <gareth@blacksphere.co.nz> reports at
    <https://sourceware.org/ml/gdb-patches/2017-02/msg00560.html>, the
    timeout mechanism in ser-unix.c was broken by commit 048094acc
    ("target remote: Don't rely on immediate_quit (introduce quit
    handlers)").

    Instead of applying a local fix, and since we now finally always use
    interrupt_select [1], let's get rid of hardwire_readchar entirely, and
    use ser_base_readchar instead, which has similar timeout handling,
    except for the bug.

    Smoke tested with:

     $ socat -d -d pty,raw,echo=0 pty,raw,echo=0
     2017/03/14 14:08:13 socat[4994] N PTY is /dev/pts/14
     2017/03/14 14:08:13 socat[4994] N PTY is /dev/pts/15
     2017/03/14 14:08:13 socat[4994] N starting data transfer loop with FDs
[3,3] and [5,5]
     $ gdbserver /dev/pts/14 PROG
     $ gdb PROG -ex "tar rem /dev/pts/15"

    and then a few continues/ctrl-c's, plus killing gdbserver and socat.

    [1] - See FIXME comments being removed.

    gdb/ChangeLog:
    2017-03-17  Pedro Alves  <palves@redhat.com>

        PR remote/21188
        * ser-base.c (ser_base_wait_for): Add comment.
        (do_ser_base_readchar): Improve comment based on the ser-unix.c's
        version.
        * ser-unix.c (hardwire_raw): Remove reference to
        scb->current_timeout.
        (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
        (hardwire_ops): Install ser_base_readchar instead of
        hardwire_readchar.
        * serial.h (struct serial) <current_timeout, timeout_remaining>:
        Remove fields.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]