This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] Match \r\r\n in testsuite
- From: Yao Qi <yao at codesourcery dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 17 Sep 2013 21:58:27 +0800
- Subject: Re: [PATCH 0/4] Match \r\r\n in testsuite
- Authentication-results: sourceware.org; auth=none
- References: <87a9ldyu8k dot fsf at fleche dot redhat dot com> <1379423179-8515-1-git-send-email-yao at codesourcery dot com> <20130917133530 dot GH3132 at adacore dot com>
On 09/17/2013 09:35 PM, Joel Brobecker wrote:
How about we introduce a new official variable, similar to $hex,
$decimal, etc, which would correctly match new-line output based
on the host? I propose $eol, which is already used, but only in
2 testcases, so easy to adjust (remove "set eol ..." in those two
testcases).
Yeah, that is fine to me. Considering patch 4/4, I'd like introduce two
variables, $cr and $eol, which can be defined like this,
if [istarget "*-*-mingw*"] {
set cr "\r\r"
} else {
set cr "\r"
}
set eol "${cr}\n"
In this way, patch 3/4 can be updated to something like,
- set mi_gdb_prompt "\[(\]gdb\[)\] \r\n"
+ set mi_gdb_prompt "\[(\]gdb\[)\] ${eol}"
and patch 4/4 can be updated to something like,
-gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline2.
+gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline2${cr}
patch 1/4/ and 2/4 can be unchanged. What do you think?
--
Yao (éå)