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


> 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?

Can we look at fixing gdb_test to use that $eol instead? Is that
even necessary? I see the implementation is:

    return [gdb_test_multiple $command $message {
        -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" {
            if ![string match "" $message] then {
                pass "$message"
            }
        }

It seems to me that it should match ${eol} already, no?

-- 
Joel


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