diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2024-01-25 15:43:56 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2024-04-30 08:59:08 +0000 |
commit | 6d4593a178b49cab205d81cdf36f52e12eabbc6d (patch) | |
tree | 3cc9d6a9c1d849d45c2aa9dea83ec26f793244f1 /gcc | |
parent | 04ef92a62af3a815b86a2037267cd4e747ae225c (diff) | |
download | gcc-6d4593a178b49cab205d81cdf36f52e12eabbc6d.zip gcc-6d4593a178b49cab205d81cdf36f52e12eabbc6d.tar.gz gcc-6d4593a178b49cab205d81cdf36f52e12eabbc6d.tar.bz2 |
Fix pretty printers regexp for GDB output
GDB emits end of lines as \r\n, we currently match any >0 number of
either \n or \r, possibly leading to mismatches under racy conditions.
I noticed this while running the GCC testsuite using the equivalent of
GDB's READ1 feature [1] which helps detecting bufferization issues.
We try to match
\n$1 = empty std::tuple\r
against {^(type|\$([0-9]+)) = ([^\n\r]*)[\n\r]+} which fails because
of the leading \n (which was left in the buffer after the previous
"skipping" pattern matched the preceding \r).
This patch accepts any number of leading \n and/or \r in the "got" clause.
Also take this opportunity to quote \r and \r in the logs, to make
debugging such issues easier.
Tested on aarch64-linux-gnu.
[1] https//github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/README#L269
2024-01-24 Christophe Lyon <christophe.lyon@linaro.org>
libstdc++-v3/
* testsuite/lib/gdb-test.exp (gdb-test): Fix regexp. Quote
newlines in logs.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions