From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 688AD3858417; Fri, 19 Jan 2024 18:10:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 688AD3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705687844; bh=d69h6g2MU7lCXA/DU2Q+hgsXklIqv3FPVvfC2LwPd8c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=liv5ids34t7mvteAM4712P9z2gpDg2ZReXFazQNg51NvfcqD/v0672VAQ0iI/aSIg VWym6qguE48/IhTvhgUoKOK3SS9lekOBh0vaGUgziA46a92pvyVNrflOyTnHo0Loug j91uiwjX1hHXyJ64SEHT4nRcgsCtc+0jx4oNB3OQ= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug remote/30770] serial.c does not preserve errno correctly Date: Fri, 19 Jan 2024 18:10:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 15.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30770 --- Comment #12 from Sourceware Commits --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D74d8fa2df7e7= 844f9b1b8fac27fe7d0b82100ab0 commit 74d8fa2df7e7844f9b1b8fac27fe7d0b82100ab0 Author: =C3=90=C2=A1=C3=90=C2=B5=C3=91=C3=90=C2=B3=C3=90=C2=B5=C3=90=C2=B9 = =C3=90=C2=A7=C3=90=C2=B5=C3=91=C3=90=C2=BD=C3=90=C2=BE=C3=90=C2=B2 Date: Fri Jan 19 11:01:18 2024 -0700 Fix remote serial read After closing "Bug 30770 - serial.c does not preserve errno correctly" https://sourceware.org/bugzilla/show_bug.cgi?id=3D30770 remote debugging became impossible due to an attempt to recv() by a call intended for the socket, and not for the character device file. The documentation implicitly states that it is possible to use the read() c= all to work with a socket. But this does not mean in the general case that it is permissible to use recv in the case of a non-socket. condition: os: Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic libc: ldd (Ubuntu GLIBC 2.38-1ubuntu6) 2.38 kernel: Linux klen-dev-um790pro 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC= Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux gdb: build from trank at 15.0.50.20231226-git GDB output: $ arm-kgp-eabi-gdb GNU gdb (Klen's_GNU_package_(KGP)_for_target::arm-kgp-eabi_host::x86= _64-kgp-linux-gnu_znver4-avx512<<=C3=ADlex>>) 15.0.50.20231226-git .... (gdb) tar ext /dev/ttyACM1 Remote debugging using /dev/ttyACM1 Remote communication error. Target disconnected: error while reading: Socket operation on non-socket. (gdb) after fix gdb work fine $ arm-kgp-eabi-gdb -q (gdb) tar ext /dev/ttyACM0 Remote debugging using /dev/ttyACM0 (gdb) mon swd Target voltage: 0.0V Available Targets: No. Att Driver STM32F40x M4 (gdb) att 1 Attaching to Remote target warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. 0x08020c80 in ?? () (gdb) Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30770 --=20 You are receiving this mail because: You are on the CC list for the bug.=