This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/4] Match \r\r\n in testsuite


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]