From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb/testsuite: capture GDB tty name in default_gdb_spawn
Date: Wed, 9 Jun 2021 11:15:01 -0400 [thread overview]
Message-ID: <269336aa-5500-c03e-9e00-81279c24e5be@polymtl.ca> (raw)
In-Reply-To: <874ke7jcrv.fsf@tromey.com>
On 2021-06-09 11:09 a.m., Tom Tromey wrote:
> Simon> + # Capture GDB's TTY name, so we can save it below.
> Simon> + rename spawn builtin_spawn
> Simon> + rename spawn_capture_tty_name spawn
> Simon> + set code [catch {uplevel 1 {
> Simon> + remote_spawn host "$::GDB $::INTERNAL_GDBFLAGS $::GDBFLAGS [host_info gdb_opts]"
> Simon> + }} res]
> Simon> + rename spawn spawn_capture_tty_name
> Simon> + rename builtin_spawn spawn
> Simon> +
> Simon> + # If remote_spawn threw an error, propagate it.
> Simon> + if { $code == 1 } {
> Simon> + return -code $code -errorinfo $::errorInfo -errorcode $::errorCode $res
> Simon> + }
>
> It would be simpler to just always rename+wrap spawn, and then only
> stash the result in this particular case. However, it's also fine this
> way.
Yeah, I wanted to avoid overriding it all the time, to avoid bad
suprises. Although if we don't introduce bugs, it should be fine ;).
Simon
next prev parent reply other threads:[~2021-06-09 15:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 21:21 Simon Marchi
2021-06-09 15:09 ` Tom Tromey
2021-06-09 15:15 ` Simon Marchi [this message]
2021-06-09 15:42 ` Simon Marchi
2021-06-10 18:26 ` Tom Tromey
2021-06-10 18:32 ` Simon Marchi
2021-07-19 18:36 ` Bernd Edlinger
2021-07-19 18:53 ` Simon Marchi
2021-07-19 19:05 ` Bernd Edlinger
2021-07-20 5:14 ` Simon Marchi
2021-07-20 20:28 ` Bernd Edlinger
2021-07-21 19:54 ` Bernd Edlinger
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=269336aa-5500-c03e-9e00-81279c24e5be@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).