From: Richard Bunt <Richard.Bunt@arm.com>
To: Andreas Schwab <schwab@suse.de>, Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH] Restore original GDB prompt in define.exp
Date: Thu, 04 Jul 2019 14:22:00 -0000 [thread overview]
Message-ID: <d17e84f5-12df-46b5-4866-b0e82895fc49@arm.com> (raw)
In-Reply-To: <mvmv9wjfa1y.fsf@suse.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1275 bytes --]
On 7/3/19 3:48 PM, Andreas Schwab wrote:
> On Jul 03 2019, Tom Tromey <tom@tromey.com> wrote:
>
>>>>>>> "Richard" == Richard Bunt <Richard.Bunt@arm.com> writes:
>>
>> Richard> -gdb_test_multiple "set prompt \\(gdb\\) " "reset gdb_prompt" {
>> Richard> +gdb_test_multiple "set prompt $gdb_prompt " "reset gdb_prompt" {
>>
>> This is peculiar because both the original code and the new code have
>> backslashes in the "set" command -- gdb_prompt is actually a regexp, not
>> just a plain string. But, it works anyhow, I guess something along the
>> way is ignoring the "\".
>
> That's because it's a var_string, not a var_string_noescape.
>
> Andreas.
>
Thanks for the comments.
Based on these I would like to submit a v2 (when it's ready) which saves
the literal prompt from "show prompt" and restores from this.
I think this is a more robust solution as it will not break if someone is
indeed using $gdb_prompt with a more complex regular expression and
doesn't unnecessarily rely on the escape behavior of the GDB prompt.
Note: The test case which sets the prompt to \\(blah\\) still covers this
escaping behavior, but I see no need for the prompt restore test to rely
on it.
Many thanks,
Rich
\x16º&Öéj×!zÊÞ¶êç×öëÉb²Ö«r\x18\x1dnr\x17¬
prev parent reply other threads:[~2019-07-04 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 13:35 Richard Bunt
[not found] ` <87lfxfjiz6.fsf@tromey.com>
2019-07-03 14:49 ` Andreas Schwab
2019-07-04 14:22 ` Richard Bunt [this message]
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=d17e84f5-12df-46b5-4866-b0e82895fc49@arm.com \
--to=richard.bunt@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
--cc=schwab@suse.de \
--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