From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] Fix gdb.base/gdbinit-history.exp when HISTSIZE is set in the environment (Re: [PATCH] [COMMITTED] Fix PR gdb/17820)
Date: Fri, 15 May 2015 21:43:00 -0000 [thread overview]
Message-ID: <CA+C-WL-bLmb4mkrOM-J9WnEPEW7TrmykBwA=FwW4rRqPWzUm3g@mail.gmail.com> (raw)
In-Reply-To: <55563C0D.9010903@redhat.com>
On Fri, May 15, 2015 at 2:33 PM, Pedro Alves <palves@redhat.com> wrote:
> On 05/15/2015 06:03 PM, Patrick Palka wrote:
>> On Fri, May 15, 2015 at 12:05 PM, Pedro Alves <palves@redhat.com> wrote:
>>> + if {$have_old_histsize} {
>>> + set env(HISTSIZE) $old_histsize
>>> + }
>>
>> Why not change this predicate to
>>
>> if [info exists old_histsize]
>>
>> to obviate the need for $have_old_histsize altogether?
>
> Yeah, "info exists" is ok since this is local scope; I was worrying
> that the code ends up copied elsewhere to global context, and
> then the "info exists" would be the wrong thing to use, considering
> e.g., [1] and [2]. Maybe I'm worrying too much. But how about instead
> simply saving/restoring the whole env array, like in the updated
> patch below, which sidesteps that issue?
What a neat language (TCL).
Both the original approach (with $have_old_histsize) and this one look
fine by me.
next prev parent reply other threads:[~2015-05-15 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 13:29 [PATCH] [COMMITTED] Fix PR gdb/17820 Patrick Palka
2015-05-15 16:05 ` Pedro Alves
2015-05-15 17:04 ` Patrick Palka
2015-05-15 18:33 ` [PATCH v2] Fix gdb.base/gdbinit-history.exp when HISTSIZE is set in the environment (Re: [PATCH] [COMMITTED] Fix PR gdb/17820) Pedro Alves
2015-05-15 21:43 ` Patrick Palka [this message]
2015-05-19 9:59 ` Pedro Alves
2015-05-15 17:10 ` [PATCH] [COMMITTED] Fix PR gdb/17820 Patrick Palka
2015-05-15 17:17 ` Pedro Alves
2015-05-15 17:27 ` Patrick Palka
2015-05-15 17:48 ` Pedro Alves
2015-05-15 21:22 ` Patrick Palka
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='CA+C-WL-bLmb4mkrOM-J9WnEPEW7TrmykBwA=FwW4rRqPWzUm3g@mail.gmail.com' \
--to=patrick@parcs.ath.cx \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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