This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] Fix char_func return value in finish.exp


Michael Snyder wrote:
> 
> char_func returns '1', not \001.  Attempt to match a non-ascii char '1'
> as well as an ascii one.
> 
> Fernando -- I know the non-ascii clause produces a PASS output that is
> different from the ascii clause -- but I don't ever expect it to be
> invoked.
> If it ever is, that will be a signal for us to revisit the issue.
>

Excellent.  Thanks you.

P.S.: You did the right thing.  The message id text is supposed to be the
same, except for a text between "()" at the end, where things like "timeout"
can go.  They must be ignored by the summarizing scripts.
You solution is 100% OK.




 
>   ----------------------------------------------------------------------------------------------------
> 2000-12-21  Michael Snyder  <msnyder@mvstp600e.cygnus.com>
> 
>         * gdb.base/finish.exp: Accept '1' instead of \001 from char_func.
>         Add a RE to accept a non-ascii char if one is ever presented.
> 
> Index: finish.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/finish.exp,v
> retrieving revision 1.1
> diff -c -3 -p -r1.1 finish.exp
> *** finish.exp  2000/12/08 20:17:46     1.1
> --- finish.exp  2000/12/21 17:59:01
> *************** proc finish_1 { type } {
> *** 43,53 ****
>             "continue to ${type}_func"
>       send_gdb "finish\n"
>       gdb_expect {
> !       -re ".*Value returned is .* = 1 '.001'\r\n$gdb_prompt $" {
>             if { $type == "char" } {
>                 pass "finish from char_func"
>             } else {
> !               fail "finish from char_func"
>             }
>         }
>         -re ".*Value returned is .* = 1\r\n$gdb_prompt $" {
> --- 43,60 ----
>             "continue to ${type}_func"
>       send_gdb "finish\n"
>       gdb_expect {
> !       -re ".*Value returned is .* = 49 '1'\r\n$gdb_prompt $" {
>             if { $type == "char" } {
>                 pass "finish from char_func"
>             } else {
> !               fail "finish from ${type}_func"
> !           }
> !       }
> !       -re ".*Value returned is .* = \[0123456789\]* '1'\r\n$gdb_prompt $" {
> !           if { $type == "char" } {
> !               pass "finish from char_func (non-ASCII char set?)"
> !           } else {
> !               fail "finish from ${type}_func"
>             }
>         }
>         -re ".*Value returned is .* = 1\r\n$gdb_prompt $" {

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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