From: Marc Khouzam <marc.khouzam@ericsson.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, Pedro Alves <palves@redhat.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: Is there a way to unset inferior-tty?
Date: Sat, 02 Jul 2016 14:04:00 -0000 [thread overview]
Message-ID: <E59706EF8DB1D147B15BECA3322E4BDC22AF19ED@eusaamb103.ericsson.se> (raw)
In-Reply-To: <9560791fd070c79f7ab54e5e7b63d433@simark.ca>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 5088 bytes --]
> > I think this should just be fixed to work.
> >
> > The fix should be very similar to this:
> >
> >
> > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=811a659a779fdf93293fe1105d99e9db171a8b68
> >
> > Thanks,
> > Pedro Alves
>
> Hi Marc,
>
> Here's a patch. If you like it I'll submit it to gdb-patches with
> ChangeLog and all.
Thanks! Might as well submit it.
In the end I moved to a more complete solution for eclipse. Right
after an inferior starts, eclipse will reset the tty to a new and
valid value; that way, if the user does a 'run', the tty will already
be properly set _and_ will direct inferior output to a valid eclipse
console.
FWIW, this also led me to automatically set the tty for an inferior
that is created using the GDB console with the 'add-inferior' command
(thanks to the =thread-group-added event). I think this will make for
an improved user experience with the GDB console in eclipse.
Marc
From gdb-return-45171-listarch-gdb=sources.redhat.com@sourceware.org Mon Jul 04 02:16:10 2016
Return-Path: <gdb-return-45171-listarch-gdb=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb@sources.redhat.com
Received: (qmail 61614 invoked by alias); 4 Jul 2016 02:16:09 -0000
Mailing-List: contact gdb-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb.sourceware.org>
List-Subscribe: <mailto:gdb-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb/>
List-Post: <mailto:gdb@sourceware.org>
List-Help: <mailto:gdb-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-owner@sourceware.org
Delivered-To: mailing list gdb@sourceware.org
Received: (qmail 61602 invoked by uid 89); 4 Jul 2016 02:16:08 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 testsºYES_05,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Julio, pipes, H*Ad:D*io, HTo:D*io
X-HELO: smtp.gentoo.org
Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jul 2016 02:16:07 +0000
Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 58B5F340D81; Mon, 4 Jul 2016 02:16:05 +0000 (UTC)
Date: Mon, 04 Jul 2016 02:16:00 -0000
From: Mike Frysinger <vapier@gentoo.org>
To: Julio Guerra <julio@farjump.io>
Cc: gdb@sourceware.org, Corinna Vinschen <corinna@vinschen.de>, Christophe =?utf-8?Q?Plé?= <christophe@farjump.io>
Subject: Re: [RFC] Remote File I/O should allow opening non regular files
Message-ID: <20160704021605.GP4685@vapier.lan>
Mail-Followup-To: Julio Guerra <julio@farjump.io>, gdb@sourceware.org, Corinna Vinschen <corinna@vinschen.de>, Christophe =?utf-8?Q?Plé?= <christophe@farjump.io>
References: <42ab0baf-9cf0-76a5-17c8-fa04940dd1bb@farjump.io>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JVVqWhpkAs5raV7A"
Content-Disposition: inline
In-Reply-To: <42ab0baf-9cf0-76a5-17c8-fa04940dd1bb@farjump.io>
X-IsSubscribed: yes
X-SW-Source: 2016-07/txt/msg00005.txt.bz2
--JVVqWhpkAs5raV7A
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-length: 758
On 02 Jul 2016 14:02, Julio Guerra wrote:
> Today's implementation of `open()` first checks if the file is a regular
> file [1]. Is there any good reason for that limitation? I can't see any
> problem in opening special files. Most of them can be used with `read()`
> and `write()` only, without `ioctl()`, like any regular file. For
> example: TTYs, /dev/random, pipes, etc.
makes sense to me to delete that entire stat block of code. it seems like
remote_fileio_return_errno should DTRT all the time (like trying to open a
dir and failing). although that edge case might be worth checking.
i'd note that the current code is even racy (TOCTOU) so at the very least,
it should do the open first, and then fstat the fd to do all of the type
checks.
-mike
--JVVqWhpkAs5raV7A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-length: 819
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXecbkAAoJEEFjO5/oN/WBG0YQAJhNfFDhTXIbwE4k96wonqEU
1GGFyOHiStj/ynLWkzhYac8ICkEk+MLZ4KslfRv+fpiIXDdOH1BV1kKQqmPCgWDG
gmIqzjX3eGKsWTsrVJN3Rb4tGr7w0MbQv9ffsilrZJgtlkKxzc62PB0V812ZYlvn
uTKgC5+qcgw4ELl2Kw6oiAfqKEwxxB2fprlGM25FbUuntOzhTug6g5huC5dxnYGz
VuapPoFgKKgp34N3nkLJHMyhGXZgGfGvsWcszbMG9nhDbUH8JCsRMOXbUjuNi4gZ
BipB7Jr1IqLyC9HLSqb+bNvPt8Yx9hntQnEp9RCfSCpfHjukkOZIXBEm+rEUObkL
t2LuYR8Zo8ApLd/6qp4WiBwo7pB7CeQBPiUhzVE+Ck5mf9W6ZEAQ+mgNPVc/2s+x
FYR6LL2lrFRXhrNECHaBZorH/nfA8Ftj4jgFmMxkC6xlQazv9VSGEh3PmXb6e2BM
fZT/GfqBDvh6NZWGycFYkWJSTVB9B6OKwdjm4/q//RSjx5cVkoSxXx4IhbQMVSiF
+ZW4iFtxy3N3eqmy30zp1rltZmLKLsHq5AU1ND5IqjVDuFs+S5jfTEMkQi6whn/S
dXH1ZXbLJbRdQF5WPytY1wPU5xoEvIvRvBPI+rRCSkgNR0q0N10aNyw4Y6KNXezd
0dsqyozkF9qSQQ2aX2uu
ç03
-----END PGP SIGNATURE-----
--JVVqWhpkAs5raV7A--
next prev parent reply other threads:[~2016-07-02 14:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 18:32 Marc Khouzam
2016-07-01 18:51 ` Pedro Alves
2016-07-02 1:29 ` Simon Marchi
2016-07-02 14:04 ` Marc Khouzam [this message]
2016-07-26 18:43 ` Bob Rossi
2016-07-26 19:22 ` Marc Khouzam
2016-07-26 19:32 ` Bob Rossi
2016-08-11 14:22 ` Bob Rossi
2016-08-11 17:41 ` Pedro Alves
[not found] ` <875b0391-3b94-c3d7-c829-a8c3abb00770@redhat.com>
2016-08-15 19:49 ` Marc Khouzam
2016-08-17 12:14 ` Pedro Alves
2016-08-17 14:07 ` Marc Khouzam
2016-08-11 17:00 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E59706EF8DB1D147B15BECA3322E4BDC22AF19ED@eusaamb103.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=gdb@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox