This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Fix char_func return value in finish.exp
- To: Michael Snyder <msnyder at redhat dot com>
- Subject: Re: [RFA] Fix char_func return value in finish.exp
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 22 Dec 2000 01:33:40 +0000
- CC: gdb-patches at sources dot redhat dot com, fnasser at redhat dot com, kettenis at wins dot uva dot nl
- Organization: Red Hat Canada Ltd. - Toronto
- References: <3A424627.AD03AB9F@redhat.com>
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