[PATCH][gdb/testsuite] Handle PS1 quirk in gdb.base/multi-line-starts-subshell.exp
Tom de Vries
tdevries@suse.de
Mon Dec 14 23:50:41 GMT 2020
On 12/14/20 4:47 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> The problem is that the PS1 setting has no effect.
>
> Why is that?
>
The mechanism is as follows:
- /etc/profile sets ENV=/etc/bash.bashrc
- /bin/sh is started
- /bin/sh executes ENV, in other words /etc/bash.bashrc
- during the execution of /etc/bash.bashrc, PS1 is set unconditionally
AFAIU, this is caused by this PR (
https://bugzilla.opensuse.org/show_bug.cgi?id=611966 ) which lurks in
older version of openSUSE/SUSE.
> Tom> Fix this by setting PS1 after spawning the subshell.
>
> Tom> Tested on x86_64-linux.
>
> Tom> Any comments?
>
> It seems fine but it may be good to understand why it is needed and
> perhaps add a comment explaining it.
Ack, will do.
Thanks,
- Tom
More information about the Gdb-patches
mailing list