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: Mingw gdb validation




Pierre Muller wrote:
I thought about this a while ago also,
and I was wondering if the best solution would not be to
have a global nl variable defined in gdb.exp
that would depend on the target you are testing.
I also thought at that time that we should
define two global variables: nl and nls.
"nl" as being something that is a single newline defined generally as "\[\r\n\]" but probably as "\[\r\n\]\n?" for mingw32
and
"nls" if more than one newline is allowed and should generally be simply
"\[\r\n\]*"
If it's more than one we should use "\[\r\n\]+".

  Once these two variables are set in gdb.exp,
we should replace every "\[\r\n\]*" by a "$nls"
and all \[\r\n\]" by "$nl" in the expected answer part of the tests.


This should allow a lot of currently failing mingw32 test to succeed. It would also have the advantage of not changing anything for other targets, unless we find other targets that would benefit from a similar change, but that could then also be inserted in gdb.exp special cases for nl and nls variables.

Nevertheless, changing all tests to use nl and nls
is probably not an easy task...
That's just a long task, but I think it's easier than understanding why some tests require end-of-line testing, and some tests do not. See my previous mail about gdb.cp/userdef.exp.
I'm afraid there could be some tests that has been written to match the gdb behavior, even if it was not a correct behavior.


Denis


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