On 7/3/19 3:48 PM, Andreas Schwab wrote: > On Jul 03 2019, Tom Tromey wrote: > >>>>>>> "Richard" == Richard Bunt 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 &j!z޶מb֫rnr